fix: detect all common Docker Compose filenames in Sail check#827
Open
MreeP wants to merge 2 commits into
Open
fix: detect all common Docker Compose filenames in Sail check#827MreeP wants to merge 2 commits into
MreeP wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sail::isInstalled()only recognized two Docker Compose filenames when deciding whether Sail is installed:docker-compose.ymlcompose.yamlthis meant the other two filenames that Docker Compose officially supports were missed:
compose.ymldocker-compose.yamlAs a result, projects using one of those two valid filenames were incorrectly treated as not having Sail installed, even with the Sail binary present in
vendor/binThis PR updates the check to recognize all four filenames that Docker Compose looks for by default
Why
Sail detection should match Docker's behavior - the filename a project happens to use shouldn't change whether Boost detects Sail.
Behavior
Before
isInstalled()returnedtrueonly when the binary existed and eitherdocker-compose.ymlorcompose.yamlwas present.After, it returns
truewhen the binary exists and any of the four supported filenames (listed above) is present.The single call site is
src/Console/InstallCommand.php:251, where the result populates theavailableflag for the Sail integration. Integrations are then filtered to only the available ones before being shown in the install prompt - so previously, projects usingcompose.ymlordocker-compose.yamlweren't even offered the Sail option. With this change they are.Tests
Added coverage in
tests/Unit/Install/SailTest.phpforisInstalled(): a data-driven test asserting detection of all four supported filenames. I've also added cases for a missing compose file and a missing binary.Breaking changes
None. The change is purely additive - every case that returned
truebefore still does. Selecting Sail in the install prompt remains opt-in.