Skip to content

Fix phpstan errors in "check (highest)" job (deprecated EntitySearchResult accessors, MJML offset) - #93

Merged
shyim merged 2 commits into
mainfrom
copilot/fix-failing-check-highest-job
Oct 6, 2026
Merged

shyim merged 2 commits into
mainfrom
copilot/fix-failing-check-highest-job

Conversation

Copilot AI commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The check (highest) job runs shopware-cli extension validate against the highest Shopware version and fails with 5 phpstan errors: one possibly-missing array offset and four calls to accessors deprecated in 6.8.

  • MjmlLoader

    • $compileTemplate['html'] may be unset according to phpstan's inferred type (array{errors?: array{}, html?: string}).
    • It now returns $compileTemplate['html'] ?? ''.
    • '' is the existing "fall back to Shopware default templates" value used earlier in the same method.
  • SearchPathProvider and FlowSubscriber

    • EntitySearchResult::getElements() and first() are deprecated since 6.8.
    • Calls now go through getEntities():
// before
$repo->search($criteria, $context)->first();
// after
$repo->search($criteria, $context)->getEntities()->first();

Review note: composer.json still allows ~6.5.8 || ~6.6.0 || ~6.7.0. I haven't confirmed that EntitySearchResult::getEntities() exists in all of those versions. If it doesn't, either narrow the constraint or add a compatibility shim.

The services.xml deprecation warning from the same run is not addressed here.

Co-authored-by: shyim <6224096+shyim@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job check (highest) Fix phpstan errors in "check (highest)" job (deprecated EntitySearchResult accessors, MJML offset) Oct 6, 2026
Copilot AI requested a review from shyim October 6, 2026 18:14
@shyim
shyim marked this pull request as ready for review October 6, 2026 18:34
@shyim
shyim merged commit ea3a9d7 into main Oct 6, 2026
2 of 3 checks passed
@shyim
shyim deleted the copilot/fix-failing-check-highest-job branch October 6, 2026 18:34
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