Conversation
Symfony 8 made two breaking changes that Lucid uses: Command::configure() gained a `: void` return type Application::add() removed in favour of addCommand() Adding the return type is a legal narrowing on 5.4/6.4/7.4, where the parent declares none. `addCommands()` exists in every supported major and delegates to `addCommand()` on 8.x, so no version branch is needed. This lands before the constraint change so that no commit leaves a state where Symfony 8 is installable but unsupported. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Laravel 13 requires symfony/console ^7.4 || ^8.0 and resolves Symfony 8.1 on PHP 8.4+. Capping at ^7.0 meant `composer require lucidarch/lucid` failed on a stock Laravel 13 app, and forcing it with -W downgraded the host application's Symfony from 8.1 to 7.4. php stays at ^8.1. Symfony 8 requires PHP >= 8.4.1, so PHP 8.1-8.3 hosts resolve Symfony <= 7.4 on their own; raising the floor would drop Laravel 9/10 consumers for no benefit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds a 13.x axis and excludes PHP 8.1/8.2, which Laravel 13 does not support. Two include cells pin the resolved Symfony major: PHP 8.3 can only reach Symfony 7 (8 requires PHP >= 8.4.1) and PHP 8.4 reaches Symfony 8. Both paths must keep working, so a resolution change that silently drops one now fails the build. The Lucid require step deliberately omits -W. If the constraint is ever too narrow for the host's resolved Symfony, that require must fail loudly rather than quietly downgrade the host. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Laravel 13 requires
symfony/console: ^7.4 || ^8.0, and a stock Laravel 13 app on PHP 8.4+ resolves Symfony 8.1. Lucid caps Symfony at^7.0, so it cannot be installed alongside it:Adding
-Wmakes it "work" by downgrading the host application'ssymfony/console,symfony/processandsymfony/finderfrom 8.1.5 back to 7.4.17.Widening the constraint alone isn't enough
Lucid also fatals on Symfony 8, which made two breaking changes it relies on:
Command::configure()gained a: voidreturn typeApplication::add()was removed in favour ofaddCommand()Both are new in Symfony 8 — 6.4 and 7.4 are unaffected, so this isn't a latent bug surfacing.
The change
Three lines, plus CI and docs:
composer.json— the foursymfony/*constraints go from^5.4|^6.0|^7.0to^5.4|^6.0|^7.0|^8.0src/Console/Command.php—configure()becomesconfigure(): voidlucid—array_walk($commands, [$app, 'add'])becomes$app->addCommands($commands)addCommands()exists in every supported Symfony major (5.4 through 8.1) and delegates toaddCommand()on 8.x, so no version branching is needed. Adding the: voidreturn type is a legal narrowing on 5.4/6.4/7.4, where the parent declares none.Commits are ordered so the code support lands before the constraint — otherwise there's a commit where Symfony 8 is installable but unsupported.
phpstays at^8.1Symfony 8 requires PHP >= 8.4.1, so PHP 8.1 through 8.3 hosts resolve Symfony 7.4 or lower on their own. Requiring
^8.0alone would break Laravel 13 users on PHP 8.3 and drop Laravel 9 through 12 entirely. Laravel itself accepts^7.4 || ^8.0for the same reason.Verification
Installed and ran
bin/test-commands.shagainst real apps:--prefer-lowestresolves Symfony 6.0.2 — passescomposer require lucidarch/lucidinto a stock Laravel 13 app now succeeds without-W, andcomposer show symfony/consolestill reports v8.x afterwards, so the host is no longer downgraded.CI
Adds a
13.xaxis, excluding PHP 8.1 and 8.2 which Laravel 13 doesn't support.Two
include:cells pin the resolved Symfony major (PHP 8.3 to 7, PHP 8.4 to 8) so a future resolution change can't silently drop one of the two paths this PR supports.The Lucid require step deliberately has no
-W: if the constraint is ever too narrow for the host's Symfony, that step should fail loudly rather than quietly downgrade the host, which is the bug being fixed here.No new public concepts, no version branches, and backwards compatible with Laravel 9 through 12.
🤖 Generated with Claude Code