Repository navigation
ci: fail future-compatibility on deprecated core calls - #311
Björn Meyer (BrocksiNet) wants to merge 3 commits into
Conversation
Load phpstan/phpstan-deprecation-rules in the future-compatibility job, which analyses against Shopware trunk, so a call core deprecated for the next major fails there instead of on a 6.8 lane. Also type the order gateway feature flag provider like every other unit test provider.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 827b0d6fd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
Dominik Grothaus (dgrothaus-sw)
left a comment
There was a problem hiding this comment.
The provider change in ShopwareOrderGatewayTest matches the suggestion from the #308 review. All other unit test providers in tests/Unit return iterable now.
…les twice The ignore matched every deprecated method call under ProductExport/Tracking, so a new one there would pass the future-compatibility job. It now matches addFlags() only. A dev install of Shopware registers phpstan-deprecation-rules through the extension installer, and including the plugin's copy as well stops PHPStan before analysis. The plugin's copy is included only when the root lacks it.
…future-compat # Conflicts: # .github/workflows/ci.yml
Follow-up to #308, from Dominik Grothaus (@dgrothaus-sw)'s review.
No CI job reported the
EntitySearchResult::first()deprecations that #308 removed. The PHPStan jobs install Shopware with--no-dev, so core's rules never load, and phpstan-shopware's future-compatibility rules check announced type changes, not calls to@deprecatedmethods. After #308 onlyShopwareOrderGatewayTestguarded the 6.8 behaviour, and the six other call sites could regress unnoticed.The
future-compatibilityjob now also installsphpstan/phpstan-deprecation-rules, pinned next to phpstan-shopware, andbin/run.phpincludes its rules when they are installed. That job analyses against trunk, so a call core deprecated for the next major now fails there. The other PHPStan jobs do not install the package and stay unchanged. The current code produces no findings. Putting onefirst()call back fails the job withmethod.deprecated.The PR also adds the review's inline fix.
majorFeatureFlagProvider()now returnsiterablewith an@returnshape like every other unit test provider, so a lane that loads core's PHPStan config no longer reportsmissingType.generics.Both changes are in one PR on request.
# next versionin both changelogs.