Skip to content

Replace deprecated defaultIndexMethod usage with a compiler pass - #152

Open
HypeMC wants to merge 1 commit into
sofascore:1.xfrom
HypeMC:remove-usage-of-deprecated-defaultindexmethod
Open

Replace deprecated defaultIndexMethod usage with a compiler pass#152
HypeMC wants to merge 1 commit into
sofascore:1.xfrom
HypeMC:remove-usage-of-deprecated-defaultindexmethod

Conversation

@HypeMC

@HypeMC HypeMC commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary 📝

Symfony 8.1 deprecates the defaultIndexMethod option of tagged_locator() in favor of the #[AsTaggedItem] attribute. That attribute is not a viable replacement here, the locator index comes from the public static for() method on TargetResolverInterface and ValuesResolverInterface.

A new ResolveTaggedLocatorIndexPass calls for() itself during compilation and stamps the result onto each purgatory.target_resolver and purgatory.route_param_value_resolver tag as a for attribute, which the tagged_locator() calls now use via indexAttribute: 'for'.

Checklist ✅

  • Tests updated 🐛
  • Docs updated 📚
  • Changelog updated 📋
  • Breaking change ⚠️

@HypeMC
HypeMC requested review from Brajk19 and klezaic August 21, 2026 13:00
@HypeMC HypeMC self-assigned this Aug 21, 2026
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.44%. Comparing base (39eaa59) to head (90846c2).

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x     #152      +/-   ##
============================================
+ Coverage     97.40%   97.44%   +0.03%     
- Complexity      499      508       +9     
============================================
  Files            62       63       +1     
  Lines          1388     1409      +21     
============================================
+ Hits           1352     1373      +21     
  Misses           36       36              
Flag Coverage Δ
8.1 97.44% <100.00%> (+0.03%) ⬆️
8.2 97.37% <100.00%> (+0.03%) ⬆️
8.3 97.15% <100.00%> (+0.04%) ⬆️
8.4 97.15% <100.00%> (+0.04%) ⬆️
8.5 97.15% <100.00%> (+0.04%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

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