Releases: wintercms/winter
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\HandleCors
middleware 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.php
file to your project and configure it accordingly. - Added
--no-progress
and--json
options tomix:compile
,mix:watch
, &mix:list
commands. - Added support for the List widget's
showPageNumbers
inRelationController
'sview
andmanage
configuration 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\DateTime
helper to process them with Carbon.
Bug Fixes
- Fixed an issue where
HasOneThrough
andHasManyThrough
relationships were not taking thecount
andscope
relationship configuration options into account. - Fixed an issue where
ignore_missing
wasn't being respected in thesource()
Twig function. - Hidden / disabled fields are no longer excluded from the form data in the Form's
onRefresh
handler.
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
allowCustom
in dropdown fields to allow for custom values to be entered by the user. - Added support for
balloon-selector
fields astitleFrom
sources in Repeaters. - Added support for custom disks in the
winter:util purge uploads
command. - 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.example
file will no longer be automatically copied to.env
on project creation.
Bug Fixes
Winter\Storm\Database\Attach\File
will 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\ExtendableTrait
trait. - Improved the HTML Helper's
reduceNameHeirachy()
method's ability to handle field names from nestedforms. - Fixed support for
dynamicProperties
on PHP 8.2+ by no longer actually setting the properties on the object but instead using the existingdynamicProperties
store 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
BackedEnum
values in theFormField
'sisSelected()
method. - Improved support for arbitrary depth of
dependsOn
in backend fields. - Fixed issue where null values passed to the
md
Twig 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:list
now display nicely formatted tables.- Added support for "grid" repeaters via new
mode: grid
,columns
, androwHeight
options. - Added new Asset URL helper to Snowboard.js:
Snowboard.url().asset()
that will use the configuredapp.asset_url
value 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
codeeditor
FormWidget via thescrollPastEnd
option 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
RelationManager
FormWidget to simplify rendering theRelationController
. - Improved progress bar styling within List widgets.
- Added support for populating migrations created via
create:migration
with columns defined from the field configuration for the provided model. - Added support for
showSetup
in list views of the RelationController. - Added support for scaffolding tests in plugins via the
create:test
command.
API Changes
- Added the
bootstrap/cache
folder to thewintercms/winter
repo 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
migrations
table 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 theForm
widget returns the save data ingetSaveData()
.- New partials have been added to the
RelationController
to enable more easily extending the default footer used inRelationController
modals. - 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:list
commands. - 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 theHttp
network utility class to send requests with a JSON body. - Added support for the
limit
property on list column relation value queries. develop.debugSnowboard
will 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.extendColumnsBefore
event to matchbackend.forms.extendFieldsBefore
. - Added new
model.getValidationAttributes
event. - 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
Encryptable
database 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
deletedAtColumn
to 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
Throwable
exceptions to theSystemException
base class.
Bug Fixes
- Fixed an issue when attempting to access a
SettingsModel
after the database exists but before any migrations have been run. - Fixed issue where Snowboard.js
extras
weren't being loaded from the configuredapp.asset_url
when 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: false
in 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_basedir
restriction was in place. - Fixed an issue where the Repeater's
form
configuration wasn't allowingstdClass
orstring
values. - Fixed an issue where recompiling the backend styles would cause the User Impersonation Notice styles to be lost.
- Improved support for
BackedEnum
values 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
showTree
config 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
Extendable
trait.
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.svg
files to prevent potential stored XSS attacks.
Translation Improvements
- Improved Latvian translation.
- Improved Russian translation.
- Improved Turkish translation.
Performance Improvements
- Added indexes to the
sessions
table.
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--uninspiring
option. InvalidArgumentException
exceptions 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:migration
command, with support for the--version
,--create
,--update
,--table
, and--model
options. This command supports generating the required versions inupdates/version.yaml
now as well. - A default
.env.example
file is now included in thewintercms/winter
repository. - Fixed an issue where the
Clear
button on therecordfinder
wasn'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$includeIgnored
argument is true. - Added
getPluginVersions()
method to thePluginBase
class to get a sorted list of the plugin's versions as defined inupdates/version.yaml
. cms.beforeRoute
is 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.php
file to be present in your project root.
Dependencies
winter/storm
andwintercms/winter
now include PHP 8.2 in their automated test suites.- Support for
symfony/console
up to6.3
has 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
parent
property of a theme's configuration file (theme.yaml
). - Added support "virtual" themes (
theme.yaml
files present in the DatabaseDatasource when using the Database Templates feature). - Added
iconpicker
FormWidget with support for custom icon libraries. - Component assets stored in an
assets
directory within the component directory will now be mirrored by thewinter:mirror
command. - The AJAX form validation feature documented in Snowboard that was missed during the initial implementation of Snowboard is now included by default with the
extras
package. - Lists can now be sorted by invisible columns.
- The
alert()
&error()
methods onWinter\Storm\Console\Command
now 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
datepicker
field indatetime
mode - 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.Vue
variable. - Added new
slug
validation 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\Filesystem
class to check if a path is absolute. - Added support for the
mode
property for themediafinder
FormWidget. Supported modes include:image
.video
,audio
,document
,file
, andall
. - Added a new
metadata
JSON blob column to thebackend_users
table. - Added support for extending the
head
block in the backend views viaBlock::append('head', $html)
. - Added
sizeBytes
andlastModified
attributes to media items returned by the Media Manager'sgetItems()
JS function. - Added
$formWidget
as 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
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. - 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.eventHandler
andbackend.ui.widgetHandler
Snowboard 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.debug
setting. - Added support for the
RESTRICT_BASE_DIR
environment variable to control thecms.restrictBaseDir
config setting. - The
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. - The
Markdown
parser now uses the CommonMark library by the PHP League, as this library is already a Laravel dependency. - A
$settingsCacheTtl
property may be provided for models that implement theSettingsModel
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). - Split the
render()
method ofWinter\Storm\Halcyon\Processors\SectionParser
into 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 theSectionParser
to build customer parsers. Demonstrated in the Winter.Blocks plugin. - Added support for setting the cache key per instance of the AutoDatasource.
- Refactored the
ClassLoader
to 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\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). - Fixed an issue where
add()
andremove()
methods on theWinter\Storm\Database\Concerns\BelongsToOrMorphsToMany
relation were passing the model key instead of the model instance to theattach()
anddetach()
methods. - Fixed an issue with generating thumbnails on disks with custom
root
paths, 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
FormBuilder
would generate elements with emptyid
attributes. - 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
depends
usage in the Inspector widgets forobject
andobjectlist
fields. - Fixed issue where fields with the
slug
orcamel
preset 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
App
facade being used instead of the local reference to theapp
instance 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:install
command inside thewinter:install
command, 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.extendFieldsBefore
andform.extendFields
events. - The
\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.
Dependencies
- Replaced the dependency on
erusev/parsedown
anderusev/parsedown-extra
withleague/commonmark
for 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-plugin
to~2.1.0
to allow for thereplace
configuration 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
v1.2.1
UX/UI Improvements
- Added support for streaming file uploads directly to S3 storage disks via the
stream_uploads
option on the disk configuration. Requires the Winter.DriverAWS plugin. - Added support for the
data-request-parent
attribute to the AJAX framework, allowing AJAX requests to include the data from the elements that spawned them which allows for highly complex workflows where popups spawn popups and then those popups need to call their own AJAX handlers but the page previously didn't know to initialize them without their parent data being present. This fixes support of the RecordFinder inside of popups like the RelationController's update & pivot forms as well as the FileUpload's description form popup inside of other popups. - Switched the
winter:up
/migrate
commands to use the new Laravel CLI components for improved output formatting. - Added support for
type: range
Form fields. - Added support for the
conditions
property on List Columns with a relationship defined via therelation
property. - Added support for changing an image's extension / file type when using the ImageResizer to resize the image.
- Added support for ignoring specific Mix packages to avoid including third-party Mix packages in your application's
package.json
unnecessarily. - Clicking the label of a
switch
field will now toggle the switch. - Increased the width of the crop dimension inputs when cropping or resizing an image in the Media widget.
- Standard HTML flash messages that are converted to JavaScript flash messages through Snowboard are now removed once converted, to prevent the original message from remaining even after the flash message is dismissed.
- The autogenerated password for the default administrator account is now displayed in the
winter:install
command output and can be changed through the wizard. - Documented
app.tempPath
configuration option. - Added
winter:password
as an alias forwinter:passwd
. - Minor CSS improvements.
API Changes
- Removed the default
maxlength
of 255 fromtype: text
Form fields. - The
twig.environment.cms
Twig environment is no longer provided as a singleton, instead being generated on each request toApp::make()
. This helps to avoid conflicts when calling the CMS controller multiple times in the same request. - Deprecated the
Winter\Storm\Database\Behaviors\Purgeable
behavior as thePurgeable
trait is now included by default on all Winter models. - Added the
backend.formwidgets.fileupload.onUpload
event to allow for custom handling of file uploads in the FileUpload FormWidget. - Added the
backend.widgets.uploadable.onUpload
event to allow for custom handling of file uploads in the widgets that implement theBackend\Traits\UploadableWidget
trait. - Added the
formwidgets.fileupload.initUploader
Snowboard global JS event to allow for interacting with the FileUpload's JS uploader instance. - Added the
formwidgets.richeditor.init
Snowboard global JS event to allow for interacting with the RichEditor's JS editor instance. - Added the
widgets.mediamanager.initUploader
Snowboard global JS event to allow for interacting with the MediaManager's JS uploader instance. - Switched visibility of
getRelationModel()
from protected to public on theBackend\Traits\FormModelWidget
trait. - Switched visibility of
getOptionsFromModel()
from protected to public on theBackend\Widgets\Form
widget. - Added the following methods to the
Backend\Traits\UploadableWidget
trait to make it easier to customize upload behaviour:uploadableGetDisk()
uploadableGetUploadPath()
uploadableGetUploadUrl()
- Added the following model relation events:
model.relation.beforeAdd($relationName, $relatedModel)
model.relation.afterAdd($relationName, $relatedModel)
model.relation.beforeRemove($relationName, $relatedModel)
model.relation.afterRemove($relationName, $relatedModel)
model.relation.beforeAssociate($relationName, $relatedModel)
model.relation.afterAssociate($relationName, $relatedModel)
model.relation.beforeDisassociate($relationName)
model.relation.afterDisassociate($relationName)
- A new
mix:run
Artisan command has been added to allow scripts defined in thepackage.json
file of a Mix package to be run easily through the CLI. You can find the documentation here. - The AJAX framework and Snowboard framework now both enforce either a class name dot (
.
) or an ID hash (#
) to be prefixed to any partials that are to be updated in an AJAX response. This includes any mapped selectors. - Snowboard JavaScript AJAX requests now accept two or three parameters, similar to the old framework. When using two parameters, the user only needs to specify the handler and options - it is assumed in this case that the AJAX requests is detached and not tied to an element.
- Added
Winter\Storm\Database\Traits\HasSortableRelations
trait to make it easier to sort related records on a model. - Added support for
**
as a wildcard when setting the application's trusted proxies. This was originally supported infideloper/trustedProxy
but was removed without explanation in Laravel 5.6.*
will trust the currently requesting IP address,**
will trust all proxies in a chain of proxies (often required if you are behind something like CloudFront and another proxy). This was required for retrieving the correct Client IP address when using Laravel Vapor. - Properties added to Model instances via
addDynamicProperty()
are now automatically added as purgeable attributes to prevent them from being saved to the database. - Added the
Arr::moveKeyToIndex($array, $targetKey, $index)
helper method to make it easier to move a specific array element to the specified index. - Added the
Str::unique($str, $items, $separator, $step)
helper method that ensures the provided string will be unique when compared to the provided array by adjusting the string with the separator & step as necessary. Useful for filename deplication or other deduplication of unique references. - Added the
Str::join($items, $glue, $lastGlue, $dyadicGlue)
helper method to join an array of items with a glue string, optionally using a different glue string for the last item and for the dyadic item case (only two items). By default this applies the "Oxford / Serial Comma" gramatical construct when listing items. - Added the
fromStorage()
helper method to theWinter\Storm\Database\Attach\File
model class in order to create a new file record from a file path that already exists on the file model's storage disk. - Added new
Winter\Storm\Console\Traits\HandlesCleanup
trait to the base WinterCommand
class that makes it easier to implement cross-platform cleanup logic on your CLI commands when process termination signals are received. - Added support for root level paths in the Halcyon DbDatasource, required for Child Theme support.
- Added support for exit codes in
mix:compile
. Also added support for the--silent
,--stop-on-error
, and--manifest
flags.
Bug Fixes
- The
winter:test
command now automatically uses the correct bootstrap file for unit testing, irrespective of thebootstrap
configuration in any plugin or module'sphpunit.xml
file, to assist users migrating their unit tests to Winter 1.2. - Fixed issue where plugins weren't being correctly sorted by their dependencies when depending on a plugin that registers itself as a replacement which could cause migrations to run in the incorrect order.
- Fixed typo in the MediaManager widget that was preventing SVGs from displaying their previews in the sidebar.
- Fixed issue when attempting to generate a TailwindCSS theme scaffold on a case sensitive file system.
- Fixed mismatching method signature on AutoDatasource->lastModified() that could cause issues when using DatabaseTemplates in v1.2.
- Fixed issue where MorphedByMany relationships would use the wrong class name when building queries.
- Removed an override to the
Input::all()
facade method, which prevented files from being included in the result, breaking previous behaviour. - Removed an extra
0
that was left over innumberrange
filter partials. - Fixed an issue where only the last component would be saved in a CMS template due to the framework not correctly processing arrayed POST data.
- Fixed an issue with the
winter:fresh
command where the demo plugin was not removed and an error message was shown. - The Array Source trait will no longer attempt to save a temporary SQLite DB if storage is disabled via setting
$cacheArray
tofalse
. - Fixed an issue where custom AJAX error responses were being mangled by the Snowboard Request class, before sending off to the error handlers. If an error does not appear to be a PHP exception with an exception class and message, it will now pass through the response untouched (but still be considered an error response).
- Fixed an issue where the File model's
fromUrl()
method would not correctly determine the file's mimeType if the file was delivered with aContent-Type
header that was incorrectly capitalized. - Fixed an issue where migrations using anonymous classes could not be run more than once in a single process.
- Fixed support for the Laravel
ClassName@method
syntax for event listeners. - Fixed issue where custom pivot models were not being used when using the
attach
method on a BelongsToMany relationship. - Fixed support for queueing emails (was broken by a change in Laravel 7 that was missed in the Winter v1.2 upgrade).
- Fixed support for hidden files in Zip folders on systems without support for GLOB_BRACE (Solaris, Alpine Linux, etc).
- Fixed issue that occurred when attempting to dynamically add HasOneThrough|HasManyThrough relations to models.
...
v1.1.10
Security Improvements
- Prototype hardening has been implemented on the Snowboard framework to prevent prototype pollution. You may read the security advisory for more information.
Community Improvements
- The image resizer tests have been re-done in order to more accurately test image resizing in Winter. The tests themselves will generate artifacts that can be reviewed as a ZIP file if the tests fail.
v1.2.0
See the Upgrade Guide for a quick highlight of any potentially required changes in your code in order to be compatible with Winter CMS v1.2+. Although the upgrade should be relatively painless it is still worth taking a quick look to verify that you are not affected by any of the relatively few breaking changes.
Due to the significant number of changes in 1.2, they are grouped by section rather than category for this release note.
- Dependencies
- Community Improvements
- CLI & Console Commands
- Project Configuration & Helper Files
- Testing
- Plugin Manager
- Backend UI & UX
- Media Manager & Image Resizing
- Themes
- Twig
- Events
- Database
- Filesystem
- Modules
- Internals
Dependencies
- Minimum version of PHP bumped from PHP 7.2.9 to PHP 8.0.2
- Laravel upgraded from 6.x LTS to 9.x
- Twig upgraded from 2.x to 3.x
- Minimum version of Laravel Tinker bumped to 2.7
- Minimum version of PHPUnit bumped to 9.5.8
- Minimum version of Mockery bumped to 1.4.4
- Symfony ugpraded from 4.x to 6.x
- Symfony/Yaml upgraded from 3.4 to 6.0
- Assetic upgraded from the modified embedded version of 1.4.0 to 3.0 as an external dependency.
Community Improvements
Over the past year as we have been working on the Laravel 9 upgrade we have released a number of plugins, themes, and development tools designed to further enhance the Winter CMS developer experience.
First Party Plugins:
The following first party plugins were released / revamped:
- Winter.TailwindUI - TailwindUI-based skin for the backend.
- Winter.Search - Enables full-text search capabilities in Winter.
- Winter.Redirect - Manage redirects.
- Winter.Docs - Manages & displays documentation from various sources within your Winter projects.
- Winter.Matomo - Integrates the open source Matomo Analytics platform into Winter.
- Winter.DriverAWS - Driver plugin that adds support for AWS to Winter.
- Winter.DriverMailgun - Driver plugin that adds support for Mailgun to Winter.
- Winter.DriverMandrill - Driver plugin that adds support for Mandrill to Winter.
- Winter.DriverPostmark - Driver plugin that adds support for Postmark to Winter.
- Winter.DriverSendGrid - Driver plugin that adds support for SendGrid to Winter.
- Winter.DriverSparkPost - Driver plugin that adds support for SparkPost to Winter.
First Party Themes:
The following first party themes were released:
- Nabu - Theme designed for documentation sites using the powerfull Winter.Docs & Winter.Search plugins.
- Workshop - TailwindCSS-built theme for testing first party plugins.
VSCode Extension:
The official Winter CMS VSCode extension was released which provides code completion and syntax highlighting for Winter CMS projects.
CLI & Console Commands
A number of improvements have been made to the console commands available out of the box with Winter as well as the developer experience for working with the CLI in general. In addition to these improvements, the Console documentation has been updated and enhanced, click here to read the docs.
- Autocompletion
- Improved Support for Laravel-provided commands
- New Winter\Storm\Console\Command base class and helpers
- Scaffolding Improvements
- Bug Fixes
Autocompletion
- Added support for autocompletion for all Winter provided CLI commands.
- Added
complete()
function to thecreate:command
Command scaffolding for providing autocompletion in console commands. (runartisan completion --help
to setup autocompletion in your terminal) - Added autocompletion support to the following commands:
plugin:disable $name
plugin:enable $name
plugin:refresh $name
plugin:rollback $name $rollbackVersion
winter:passwd $username
(last 20 updated backend users)
Improved Support for Laravel provided commands
- Added
migrate
as an alias towinter:up
to simplify transitioning to Winter from Laravel - Laravel's migration commands have been removed / aliased to the relevant Winter commands as they did not function with Winter and never have.
- Version number reported by
artisan --version
will now includeWinter CMS
. route:list
androute:cache
now support module routes out of the box.- Fixed issue where the
key:generate
command wouldn't set theAPP_KEY
value in the.env
file if the.env
file didn't exist yet.
New Winter\Storm\Console\Command base class and helpers
- Added
Winter\Storm\Console\Command
base class that adds helpers for making it easier for commands to implement suggested values for autocompletion. - Added
alert()
helper to the WinterCommand
base class that improves on the Laravel default by adding support for wrapping long alert messages to multiple lines. - Added
Winter\Storm\Console\Traits\ConfirmsWithInput
trait provides theconfirmWithInput($message, $requiredInput)
method to require the user to input the required input string in order before proceeding with running the command. - Added
Winter\Storm\Console\Traits\ProcessesQuery
trait that provides aprocessQuery($query, $callback, $chunkSize, $limit)
method that simplifies the process of processing large numbers of records in console commands by handling creating and updating a progress bar, chunking the provided query by the provided chunk size and limit parameters, running the callback for each record, and gracefully handling any exceptions thrown during the processing of records.
Scaffolding Improvements
- Added
create:job Author.Plugin JobName
scaffolding console command to create an initial Job class - Added new
scaffold
argument tocreate:theme
command, defaults toless
; also supportstailwind
. - Moved all scaffolding commands out of
Winter\Storm
and into their relevant Modules (Backend
,CMS
, &System
). - Added
$nameFrom
property andgetNameInput()
method to theWinter\Storm\Scaffold\GeneratorCommand
to enable checking for reserved names when generating code via scaffolding commands. Also made some method signature type hint changes to the class, be sure to review and apply them accordingly in any custom uses of that base class. - Removed
getPluginIdentifier()
method from theWinter\Storm\Scaffold\GeneratorCommand
class and added a new base class for scaffolding resources that are specific to plugins:System\Console\BaseScaffoldCommand
. - Added support for autocompletion of the
plugin
argument for scaffolders that extendSystem\Console\BaseScaffoldCommand
. - Added
System\Console\Traits\HasPluginInput
trait that provides helpers for when a console command interacts with plugin names as input arguments. - Added support for generating localization messages by calling a
getLangKeys()
method defined on the scaffolding command during the execution process. This method can use the$this->vars
property and$this->laravel->getLocale()
method to return an associative array of message keys without the author prefix and their values for the current locale. - Added several helpers in the scaffolding template files:
plugin_id
-> lowercase version of a plugin's identifierplugin_code
-> Studly case version of the plugin's identifierplugin_url
->author/plugin
, used inBackend::url()
callsplugin_folder
->author/plugin
, used when generating paths to files with the$
plugins directory path symbol or the~
application path symbol.plugin_namespace
-> Studly case version of the plugin's identifier in namespace form (i.e.Author\Plugin
)
Bug Fixes
- Added ability for the
mix:watch
command to clean up after itself when terminated with SIGTERM. winter:version
will now only normalize file contents before hashing if the file is a valid text-based file which improves the reliability of change detection on Windows.- Fixed issue where running
winter:version --changes
would always display "We have detected the following modifications:" even when no modifications were detected. winter:passwd
now returns the status codes instead of usingexit($code)
- Fixed issue where if the underlying data behind a datasource changes through manual intervention (either in the database or ...
v1.1.9
UX/UI Improvements
- The base Snowboard framework has been included in the Backend by default, allowing people to use Snowboard requests and included functionality in their plugin's backend pages if they wish. Please see #548 for more information on what is included.
- Dates displayed on the Theme Logs & Event Logs pages in the backend now display in the current user's preferred locale & timezone.
API Changes
- Dependency checking and management for Snowboard plugins has been improved. Singletons that have a
ready
callback will not be fired until dependencies are loaded. - Added a
flash.create
andflash.remove
global event in Snowboard to listen when a flash message is created and removed, respectively. - Added URL handling and base URL detection in Snowboard via the
Snowboard.url()
plugin. - Added
sortable
property to the Repeater FormWidget, defaults totrue
. - Added a
mix:update
command to allow updating of Node dependencies for Mix assets. - Added support for
type: nestedform
fields to theThemeData
theme customization forms. - Added helper methods for Snowboard event listening - the
on
method registers a simple listener for a Snowboard event, theoff
de-registers the listener. Theready
method is a shortcut method that registers a listener for when the DOM is ready, synonymous with$(document).ready()
in jQuery. - Added an Asset Loader component for Snowboard, which is now included in the extras and allows simple loading of script, style and image assets on the fly.
- Added a Data Configuration component for Snowboard, which is now included in the extras and allows widgets to retrieve configuration from an element's data attributes, similar to the current widgets within Winter CMS.
- Added the public flag
trimStringAttributes
toWinter\Storm\Database\Model
to make it possible to disable the default behaviour of automatically trimming string attribute values on model instances.
Bug Fixes
- Improved support for read-only filesystems by using the Storage facade to handle the disabled plugins cache file instead of directly interacting with the local disk and checking if the local filesystem is writable before attempting to create the temporary directory required by the
UpdateManager
. - Fixed the System Status dashboard widget on read-only filesystems.
- Fixed issue where calling
Snowboard.request()
with the element parameter set to false or null would fail. - Fixed issue where changes made to
$this->vars
in a Partial's PHP code section wouldn't be available in the Twig section. - Fixed issue where a Snowboard plugin that had been removed could not be re-added.
- Backported a fix from the 1.2 branch which resolves timeout issues with the
mix:install
command. - Fixed issue where using the
useRelationCount
option with a relation in a List widget would not retrieve the count if the relation name was not snake-cased. - Fixed an issue where passing configuration that had been generated by
$this->makeConfig()
to aReportContainer
would cause it to fail to initialize. - Fixed missing variable in error message with
mix:watch
command if packages are missing from the overall workspace. - Fixed issue where Snowboard requests in the Backend did not include the CSRF token.
- Fixed issue where using a time limit with
data-track-input
in Snowboard for input debouncing was being overwritten on entering a value due to misnamed variable. - Fixed issue where any value returned by a success or error callback in Snowboard would prevent further execution (including no value); instead of just preventing execution on receiving a value of
false
. - Fixed issue where string values (query selectors) were not able to be provided as the
data-request-form
attribute to Snowboard as it was requiring an instance of an element. - Fixed issue where passing an already URL-encoded string to the UrlGenerator could cause its query parameter keys to become double encoded, disrupting the original data structure.
Security Improvements
- Improved reliability of the CMS Safe Mode feature. See GHSA-q37h-jhf3-85cj for more information
- Improved reliability of
Winter\Storm\Database\Attach\File->fromData()
. See GHSA-8v7h-cpc2-r8jp for more information.
Translation Improvements
- Improved German translation
- Improved Spanish translation
- Improved Farsi translation
Community Improvements
- Fixed file language hinting for backend controller views for VS Code
Dependencies
- The Winter core modules now report via composer that they replace the associated version of the October core modules to improve compatibility with the October ecosystem.
New Contributors
- @der-On made their first contribution in #457
- @marcomessa made their first contribution in #485
- @davidlueder made their first contribution in #563
- @multiwebinc made their first contribution in #603
v1.0.475
Security improvements backported from v1.1:
Security Improvements
- Improved reliability of the CMS Safe Mode feature. See GHSA-q37h-jhf3-85cj for more information.
- Improved reliability of
Winter\Storm\Database\Attach\File->fromData()
. See GHSA-8v7h-cpc2-r8jp for more information.
Dependencies
- The Winter core modules now report via composer that they replace the associated version of the October core modules to improve compatibility with the October ecosystem.