Skip to content

Updated browscap-php to support symfony/console:7.4+ - #822

Merged
asgrim merged 3 commits into
browscap:7.7.xfrom
georgeholt:cli-symfony-support
Apr 21, 2026
Merged

Updated browscap-php to support symfony/console:7.4+#822
asgrim merged 3 commits into
browscap:7.7.xfrom
georgeholt:cli-symfony-support

Conversation

@georgeholt

Copy link
Copy Markdown
Contributor

Since Symfony 7.4, Application::add has been renamed Application::addCommand. If you're using browscap-php in an existing project that uses Symfony and you require a version of symfony/console with the new syntax then calls to bin/browscap-php will fail with:

Uncaught Error: Call to undefined method Symfony\Component\Console\Application::add() in /path/to/project/vendor/browscap/browscap-php/bin/browscap-php:32

To add support for the newer syntax while not breaking backwards compatibility I check the version of symfony/console installed and use the old or new syntax ass appropriate.

I'll note as well that this wasn't picked up when running tests - I only ran phpunit so unless there are other ways to test I think this file isn't covered, so that's probably why it wasn't picked up earlier.

Haven't made many PRs in my life so apologies if I've made a booboo somewhere.

dependabot Bot and others added 3 commits April 20, 2026 05:13
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](dependabot/fetch-metadata@v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…ns/dependabot/fetch-metadata-3.1.0

github-actions: bump dependabot/fetch-metadata from 3.0.0 to 3.1.0
@codecov-commenter

codecov-commenter commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (7.8.x@8cb7fc6). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             7.8.x     #822   +/-   ##
========================================
  Coverage         ?   36.74%           
  Complexity       ?      283           
========================================
  Files            ?       27           
  Lines            ?     1132           
  Branches         ?        0           
========================================
  Hits             ?      416           
  Misses           ?      716           
  Partials         ?        0           
Flag Coverage Δ
phpunit 36.74% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@asgrim asgrim self-assigned this Apr 21, 2026
@asgrim asgrim added the bug label Apr 21, 2026
@asgrim
asgrim changed the base branch from 7.8.x to 7.7.x April 21, 2026 13:43
@asgrim asgrim added this to the 7.7.1 milestone Apr 21, 2026
@asgrim

asgrim commented Apr 21, 2026

Copy link
Copy Markdown
Member

Thanks!

@asgrim
asgrim merged commit fda4e8d into browscap:7.7.x Apr 21, 2026
43 checks passed
@asgrim

asgrim commented Apr 21, 2026

Copy link
Copy Markdown
Member

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants