Skip to content

Replace Symphony's deprecated Application::add() with addCommands()#768

Open
midnight-wonderer wants to merge 2 commits intotighten:mainfrom
midnight-wonderer:chore/symphony-deprecation-apply
Open

Replace Symphony's deprecated Application::add() with addCommands()#768
midnight-wonderer wants to merge 2 commits intotighten:mainfrom
midnight-wonderer:chore/symphony-deprecation-apply

Conversation

@midnight-wonderer
Copy link

This PR addresses the deprecation warnings introduced in Symfony 7.4 regarding the Symfony\Component\Console\Application::add() method.
(Also mentioned in: #763)

Following the deprecation notice, I have updated the calls to use addCommands() instead. This ensures compatibility with Symfony 8.0, where the old method will be removed.

@midnight-wonderer midnight-wonderer changed the title Replace deprecated Symphony's Application::add() with addCommands() Replace Symphony's deprecated Application::add() with addCommands() Feb 24, 2026
@midnight-wonderer midnight-wonderer force-pushed the chore/symphony-deprecation-apply branch 2 times, most recently from 92fc3d6 to 157cf06 Compare February 24, 2026 14:03
@midnight-wonderer midnight-wonderer force-pushed the chore/symphony-deprecation-apply branch 3 times, most recently from 65c52b0 to 07057d6 Compare February 24, 2026 14:20
@midnight-wonderer
Copy link
Author

Sorry for the hiccup; my IDE is conflict with pint formatting, and I keep forgetting to run pint before commit.
All tests pass now.

@midnight-wonderer midnight-wonderer force-pushed the chore/symphony-deprecation-apply branch from 07057d6 to 961952d Compare February 24, 2026 17:53
@midnight-wonderer
Copy link
Author

Following the discussion in #755, I realized that addCommands is actually available as far back as 6.0.
So this PR is the alternative that provides backward compatibility with no version bump.

If we are going with #755, feel free to close this PR.

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.

2 participants