StyleCI Blog

Laravel Imports Order

November 01, 2019

On 1st November, the official Laravel code style is changing to order imports alphabetically rather than by length. These changes are going to be applied to all current official Laravel packages, and to Laravel/Lumen 6 and upwards. Laravel 5 will remain on the old code standard, so there are not lots of uneccessary changes to the 5.5 LTS codebase.

In order to support these changes, StyleCI is changing its laravel preset. From today, we have removed the length_ordered_imports fixer from the preset, and added the alpha_ordered_imports fixer. The laravel/laravel default application comes bundled with StyleCI configuration. The Laravel 5 configuration is set up to order imports by length, and the Laravel 6 configuration is set up to order imports alphabetically.

Please do get in touch with us if you have any questions or comments!



© 2023 Graham Campbell Technology Ltd. All rights reserved.