The Winter CMS maintainers are pleased to announce that Winter CMS v1.2.2 is now available. You may upgrade to this version automatically by running a Composer update in your Winter CMS install directory through composer update.
One of our biggest releases, we focused on some cool new features including child themes, the Icon Picker form widget, support for our new Blocks plugin that provides a block-based theme development experience and various improvements to the Media Manager.
parent property of a theme's configuration file (theme.yaml).theme.yaml files present in the DatabaseDatasource when using the Database Templates feature).iconpicker FormWidget with support for custom icon libraries.assets directory within the component directory will now be mirrored by the winter:mirror command.extras package.alert() & error() methods on Winter\Storm\Console\Command now implement Laravel's CLI components for rendering messages.datepicker field in datetime mode - the date input size has been slightly increased, and the time input size has been slightly decreased, to better fit their respective content.window.Vue variable.slug validation rule that validates a string as a valid URL slug (alpha-numeric and a defined separator, defaults to -).Str::isJson() method to check if a string is valid JSON as well as the is_json() global helper function.File::isAbsolutePath() method to the Winter\Storm\Filesystem\Filesystem class to check if a path is absolute.mode property for the mediafinder FormWidget. Supported modes include: image. video, audio, document, file, and all.metadata JSON blob column to the backend_users table.head block in the backend views via Block::append('head', $html).sizeBytes and lastModified attributes to media items returned by the Media Manager's getItems() JS function.$formWidget as a variable made available to partial fields.true as the second parameter to the ::extend() static method in order to run extension code within the context of the class being extended giving the code access to protected and private properties and methods.extend() method on an instance of an Extendable class to have that extension apply only to that instance of the object.backend.ui.eventHandler and backend.ui.widgetHandler Snowboard plugins, refactored the IconPicker, ColorPicker, & Sensitive FormWidgets widgets as Snowboard plugins.develop.debugSnowboard, has been added to config/develop.php, to allow overriding if Snowboard debugging and console logging is enabled, independent of the app.debug setting.RESTRICT_BASE_DIR environment variable to control the cms.restrictBaseDir config setting.content function in Twig now can return a boolean, thus allowing usage as a conditional for fallback content if a content file does not exist.Markdown parser now uses the CommonMark library by the PHP League, as this library is already a Laravel dependency.$settingsCacheTtl property may be provided for models that implement the SettingsModel behavior. This property accepts an integer and allows you to set the length of time (in seconds) that settings in this model will be cached for, defaulting to 1440 seconds (24 minutes).render() method of Winter\Storm\Halcyon\Processors\SectionParser into three methods (renderSettings(), renderCode(), and renderMarkup()) as well as added three methods for parsing the sections (parseSettings(), parseCode(), and parseMarkup()). This makes it much easier to extend the SectionParser to build customer parsers. Demonstrated in the Winter.Blocks plugin.ClassLoader to support PSR-4 autoloading for packages added via the autoloadPackage($namespace, $path) method (modules & plugins). The old method of lowercase folders with proper case files is still supported as well.Winter\Storm\Support\Traits\Singleton trait to bind to the application container instead of the global scope, which was causing issues with running multiple instances of Winter CMS in the same PHP process (i.e. unit tests, Laravel Vapor, Octane, etc).add() and remove() methods on the Winter\Storm\Database\Concerns\BelongsToOrMorphsToMany relation were passing the model key instead of the model instance to the attach() and detach() methods.root paths, also simplified the logic for generating thumbnails.artisan route:cache.FormBuilder would generate elements with empty id attributes.onLoadMovePopup() MediaManager AJAX handler.depends usage in the Inspector widgets for object and objectlist fields.slug or camel preset tools enabled wouldn't respect the max length of the field.App facade being used instead of the local reference to the app instance which should improve support for multiple instances of Winter CMS in the same PHP process.name@context) could not be removed via removeField('name').plugin:install command inside the winter:install command, due to a change in the former command's parameters.winter:install.System\Models\File::getPublicPath() method if the storage being used was not a local file storage.form.extendFieldsBefore and form.extendFields events.\TestCase alias has been set up to point to the correct base test class for unit tests, removing the need for adding a polyfill class in unit tests to support testing in both Winter v1.1 and v1.2. By extending this alias, unit tests should now work in both branches.erusev/parsedown and erusev/parsedown-extra with league/commonmark for the Markdown parser which was already included by Laravel and improves compliance with the CommonMark specification.wikimedia/composer-merge-plugin to ~2.1.0 to allow for the replace configuration of dependencies to be merged together.Full Changelog: https://github.com/wintercms/winter/compare/v1.2.1...v1.2.2
Sign up to our newsletter and receive updates on Winter releases, new features in the works, plugin and theme promotions and much more!