This implements support for the ImageResizer within the media manager for thumbnail resizing & image cropping. This simplifies and centralizes the image resizing code within the media manager and allows for better support on readonly filesystems by relying on the ImageResizer class to process image modification requests.
Matches the behavior of the ViewMaker in the 1.1 branch more closely by checking if the partial path is a local reference first, returning that path if it is. Only if this check fails will it then run through the view paths.
Fixes https://github.com/wintercms/winter/issues/571
Also fixes the ViewMaker tests by emulating the same behaviour as a web request and having the current directory be the base path of the site, not the directory of the current module or plugin being tested.
This splits the testing suite into the separate modules as appropriate in order to improve the reliability of the testing suite as a whole and make it easier for developers to have an up to date testing suite from the core to build off of. Additionally the tests are now namespaced and some minor improvements to the PluginManager were made.
Now the PluginManager will internally treat plugin identifiers as lower case strings, only transforming them to their normalized versions when requested by methods like getPlugins() & getAllPlugins(). The idea behind this is that it provides a much simpler way to internally handle checking, especially for plugin replacement where casing could cause issues.
Replaces #576. Fixes#575.
This improves the reliability of the cache:clear command by not requiring the custom winter cache directories to exist when running cache:clear.
Also removes the clearing of disabled.json which is no longer used as of 1bbfb67d8c
The "success" and "error" callbacks would previously stop any further request handling from taking place if the handler returned a falsy value, including nothing at all. This is inconsistent with the previous framework and with our docs.
This change makes it so that only an explicit "false" value returned from the "success" or "error" callback will stop the request handling there and then.
Reworked the internal disabled status checking and monitoring system for plugins.
Added better support for plugin disabled status management.
Added improvements to loading (should aid in improving app bootup speed)
https://github.com/wintercms/winter/pull/552 introduced a change where all backend assets are converted to URLs to provide support for the `app.asset_url` configuration variable. This change allows asset decompilation to still work by converting a (local) URL back to a relative path. If a URL doesn't match the root URL, then it is passed through as is with no decompilation taking place.
Fixes https://github.com/wintercms/winter/issues/562.
Commands like php8.1 composer.phar install resulted in a successful installation but failed during the execution of the "post-update-cmd"-Script.
`@php` should fix this (and did it on my environment), according to:
https://getcomposer.org/doc/articles/scripts.md#executing-php-scripts
Previously, Snowboard plugins had been written to append the main JavaScript constructor. While this worked, it prevented the ability to destruct the plugin during construction (ie. prevent double initialisation on plugins, for example), as the "detach" method which is fired on destruction is added *after* construction.
This change abstracts the constructor and destructor to separate methods run after the true construction of the JavaScript object is complete. A bonus is that the constructor no longer needs to include "snowboard" as one of the parameters - this instead is done on the true construction.
This matches the previous behavior from the old framework, and resolves some issues with race conditions. It's not great - but it works for now, until we can have some true dependency resolution with the assets.