Undefined method Application::add() when running dbtoolsbundle standalone

Open Beginner friendly
#259 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php, symfony
Domain
cli

Research direction

Reproduce by running the standalone entry point with symfony/console 8 installed, then search the repository for Application::add() — the standalone application registers commands there and needs the non-deprecated addCommand() call instead. Check the composer constraint that advertises symfony/console 8 support, and run the existing console/standalone tests afterwards. Done when the standalone binary boots and lists its commands without the undefined-method error.

Written by the indexing model from the issue text.

Description

Since Symfony Console 8.0, the deprecated Application::add() method has been removed.

Version 2.2.2 declares support for symfony/console 8.0+, but the standalone implementation still calls Application::add(), resulting in a runtime error:

Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Console\Application::add() in ...

Dominant language
PHP
Stars
235
Forks
17
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from makinacorpus/DbToolsBundle

All issues in makinacorpus/DbToolsBundle

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.