Skip to content

ci: fail future-compatibility on deprecated core calls - #311

Open
Björn Meyer (BrocksiNet) wants to merge 3 commits into
mainfrom
ci/deprecation-rules-future-compat
Open

Björn Meyer (BrocksiNet) wants to merge 3 commits into
mainfrom
ci/deprecation-rules-future-compat

Conversation

@BrocksiNet

Copy link
Copy Markdown
Contributor

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 @deprecated methods. After #308 only ShopwareOrderGatewayTest guarded the 6.8 behaviour, and the six other call sites could regress unnoticed.

The future-compatibility job now also installs phpstan/phpstan-deprecation-rules, pinned next to phpstan-shopware, and bin/run.php includes 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 one first() call back fails the job with method.deprecated.

The PR also adds the review's inline fix. majorFeatureFlagProvider() now returns iterable with an @return shape like every other unit test provider, so a lane that loads core's PHPStan config no longer reports missingType.generics.

Both changes are in one PR on request.

  • Tests cover the change, or it needs none, such as documentation or CI configuration.
  • A change merchants notice has an entry under # next version in both changelogs.
  • The change works on Shopware 6.5, 6.6 and 6.7 from one codebase.

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T11:22:59.587273Z 827b0d6 PR opened
ℹ️ About Codex in GitHub

Your 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/ci.yml Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider change in ShopwareOrderGatewayTest matches the suggestion from the #308 review. All other unit test providers in tests/Unit return iterable now.

Comment thread bin/run.php Resolved
…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
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.

2 participants