muffin-hayate / yii-sail
Docker files for running a basic Yii application.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 497
Open Issues: 0
Language:Shell
Requires
- php: ^8.0
- illuminate/collections: ^11.36
- laravel/prompts: ^0.3.2
- symfony/process: ^6.0|^7.0
- symfony/yaml: ^6.0|^7.0
- yiisoft/aliases: ^3.0
- yiisoft/yii-console: ^2.2
Requires (Dev)
- phpstan/phpstan: ^1.10
README
Yii Sail
Commands
Install Services
php yii sail/install
Add new Services
php yii sail/add
Use Sail
./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)
Changes
- 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
Perspective / To-Do
- 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)
Introduction
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.
Inspiration
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.
Official Documentation
Documentation for Sail can be found on the Laravel website.
Contributing
Thank you for considering contributing to Sail! You can read the contribution guide here.
Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
Laravel Sail is open-sourced software licensed under the MIT license.