The following commands are utility commands available on Winter installations.
php artisan winter:test [--core] [--plugin=] [--configuration=]The winter:test command runs the unit tests for the entire project, a specific plugin, or the Winter core.
To run the entire project's unit tests:
php artisan winter:testOr, to run only the core unit tests, use the -o or --core option:
php artisan winter:test -oTo run a specific plugin's tests, use the -p or --plugin= option:
php artisan winter:test -p Acme.DemoTo run a custom test suite, use the -c or --configuration= option:
php artisan winter:test -c ./custom-path/phpunit.xmlIf using additional PHPUnit parameters / options, they must be included after the winter:test command's options:
php artisan winter:test -p Acme.Demo --filter=FilteredTest --stop-on-failureThe winter:sniff command allows you to check source code against the Winter CMS code style guidelines as set forth in the Developer Guide to ensure consistent code formatting. It uses the PHP_CodeSniffer library under the hood.
php artisan winter:sniff [--plugin=] [--configuration=]By default, this code style check will run in all core files. To test a plugin, you may use the -p or --plugin= option and provide the plugin code:
php artisan winter:sniff -p Acme.DemoIf the plugin or core files do not contain a phpcs.xml configuration file for the code checker, you will be prompted to create one automatically.
If you wish to use a custom configuration for PHP_CodeSniffer, you can specify the path with the -c or --configuration= option:
php artisan winter:sniff -c ./custom-path/phpcs.xmlBy default, warnings and errors will both be shown if detected in any source code. You can suppress warnings by using the -e or --no-warnings option.
php artisan winter:sniff -eIf you wish to show only a summary (a list of files with a count of warnings and/or errors), you may use the -s or --summary option.
php artisan winter:sniff -swinter:util - a generic command to perform general utility tasks, such as cleaning up files or combining files. The arguments passed to this command will determine the task used.
Outputs combined system files for JavaScript (js), StyleSheets (less), client side language (lang), or everything (assets).
php artisan winter:util compile assets
php artisan winter:util compile lang
php artisan winter:util compile js
php artisan winter:util compile lessTo combine without minification, pass the --debug option.
php artisan winter:util compile js --debugThis will execute the command git pull on all theme and plugin directories.
php artisan winter:util git pullDeletes all generated thumbnails in the uploads directory.
php artisan winter:util purge thumbsDeletes files in the uploads directory that do not exist in the "system_files" table.
php artisan winter:util purge uploadsDeletes records in "system_files" table that do not belong to any other model.
php artisan winter:util purge orphansTo also delete records that have no associated file in the local storage, pass the --missing-files option.
php artisan winter:util purge orphans --missing-files