Skip to content

fix: detect all common Docker Compose filenames in Sail check#827

Open
MreeP wants to merge 2 commits into
laravel:mainfrom
MreeP:fix/sail-detect-all-compose-filenames
Open

fix: detect all common Docker Compose filenames in Sail check#827
MreeP wants to merge 2 commits into
laravel:mainfrom
MreeP:fix/sail-detect-all-compose-filenames

Conversation

@MreeP
Copy link
Copy Markdown

@MreeP MreeP commented May 26, 2026

Summary

Sail::isInstalled() only recognized two Docker Compose filenames when deciding whether Sail is installed:

  • docker-compose.yml
  • compose.yaml

this meant the other two filenames that Docker Compose officially supports were missed:

  • compose.yml
  • docker-compose.yaml

As 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/bin

This 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() returned true only when the binary existed and either docker-compose.yml or compose.yaml was present.

After, it returns true when 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 the available flag for the Sail integration. Integrations are then filtered to only the available ones before being shown in the install prompt - so previously, projects using compose.yml or docker-compose.yaml weren't even offered the Sail option. With this change they are.

Tests

Added coverage in tests/Unit/Install/SailTest.php for isInstalled(): 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 true before still does. Selecting Sail in the install prompt remains opt-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant