php yii sail/install
php yii sail/add
./vendor/bin/sail ...
or.. use this nice alias from the Laravel Sail Documentation:
alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
to then use it like
sail ...
(from the root folder of the project)
- Refactoring:
- Removed as many Laravel dependencies as possible (there's no need for the framework here)
- Switched from
Illuminate\Console\Command
to low-level Symfony Commands - Path references updated to the
muffin-hayate/yii-sail
absolute vendor path
- Added configurations (
config/params.php
&composer.json > extras
) necessary to register the sail commands in a Yii Application - Changed the start-command for the PHP Application (from
artisan serve
toyii serve
) in the Dockerfiles (PHP Runtimes) - Removed the following Features:
.styleci.yml
preset changed from "laravel" to "psr-12"- all debugging commands removed (these were artisan specific)
artisan
command replaced withyii
commandsail test
moved from PHPUnit to Codeception (specifically thecomposer test
command)dusk
&pint
commands removed (pint is laravel specific, dusk is inferior to codeception imo)sail tinker
command removed (laravel exclusive)- all sharing features removed
- command to publish configuration files removed (laravel exclusive)
- Added the following features:
codeception
command addedpsalm
&rector
commands added
- Thinking about removing the
illuminate/collections
package - Maybe implementing a way to manipulate yii config files when installing / adding a service (like it's done with the
.env
in Laravel Sail) - (likely too complicated because it all depends on external packages etc...) - Adding more hooks into Yii specific functionalities for the sail script (needs more Yii research on my end)
Sail provides a Docker powered local development experience for Laravel that is compatible with macOS, Windows (WSL2), and Linux. Other than Docker, no software or libraries are required to be installed on your local computer before using Sail. Sail's simple CLI means you can start building your Laravel application without any previous Docker experience.
Laravel Sail is inspired by and derived from Vessel by Chris Fidao. If you're looking for a thorough introduction to Docker, check out Chris' course: Shipping Docker.
Documentation for Sail can be found on the Laravel website.
Thank you for considering contributing to Sail! You can read the contribution guide here.
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
Please review our security policy on how to report security vulnerabilities.
Laravel Sail is open-sourced software licensed under the MIT license.