Releases: wintercms/winter
Releases · wintercms/winter
v1.2.9
UX/UI Improvements
- Added support for setting failover transports to the backend Mail Settings page.
DX Improvements
config:clearcommand now warns users that caching configuration files is not currently supported in Winter CMS.- Improved
create:commandscaffolder to allow for hyphens in generated command names and added optional--descriptionoption to set the help text for the generated command. - Enhanced
winter:util compileto download FontAwesome assets required to compile backend LESS files if not present. - Added the Form's id attribute to the forms generated by the default FormController views.
- Registered the
Illuminate\Contracts\Auth\Access\Gatecontract with the application as a null gate to prevent plugins and IDE extensions that expect the contract to be present from throwing unhelpful errors. - Exceptions passed to the
Backend\Traits\ErrorMakertrait are now logged in the backend error log (excludingApplicationExceptions).
API Changes
- Added
iconClassoption for thefileuploadFormWidget to specify the icon that should be used for the upload button. - Added
searchwidget configuration options to the RelationController'sview&managemode configuration (prompt,mode,scope,searchOnEnter).
Bug Fixes
- Improved compatiblity of Winter's
ConfigRepositorywith Laravel by aliasing top level config keys (currently prefixed with*::to reflect the namespaced config system used in Winter) to their naked versions (i.e.debugbaris still internally stored as*::debugbarbut will also be accessible from thegetItems()andall()methods on theConfigRepositoryasdebugbar). This paves the way for support for Laravel Nightwatch which relies on directly accessing the underlying config data structure for performance reasons. - Improved handling of package names as input to the
vite:compileandvite:watchcommands. - Fixed issue where
winter:util purge uploadscould sometimes delete files that were actually in use. - Improved vite base path generation to fix importing fonts.
- Improved error handling when using the default FormController views.
- Improved handling of form data in
Snowboard.request()to skipnullorundefinedvalues. - Removed the registration of the non-existant
Backend\FormWidgets\TimePickerFormWidget. - Updated
bootstrap/autoload.phpto return a 500 header when the vendor files are not present. - Fixed issue with the
DataTablewidget not being able to actually save data. - Fixed Preview labeling on the fancy toolbar for the default FormController view.
Security Improvements
- Ignored
vendor&node_modulesin the default.gitignoreto ensure that those directories are ignored at every level of the project, not just at the project root.
Community Improvements
- Published first party plugin Winter.LaravelBoost to add support for Laravel Boost in Winter v1.3.
- Published first party plugin Winter.LaravelNightwatch to add support for Laravel Nightwatch in Winter v1.3.
- Published an official first-party Docker image for Winter CMS: https://github.com/wintercms/docker.
Dependencies
- Improved support for PHP 8.4.
New Contributors
Full Changelog: v1.2.8...v1.2.9
v1.2.8
UX/UI Improvements
- Added a beautiful error log viewer in the backend that displays contextual information about exceptions, links directly to the source files, and unrolling of all previous exceptions in the stack.
- Added new
buttonfield type to make it easier to add custom buttons to backend forms. - Added support for the
urlfield type to the backend forms. - Added email icon to
emailfields. - Updated the default backend branding colours to match the Winter CMS Brand Guidelines.
- Added support for shift clicking to select multiple records at once in the Lists widget.
- Removed the sort icon from columns that aren't sortable and display a right arrow when a column is sortable but isn't currently being used to sort the results.
- Added
button-groupanddropdownfilter scope types. - Made the entire
mediafinderfield clickable whenmode: file. - Improve click behaviour of
recordfinderfields when disabled. - Allow users to zoom the backend on mobile.
- Added support for
abort(403)to return the access denied view in the backend - Improved handling of
abort(404)in the backend - Improved styling of disabled fields in the fancy form layout
- Hide the select all checkbox on the Lists widget when there are no records to select.
- Fixed anchor tag outline styling in Firefox.
- Style read-only columns on Table widget with slightly darker grey background to indicate read-only state.
- Allow tab and arrow navigation for read-only columns on the Table widget.
- Allowed searching option to show search box on the Table widget even if adding and deleting buttons are disabled.
- Fixed styling of toolbar on the Table widget if only the search box is shown (no background previously).
- Fixed styling of pagination on Table widget.
- Default to
ignoreTimezone = truefor date columns.
DX Improvements
- Added default views for the following backend controller behaviors (FormController, ImportExportController, ListController, ReorderController)
- Backend controllers will now automatically set their navigation context in the form of
Author.Pluginas the author,$pluginNameas the main menu code, and$controllerNameas the side menu code. This means that you can remove calls toBackendMenu::setContext()and constructor overrides in your controllers if they follow that convention. - Improved styling of file generated / updated status message in scaffolding commands
- Added support for
ReactJSin Vite & Mix compiled asset packages. - Added support for customizing the Vite build directory.
- Improved support for Model Factories.
- Added
testalias for thewinter:testcommand. - Added
schedule_timezoneproperty toconfig/app.php. - Updated theme scaffold's README.md to reflect the use of Vite in the generated themes.
- Added
Mail::sendTo()method to the Mail facade's docblock. - Added support for modules to the
asset:createcommands (mix:create,vite:create). - Make readOnly option case-insensitive on the Table widget.
- Improvements to the default scaffolding stub files to bring more inline with the future PSR-12 coding style update.
API Changes
- Added typehints to all the method signatures on the base
Winter\Storm\Database\Attach\Filemodel. (eg.getPath(),getCacheKey(),getFilename(),getContents(),getDiskPath(),isPublic(), etc). - Added
metadatajsonable column to the base File model, migrations have been added forsystem_files, but if you use a custom files table you will need to add a migration that adds$table->mediumText('metadata')->nullable();to your files table. - Made
getDiskName()on the baseWinter\Storm\Database\Attach\Filemodel public. - Added support for an array of names to use for the
postbackHandlerNamein the Table widget. - Removed the
config:cachecommand as it wasn't improving our performance and didn't fully work with Winter's flexible configuration system. - Added support for
SystemExceptionandApplicationExceptioninstances to define their own response codes. - Added
appendViewPath()andprependViewPath()to theSystem\Traits\ViewMaker.addViewPathis renamed toprependViewPath()and is for paths that have higher priority than the existing paths whileappendViewPath()is for paths that should have lower priority than the existing paths (i.e. fallbacks). - Behaviors extending
Backend\Classes\ControllerBehaviorwill now automatically append theirviewsfolder to the controller's view paths allowing them to provide fallbacks for any views required by the behavior. - The
create:controllercommand will now no longer generate the views by default unless--stubsis also passed and the--sidebarflag is replaced with a--layout=(standard|sidebar|fancy)option to choose the form layout to use. - Support for passing
new: trueas a parameter in the request body toonSave()calls that will return a redirect to thecreateaction formMakePartial(string $partial, array $params = [])to theFormControllerbehavior that will render a partial through the controller'smakePartialusing the following priority list of contextual names (form_$context_$partial,form_$partial,$partial).- Added
PromptsForMissingInputto the baseWinter\Storm\Console\Commandclass. - Removed the unused (and broken)
Winter\Storm\Database\DataFeedclass. PluginTestCasenow resets the application router in thesetUp()method between test runs to ensure that plugin routes load in the correct order during tests.
Bug Fixes
- Removed redundant backend route.
- Fixed issues where TagList & Repeater FormWidgets were not able to save an empty value.
- Fixed issue where TagList could return an object in array mode.
- Fixed using Vite packages when they are explicitly ignored / excluded from the project's
package.json. - Improved support for
winter:mirroron Windows - Using the
{% flash %}tag in Twig will now properly purge the FlashBag after it has been read. - Improved support for plugins attempting to access the database before it's fully ready to go.
- Fixed suport for hex colors with alpha values.
- Fixed infinite loop that occurrs when the configured database exists but the tables don't exist yet.
- Fixed support for array callables as dynamic methods.
- Event listeners bound to events with
bindEventOnce()now properly unbind after execution, even if the event is a halting event. - Fixed Syntax Error in CAST Statement for Postgres attachment.
- Fixed CMS Maintenance Mode not working when the
allowed_ipssetting has a value but a null list of IPs. - Fixed CMS Maintenance Mode settings page not showing the correct value for when the Maintenance Mode is enabled.
- Improved support for using hasManyThrough / hasOneThrough relationships with soft deletes.
- Fixed support for the
--forceflag inwinter:env. - Improved support for defining multiple Vite entrypoints.
- Prevent crashes when rendering invalid values in datepicker fields.
- Prevent editors from being created for all column types in the Table widget if read-only (previously, only string columns would be rendered read-only by setting the readonly attribute, this is not ideal because it can be easily changed).
- Fixed broken search if client datasource is used on the Table widget.
- Fixed addVite() method not being able to bind assets to the parent controller.
- Fixed displaying the status of maintenance mode triggered through the backend.
- Fixed backend-triggered maintenance mode support for defined but empty IP lists.
- Fixed support for hex colors with alpha values in the
colorpickerFormWidget. - Improved handling of registering / booting plugins when migrations haven't been run yet.
Security Improvements
- Added AllowList functionality to the Twig security policy.
Translation Improvements
- Improved Russian translations.
- Improved Dutch translations.
Performance Improvements
- Switched to a number input instead of a select dropdown for direct navigation to list pages in the Lists widget. Drastically improves performance when a list has 100+ pages in the results as it no longer causes an N+1 performance issue of rendering a single option element for every single page in your results.
- Fixed an infinite loop that could occur when a database was present but plugin migrations hadn't been run yet.
Community Improvements
- Added Laravel to the list of organizational sponsors.
- Removed Route4Me from the list of organizational sponsors.
Dependencies
- Added support for PHP 8.4
- Dropped support for PHP 8.0, PHP 8.1 is now the minimum requirement.
- wikimedia/less has been bumped to v5 from v3.
- Minimum Laravel version has been bumped to
v9.49.
New Contributors
- @goldmont made their first contribution in #1268
- @thienvu18 made their first contribution in #1294
- @truechernyshov made their first contribution in #1272
- @IsaiahPaget made their first contribution in #1361
- @Satoshi-Sh made their first contribution in #1369
Full Changelog: v1.2.7...v1.2.8
v1.1.11
Security improvements
- Improved the Twig security policy (blocked methods that write, delete, or modify records and attributes in Database/Eloquent and Halcyon models; blocked access to the theme datasource; prevented extensions from being created or directly interacted with). See GHSA-xhw3-4j3m-hq53 for more information.
Full Changelog: v1.1.10...v1.1.11
v1.0.476
Security improvements
- Improved the Twig security policy (blocked methods that write, delete, or modify records and attributes in Database/Eloquent and Halcyon models; blocked access to the theme datasource; prevented extensions from being created or directly interacted with). See GHSA-xhw3-4j3m-hq53 for more information.
Full Changelog: v1.0.475...v1.0.476
v1.2.7
UX/UI Improvements
- Added support for
showTotalsoption for Lists andsummableoption for columns of type: number to render the totals on a per page and per query basis in the Lists widget. - Added new
user:createCLI command to create a new backend user from the CLI. - Checkbox lists will now show all of their options, even when disabled or in read-only mode.
- Visiting the backend login page will now redirect to the backend dashboard if the user is already logged in.
- Added additional warning about disabling debug mode in production to the
config/app.phpfile. - Added additional configuration checks to the Status dashboard widget.
- Improved the UX of drag and drop sorting of tree views.
- Disabled autocomplete on
passwordandsensitivefield types by default. - Fixed minor box shadow issue with the recordfinder clear button.
- Made the entire
fileuploadfield clickable in single file mode. - Made the entire
recordfinderfield clickable and added translation support for the default prompt. - Repeater items can now be extended by clicking on their title rather than just the dropdown arrow.
- Fixed minor styling issues with Select2 inputs.
- Fixed repeater item titles in
previewcontexts.
DX Improvements
- Added support for the Vite asset compiler (see Laravel docs & Winter docs for more information).
- Added new
npm:install,npm:update,npm:runhelper CLI commands. Refer to the docs. - Added new
BundleManagerthat manages the "asset bundles" used by themix:createandvite:createscaffolding commands. - Added support for Laravel-style relations (see wintercms/docs#176)
- Added a simple
.devcontainerfor the Storm library and the main Winter repository. - Added support for "asset prioritization / load ordering" to the
AssetMakertrait through the use of a newordersystem attribute that can be provided. - Added support for project relative paths to the SQLite database.
- Changed the default scaffold for
create:themeto Tailwind - Changed the default asset compiler for the tailwind theme scaffold to vite.
- Added support for all
abort($code)errors to the CMS module, now you can useabort(404)anywhere and get a nice 404 error page. - Added
winter:install,winter:env, andwinter:mirror publicto the default post create project composer scripts. - Improved compatibility with Laravel's
artisan migratecommand by adding support for the--seed&--isolatableoptions. - Added support for using dynamic methods to handle custom list column types.
- Added
create:factorycommand to scaffold model factories in plugins. - Added support for the
--batchableoption to thecreate:jobscaffolder. - Added support for dynamically extending filter scopes even if no scopes have been defined yet.
- Added
--sidebarflag to thecreate:controllerscaffolder to create a controller that uses the sidebar layout for form views. - Fixed display of deleted files when reviewing changes in
winter:version. - Added
--only-version|-ooption flag towinter:versionto display only the version number. - Added new
winter:util purge resizedCLI command to delete all previously cached images from the resizer. - Allowed
create:migrationto be called with the--updateflag even if model does not have afields.yamlto scan.
API Changes
- Added support for
.avifimage files. - Removed the unnecessary Maker class from the core Application container.
- Added support for
$table->dropColumnIfExists()in migrations. - Added support for enabling the Laravel Mix manifest feature.
- Added
File::getMaxUploadSize()andFile::sizeToBytes()helper methods. - Added
File::copyBetweenDisks()andFile::moveBetweenDisks()helper methods. - Added
slaverelationship configuration to theDeferredBindingbase model. - Added
$routePersistanceparameter toPage::resolveMenuItem(). - Removed unnecessary
TableDataprefix from data returned by the Table widget (alsoDataTableformwidget) in AJAX requests. - Added support for translation strings providing options in
FormField->options(). - The Stripe Loader provided by Snowboard.js can now be disabled by setting
data-request-stripeto false. - Added support for command names that include a number.
- Core after login logic (
runMigrationOnLoginand logging to the access log) has been moved to an event listener to more reliabily work across all methods of logging in. - Added a default UserAgent of
Winter Stormto calls made by the Winter HTTP client. - Added a
nestedArray()scope to theNestedTreetrait and atoNestedArray()method to the coreTreeCollectionclass.
Bug Fixes
- Fixed the argument order for
paginate()andsimplePaginate()inBelongsToOrMorphsManyrelationships. - Fixed issue where attempting to use the
SortableScopecould conflict with columns in pivot tables. - Fixed infinite loop when using
HasSortableRelationson a model with a self-referencing relationship. - Restored the previous default value of true for
showPageNumbersin theRelationController'sviewandmanageconfiguration scopes. - Fixed support for empty calls to
date()in Twig. - Fixed issue where FormWidgets would return null even when their raw field values aren't present in the save data.
- Fixed issue with some styling elements in the backend due to the switch of asset compilation systems for the backend styles in 1.2.6.
- Fixed error when using taglist with a single value.
- Fixed issue where the
RelationManagerFormWidget was overriding the default configuration of theRelationControllereven when the overrides were not explicitly set on the field instance. - Fixed issue where creating themes from the backend using the
blankscaffold would fail. - Fixed issue where custom File models could not use string keys (i.e. UUIDs) as their primary key when using the default backend partials.
- Fixed issue where Pivot models were not being properly initialized with their attributes causing problems when the pivot record contained
jsonableattributes used by repeaters / nested forms. - Improved
trace_loghelper's handling of objects - Fixed support for viewing complex (jsonable) pivot data in the RelationController.
- Fixed issue where the job class was generated twice when using
create:jobwith the--syncoption. - Fixed issue where
maxItems: 1didn't work for the first item on repeaters. - Fixed nested form data in Snowboard requests.
- Fixed issue where the Mix webpack config wasn't being removed after it was no longer required.
- Fixed issue where sometimes event listeners for model events would be bound multiple times.
- Disabled the
--relativeflag forwinter:mirroron Windows because Windows doesn't support relative symlinks. - Properly escape the SQLite database path when running
winter:envon Windows.
Security Improvements
- Added the
$requiredPermissionsproperty to the default controller stub used bycreate:controller. - Hardened theme objects, preventing certain properties from being passed through to the ThemeData object.
- Improved the Twig security policy (blocked methods that write, delete, or modify records and attributes in Database/Eloquent and Halcyon models; blocked access to the theme datasource; prevented extensions from being created or directly interacted with). See GHSA-xhw3-4j3m-hq53 for more information.
Translation Improvements
- Improved Latvian translation.
- Improved French translation.
- Improved Russian translation.
Performance Improvements
Winter\Storm\Database\Traits\ArraySourcenow supports using generators to return records in thegetRecords()method.
Community Improvements
- Fixed links to documentation in
composer.json
Dependencies
- Bumped minimum required version of Twig to v3.14 to fix potential security issue.
New Contributors
Full Changelog: v1.2.6...v1.2.7
v1.2.6
UX/UI Improvements
- Improved UX when invalid dates are present in a datepicker field by displaying a warning message and allowing the user to edit those values. Also improved support for date values that use
.as a separator. - Removed the encryption setting from the backend Mail Settings page as it is redundant now.
API Changes
- The
Illuminate\Http\Middleware\HandleCorsmiddleware is now included in the core HTTP kernel by default. In order to start using the CORS support added by this change add theconfig/cors.phpfile to your project and configure it accordingly. - Added
--no-progressand--jsonoptions tomix:compile,mix:watch, &mix:listcommands. - Added support for the List widget's
showPageNumbersinRelationController'sviewandmanageconfiguration scopes. - Added support for logging context data in the backend
EventLog. - Added support for the
array_*()helper functions in the System Twig environment. - The
date()Twig filter and function now run through theSystem\Helpers\DateTimehelper to process them with Carbon.
Bug Fixes
- Fixed an issue where
HasOneThroughandHasManyThroughrelationships were not taking thecountandscoperelationship configuration options into account. - Fixed an issue where
ignore_missingwasn't being respected in thesource()Twig function. - Hidden / disabled fields are no longer excluded from the form data in the Form's
onRefreshhandler.
Dependencies
- Twig has been locked to 3.8 as 3.9 introduces a breaking change. 3.9+ will be supported in the next release.
- FontAwesome has been updated to 6.5.2 and the asset compilation step has been moved to Winter Mix for easier upgrades in the future. This also removes the vendor files for FontAwesome from the repository.
- The customized styles for Select2 in the Winter backend are now compiled to a standalone file (
/modules/system/assets/ui/vendor/select2/css/select2.css).
New Contributors
- @Nimdoc made their first contribution in #1087
- @interworks-morr made their first contribution in #1098
Full Changelog: v1.2.5...v1.2.6
v1.2.5
UX/UI Improvements
- Added support for mass enabling / disabling of permissions in the PermissionEditor FormWidget by clicking on the column headers.
- Added support for
allowCustomin dropdown fields to allow for custom values to be entered by the user. - Added support for
balloon-selectorfields astitleFromsources in Repeaters. - Added support for custom disks in the
winter:util purge uploadscommand. - Removed the unnecessary
<p>tag from the email button partial. - Added disabled state styling for switch fields.
- Added dynamic file extension icons to the Media Manager for files without thumbnails.
API Changes
- Increased the default cache time of CombinedAssets to the 1 year, the current Google recommendation, instead of the previous recommendation of 1 week.
- The
.env.examplefile will no longer be automatically copied to.envon project creation.
Bug Fixes
Winter\Storm\Database\Attach\Filewill now correctly respect the visibility property set on the disk configuration when storing files on the disk.- Improved support for legacy plugins directly using the
October\Rain\Extension\ExtendableTraittrait. - Improved the HTML Helper's
reduceNameHeirachy()method's ability to handle field names from nestedforms. - Fixed support for
dynamicPropertieson PHP 8.2+ by no longer actually setting the properties on the object but instead using the existingdynamicPropertiesstore to manage the values. Event::forget()now also removes prioritized event listeners.- Fixed parameter typing for the
Http::data()method that was causing issues on the Plugin Updates page. - Improved support for reordering records in the backend when the sort order values on the existing records are in an inconsistent state.
- Improved support for PHP 8.2+ by replacing deprecated usage of
${}in strings with{$}. - Improved support for PHP 8.3 in the migration system.
- Improved support for
BackedEnumvalues in theFormField'sisSelected()method. - Improved support for arbitrary depth of
dependsOnin backend fields. - Fixed issue where null values passed to the
mdTwig filters would cause an error.
Translation Improvements
- Added localization support for the System DateTime helper's
timeTense()helper. - Added lang keys to plugin controller scaffolding.
Community Improvements
- Winter CMS is a Community Sponsor of Laracon US 2024.
Dependencies
- Updated jQuery to 3.7.1 and jQuery Migrate to 3.4.1.
New Contributors
- @koesper made their first contribution in #1026
- @Mrkbingham made their first contribution in #1059
Full Changelog: v1.2.4...v1.2.5
v1.2.4
UX/UI Improvements
theme:list,plugin:list, andmix:listnow display nicely formatted tables.- Added support for "grid" repeaters via new
mode: grid,columns, androwHeightoptions. - Added new Asset URL helper to Snowboard.js:
Snowboard.url().asset()that will use the configuredapp.asset_urlvalue to generate URLs to asset files. - Field option values can now be specified as a language key that points to an array of keys & values that will be automatically translated (ex.
options: author.plugin::lang.departments). - The MediaManager's sort type, direction, and view mode are now persisted to the user's preferences keyed by the usage of the media manager (i.e. all mediafinder usages are one key, the main media library is another). This means that the media manager will now remember your preferences between logins and in different contexts. The preferences are still overridden on a per-session, per-instance basis.
- Improved the error message when attempting to register an invalid extension to Twig (i.e. a non-callable extension).
- Added support for overscrolling in the
codeeditorFormWidget via thescrollPastEndoption that allows the editor to scroll past the end of the document by the specified number of lines. - Added a "Refresh" button to the RelationController.
- Toolbar widget will now only render its container HTML when it has at least one sub-widget to display.
- Minor styling improvements to the FileUpload thumbnail styles.
- Added new
RelationManagerFormWidget to simplify rendering theRelationController. - Improved progress bar styling within List widgets.
- Added support for populating migrations created via
create:migrationwith columns defined from the field configuration for the provided model. - Added support for
showSetupin list views of the RelationController. - Added support for scaffolding tests in plugins via the
create:testcommand.
API Changes
- Added the
bootstrap/cachefolder to thewintercms/winterrepo as it is expected to exist by Laravel core commands related to caching. - When running any commands from the CLI while your application has a database connection configured but the
migrationstable is not yet present on it, the application will also be considered in a protected state and only elevated plugins will be loaded. This is to prevent issues with commands that may attempt to access the database before migrations have been run. filterFields()andmodel.filterFields()will now be called immediately before theFormwidget returns the save data ingetSaveData().- New partials have been added to the
RelationControllerto enable more easily extending the default footer used inRelationControllermodals. - The application container will now create cache directories if they don't exist for anything passed to
App::normalizeCachePath(). - Added support for the
event:cache,event:clear, andevent:listcommands. - Added
App::hasDatabaseTable()helper to check if the configured database connection has a specific table. - Added
Model::hasDatabaseTable()andModel->isDatabaseReady()helpers to check if the model's table is present in the model's database connection. - Added
Model->hasAttribute($attribute)helper to check if the provided attribute would be processed by the model'sgetAttributeValue()method (i.e. it exists inattributes, is castable, or has a mutator / accessor). - Added the
json()helper to theHttpnetwork utility class to send requests with a JSON body. - Added support for the
limitproperty on list column relation value queries. develop.debugSnowboardwill no longer fallback to the value ofapp.debug, instead it will default tofalse.CmsObject::listInTheme()will no longer include null entries in the returned list.- Variables shared via
View::share()will now also be shared with CMS Twig templates as global variables. - Added support for appending and prepending datasources to the AutoDatasource.
- Added support for soft deleting Backend User Groups.
- Added new
backend.list.extendColumnsBeforeevent to matchbackend.forms.extendFieldsBefore. - Added new
model.getValidationAttributesevent. - Model event methods (i.e.
afterSave(), etc) will now be bound to and fired by the event dispatcher instead of firing directly. This allows for more flexibility in the order of event listeners and allows for the event to be cancelled before reaching the original model listener method. - Added new
Encryptabledatabase behavior that functions the same as the existing trait but can be dynamically applied to models. - Improved automatic detaching / deletion of relations. Adds support for
deletedAtColumnto relation pivot configurations. - Added support for job batches (originally introduced in Laravel 8).
- Made
Winter\Storm\Support\Svg::sanitize()a public method. - Added support for
Throwableexceptions to theSystemExceptionbase class.
Bug Fixes
- Fixed an issue when attempting to access a
SettingsModelafter the database exists but before any migrations have been run. - Fixed issue where Snowboard.js
extrasweren't being loaded from the configuredapp.asset_urlwhen using custom CDNs. - Mail template style tags are now put in the
<head>element instead of the<body>element. - Snowboard.js will now resolve promises even if the
beforeUpdate()event is cancelled, which provides a way to cancel the updating of partials while still allowing the rest of the request lifecycle to proceed. - Added support for setting
stripe: falsein the options for a Snowboard.js request when the snowboard extras are present to disable the stripe loading indicator for that request. - Fixed an issue where Winter would fail to load on some systems when an
open_basedirrestriction was in place. - Fixed an issue where the Repeater's
formconfiguration wasn't allowingstdClassorstringvalues. - Fixed an issue where recompiling the backend styles would cause the User Impersonation Notice styles to be lost.
- Improved support for
BackedEnumvalues in lists and forms. - Fixed issue where asset URLs weren't being cached by the current host / scheme causing mixed type errors.
- Fixed issue where RichEditor popups (i.e. when inserting links) would open and then rapidly close when interacted with; caused by change events being fired on the editor when the popup was opened.
- Fixed issue where pages with no components would cause a crash when
getComponentProperties()was called. - Fixed issue where the
showTreeconfig value would be cleared when the search term was cleared instead of being preserved. - Fixed issue where installing Winter in certain directories would fail to work.
- The in-memory DB cache will now be cleared when an upsert is performed.
- Improved support for PHP 8.3 with the
Extendabletrait.
Security Improvements
- Added validation to the ColorPicker FormWidget to prevent non-color values from being saved.
- Stored values in the ColorPicker FormWidget will now be escaped before rendering to prevent XSS attacks.
- Files in the Media Manager will now be passed through the
Svg::sanitize()method before being renamed to.svgfiles to prevent potential stored XSS attacks.
Translation Improvements
- Improved Latvian translation.
- Improved Russian translation.
- Improved Turkish translation.
Performance Improvements
- Added indexes to the
sessionstable.
Community Improvements
- Launched the rebuilt version of the WinterCMS.com website and project documentation.
- Automated the generation of the build manifest file for new releases of Winter CMS.
- Added support for Block template files (
.block, see Winter.Blocks) to the Winter CMS VS Code extension. - Added link to get paid support from the core team to the Winter CMS website and repository.
- Improved support for dark mode on the Winter.TailwindUI plugin.
- Core team founded Frostbyte Foundation, Inc.; a non-profit incorporated in Canada to support the Winter CMS project and community.
v1.2.3
UX/UI Improvements
- Display an inspirational quote after generating code files with the
create:*scaffolding commands, can be disabled by passing the--uninspiringoption. InvalidArgumentExceptionexceptions in scaffolding commands are now caught and displayed as an error in the console.- Support for uploading SVGs is now present and enabled by default in the core. SVGs are sanitized on upload to avoid potential XSS attacks.
- Minor improvements to the backend brand settings page on mobile.
- Added a visual indicator to ignored packages when running
artisan mix:list. - Added ability to select the desired theme scaffold to use when scaffolding themes from the backend, also will now automatically pre-fill more fields.
- Migration messages will now be show when running migrations in the console, even if an exception is thrown.
- Finished implementing the
artisan create:migrationcommand, with support for the--version,--create,--update,--table, and--modeloptions. This command supports generating the required versions inupdates/version.yamlnow as well. - A default
.env.examplefile is now included in thewintercms/winterrepository. - Fixed an issue where the
Clearbutton on therecordfinderwasn't visible.
API Changes
- Local extensions are now initialized after all behaviours have been loaded. See wintercms/storm@004159.
- Ignored Mix packages are now excluded from
MixAssets::getPackages()unless the$includeIgnoredargument is true. - Added
getPluginVersions()method to thePluginBaseclass to get a sorted list of the plugin's versions as defined inupdates/version.yaml. cms.beforeRouteis now a halting event in order to enable preventing the CMS catch-all route from being registered.
Bug Fixes
- When updating the sort_order on sortable relations,
find()is now called on the related model directly rather than the Relation object. See wintercms/storm#146. - Fixed issue preventing users from being able to create themes from the backend (Return value must be of type string, null returned).
- Fixed issue with case sensitivity when determining "upload_max_filesize" size.
- Fixed race condition with maxItem limit check after adding a new repeater item
- Fixed issue where keyboards could appear on mobile when attempting to use a datepicker field.
- Fixed issue where an error message was being logged unnecessarily.
- Fixed issue where dynamically switching between multiple themes on the same instance coud result in assets from the wrong theme being loaded.
Security Improvements
- SVGs are now sanitized on upload to avoid potential XSS attacks. See wintercms/winter#GHSA-wjw2-4j7j-6gc3.
Translation Improvements
- Improved Hungarian translation.
Community Improvements
- The Winter.Blocks plugin has been released, offering a visual, block-based content editor for Winter CMS.
- The Winter.Ray plugin now supports loading the Ray configuration through the normal Winter CMS config system rather than requiring a
ray.phpfile to be present in your project root.
Dependencies
winter/stormandwintercms/winternow include PHP 8.2 in their automated test suites.- Support for
symfony/consoleup to6.3has been added.
New Contributors
- @lex0r made their first contribution in #919
- @marvindurot made their first contribution in #939
Full Changelog: v1.2.2...v1.2.3
v1.2.2
UX/UI Improvements
- Added support for Child Themes by defining a theme code in the
parentproperty of a theme's configuration file (theme.yaml). - Added support "virtual" themes (
theme.yamlfiles present in the DatabaseDatasource when using the Database Templates feature). - Added
iconpickerFormWidget with support for custom icon libraries. - Component assets stored in an
assetsdirectory within the component directory will now be mirrored by thewinter:mirrorcommand. - The AJAX form validation feature documented in Snowboard that was missed during the initial implementation of Snowboard is now included by default with the
extraspackage. - Lists can now be sorted by invisible columns.
- The
alert()&error()methods onWinter\Storm\Console\Commandnow implement Laravel's CLI components for rendering messages. - Number of items in a folder in the Media Manager is now correctly pluralized.
- Fixed the icon for the "Return to parent" folder item in the Media Manager.
- Tweaked sizing of the inputs for a
datepickerfield indatetimemode - the date input size has been slightly increased, and the time input size has been slightly decreased, to better fit their respective content. - Checkbox fields marked required will now show the required indicator.
- Fixed issues with the fancy layout styles affecting nested form styles.
- Fixed issue where an empty option element was present when adding a widget to the dashboard.
API Changes
- Vue 3 is now available in the backend via the
window.Vuevariable. - Added new
slugvalidation rule that validates a string as a valid URL slug (alpha-numeric and a defined separator, defaults to-). - Added new
Str::isJson()method to check if a string is valid JSON as well as theis_json()global helper function. - Added new
File::isAbsolutePath()method to theWinter\Storm\Filesystem\Filesystemclass to check if a path is absolute. - Added support for the
modeproperty for themediafinderFormWidget. Supported modes include:image.video,audio,document,file, andall. - Added a new
metadataJSON blob column to thebackend_userstable. - Added support for extending the
headblock in the backend views viaBlock::append('head', $html). - Added
sizeBytesandlastModifiedattributes to media items returned by the Media Manager'sgetItems()JS function. - Added
$formWidgetas a variable made available to partial fields. - Locally defined dynamic methods are now prioritized over behavior-defined methods, allowing you to override behavior methods in your Extendable classes.
- Added support for scoped dynamic code extension. You can now pass
trueas 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. - Added support for local dynamic code extension. You can now call the
extend()method on an instance of an Extendable class to have that extension apply only to that instance of the object. - Refactored backend JS widget loading, added
backend.ui.eventHandlerandbackend.ui.widgetHandlerSnowboard plugins, refactored the IconPicker, ColorPicker, & Sensitive FormWidgets widgets as Snowboard plugins. - Snowboard.js event listeners now support closures.
- A new configuration,
develop.debugSnowboard, has been added toconfig/develop.php, to allow overriding if Snowboard debugging and console logging is enabled, independent of theapp.debugsetting. - Added support for the
RESTRICT_BASE_DIRenvironment variable to control thecms.restrictBaseDirconfig setting. - The
contentfunction in Twig now can return a boolean, thus allowing usage as a conditional for fallback content if a content file does not exist. - The
Markdownparser now uses the CommonMark library by the PHP League, as this library is already a Laravel dependency. - A
$settingsCacheTtlproperty may be provided for models that implement theSettingsModelbehavior. 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). - Split the
render()method ofWinter\Storm\Halcyon\Processors\SectionParserinto three methods (renderSettings(),renderCode(), andrenderMarkup()) as well as added three methods for parsing the sections (parseSettings(),parseCode(), andparseMarkup()). This makes it much easier to extend theSectionParserto build customer parsers. Demonstrated in the Winter.Blocks plugin. - Added support for setting the cache key per instance of the AutoDatasource.
- Refactored the
ClassLoaderto support PSR-4 autoloading for packages added via theautoloadPackage($namespace, $path)method (modules & plugins). The old method of lowercase folders with proper case files is still supported as well.
Bug Fixes
- Refactored the
Winter\Storm\Support\Traits\Singletontrait 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). - Fixed an issue where
add()andremove()methods on theWinter\Storm\Database\Concerns\BelongsToOrMorphsToManyrelation were passing the model key instead of the model instance to theattach()anddetach()methods. - Fixed an issue with generating thumbnails on disks with custom
rootpaths, also simplified the logic for generating thumbnails. - Improved support for multiple database connections in a single Winter project by using the parent model's connection when creating a new model instance from a relation, specifically when using Deferred Binding.
- Fixed support for class castable attributes on models.
- Fixed support for
artisan route:cache. - Fixed issue where the
FormBuilderwould generate elements with emptyidattributes. - Improved support for asset URLs in multiple places.
- Fixed incorrect return type for the
onLoadMovePopup()MediaManager AJAX handler. - Fixed the usage of POST arrays when using the original AJAX framework, which sometimes were incorrectly collated by the nested parent forms functionality implemented in Winter v1.2.0.
- Fixed
dependsusage in the Inspector widgets forobjectandobjectlistfields. - Fixed issue where fields with the
slugorcamelpreset tools enabled wouldn't respect the max length of the field. - Fixed issue where backend permissions weren't being registered when in any context other than the backend.
- Fixed numerous instances of the
Appfacade being used instead of the local reference to theappinstance which should improve support for multiple instances of Winter CMS in the same PHP process. - Fixed issue where contextual fields (
name@context) could not be removed viaremoveField('name'). - Fixed issue with the embedded JSON attribute parser treating datetime values as floats.
- Fixed incorrect usage of the
plugin:installcommand inside thewinter:installcommand, due to a change in the former command's parameters. - Removed Winter.Drivers as a recommended plugin to install when running
winter:install. - Fixed incorrect URLs being returned by the
System\Models\File::getPublicPath()method if the storage being used was not a local file storage.
Security Improvements
Translation Improvements
- Improved Russian translation.
- Improved Ukrainian translation.
- Improved Latvian translation.
- Improved French translation.
- Improved Italian translation.
- Improved Slovak translation.
Performance Improvements
- Improved the performance of resolving the active theme in cases where there are a lot of themes present or "virtual" themes are being used.
Community Improvements
- Added Emmet support to Winter CMS template files with the official Winter CMS plugin for VS Code.
- Improved examples in documentation for extending forms via the
form.extendFieldsBeforeandform.extendFieldsevents. - The
\TestCasealias 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.
Dependencies
- Replaced the dependency on
erusev/parsedownanderusev/parsedown-extrawithleague/commonmarkfor the Markdown parser which was already included by Laravel and improves compliance with the CommonMark specification. - Testing suite is now running on PHP 8.0, 8.1, & 8.2 across Ubuntu & Windows.
- Updated
wikimedia/composer-merge-pluginto~2.1.0to allow for thereplaceconfiguration of dependencies to be merged together.
New Contributors
- @teranode made their first contribution in #806
- @wpjscc made their first contribution in #841
- @xitara made their first contribution in #858
- @webbati made their first contribution in #869
- @zaxbux made their first contribution in #890
- @djpa3k made their first contribution in #911
Full Changelog: v1.2.1...v1.2.2