Repository navigation
ci: fail future-compatibility on deprecated core calls - #311
Björn Meyer (BrocksiNet) wants to merge 1 commit 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".
| - name: Install opt-in future compatibility rules | ||
| # Do not enable phpstan-shopware's default rules.neon via its extension installer. | ||
| run: composer require --dev "shopwarelabs/phpstan-shopware:${PHPSTAN_SHOPWARE_VERSION}" --no-interaction --no-plugins | ||
| # The deprecation rules fail the job on calls core already deprecated for the next major. |
There was a problem hiding this comment.
Narrow the directory-wide deprecation suppression
In the future-compatibility job, a newly introduced deprecated method call anywhere under src/Content/ProductExport/Tracking will still pass: phpstan.neon.dist lines 32–36 suppress every method.deprecated message for that entire directory, not just the intentional addFlags() calls. Narrow that exception to the addFlags() diagnostic and affected files so the new rule actually catches other trunk incompatibilities in this code.
AGENTS.md reference: AGENTS.md:L3-L6
Useful? React with 👍 / 👎.
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.