Skip to content

fix: read search results through getEntities() for Shopware 6.8 - #308

Merged
Björn Meyer (BrocksiNet) merged 1 commit into
mainfrom
fix/entity-search-result-first-v6-8
Oct 22, 2026
Merged

Björn Meyer (BrocksiNet) merged 1 commit into
mainfrom
fix/entity-search-result-first-v6-8

Conversation

@BrocksiNet

Copy link
Copy Markdown
Contributor

EntitySearchResult::first() is deprecated for v6.8.0.0, and with the V6_8_0_0 flag active core throws instead of warning. A signed-in buyer's get_order calls it while loading the order, so on a 6.8 lane the tool answered internal: The tool call failed unexpectedly. while the same read passes on 6.7. The shopware-mcp-evals next-major lane found it (shopware/shopware-mcp-evals#99), and it reproduces on a trunk lane with the flag set.

The order gateway now reads getEntities()->first(), and so do the six other calls of the same method: the sales channel view provider, the /ucp/mcp proxy, the fallback agentic file renderer and both product export providers. PHPStan's deprecation findings for EntitySearchResult drop to none. getEntities() exists from 6.5 on.

The customer order read test now runs twice, once as before and once with the v6.8.0.0 deprecations enforced through Feature::fake().

No changelog entry: the plugin supports up to 6.7, where the old call still works, so no shop notices the change.

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

EntitySearchResult::first() is deprecated for v6.8.0.0, and with the
V6_8_0_0 flag active core throws instead of warning. A signed-in buyer's
get_order went through it in ShopwareOrderGateway::loadOrder(), so the
call answered `internal: The tool call failed unexpectedly.` on a 6.8
lane while it passed on 6.7. Found by the shopware-mcp-evals next-major
lane.

The six other calls of the same method, in SalesChannelViewProvider, the
/ucp/mcp proxy, the fallback agentic file renderer and both product
export providers, move to getEntities()->first() as well. getEntities()
exists from 6.5 on.

The customer order read test now also runs with the v6.8.0.0
deprecations enforced.
@BrocksiNet
Björn Meyer (BrocksiNet) requested a review from a team as a code owner October 20, 2026 17:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T17:57:52.475102Z a9fceb8 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.

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 description says PHPStan's deprecation findings for EntitySearchResult drop to none. That holds on a lane whose root loads core's PHPStan rules. CI never reported them. php-quality (trunk) on the base and future-compatibility on the base ended with no errors as well. Those jobs install the Shopware checkout with --no-dev, so bin/run.php injects no core rules there.

After the merge, ShopwareOrderGatewayTest is the only test that checks the next-major behaviour. The six other sites can regress unnoticed.

I suggest a follow-up that loads phpstan/phpstan-deprecation-rules in the future-compatibility job, so the next deprecated DAL call fails there instead of on a 6.8 lane.

)));
}

public static function majorFeatureFlagProvider(): \Generator

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.

On the 6.6 lane PHPStan reports this provider with missingType.generics, because \Generator carries no type arguments. Every other provider in tests/Unit returns iterable with a @return iterable<string, array{…}> docblock, for example UcpCheckoutCompletionPreviewTest::blockedStatusProvider().

Please match that shape:

    /**
     * @return iterable<string, array{list<string>}>
     */
    public static function majorFeatureFlagProvider(): iterable

@BrocksiNet
Björn Meyer (BrocksiNet) merged commit 20bcad9 into main Oct 22, 2026
29 checks passed
@BrocksiNet
Björn Meyer (BrocksiNet) deleted the fix/entity-search-result-first-v6-8 branch October 22, 2026 10:23
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.

3 participants