Skip to content

[UPMERGE] 5.1 -> 2026.x - #3133

Open
github-actions[bot] wants to merge 9 commits into
2026.xfrom
upmerge/5.1_2026.x
Open

[UPMERGE] 5.1 -> 2026.x#3133
github-actions[bot] wants to merge 9 commits into
2026.xfrom
upmerge/5.1_2026.x

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

This PR has been generated automatically.

Remember! The upmerge should always be merged with using Merge pull request button.

In case of conflicts, please resolve them manually with usign the following commands:

git fetch upstream
gh pr checkout <this-pr-number>
git merge upstream/2026.x -m "Resolve conflicts between 5.1 and 2026.x"

dpfaffenbauer and others added 9 commits August 6, 2026 19:52
The RuleBundle Condition/Action `configuration` column was changed from
Doctrine `array` (PHP serialize) to `json` for Pimcore 12 / DBAL 4. PHP
serialize preserved the nested Condition/Action object graph (a cartItemAction's
conditions/actions, or a "nested" bracket condition); json_encode() cannot and
turns those objects into "{}", losing the data on save. On read the stored
arrays also no longer rehydrate into objects, so the runtime evaluation (which
expects ConditionInterface/ActionInterface) breaks.

- Condition/Action::setConfiguration() normalizes nested Condition/Action
  objects into plain arrays ({id, type, sort, configuration}) for JSON storage.
- Condition/Action::denormalize() rehydrates a stored array back into an object;
  the validation processor, its traceable decorator and the cartItemAction
  processor use it so runtime evaluation keeps receiving objects.
- AbstractConfigurableRuleElementType drops a non-scalar submitted "id" (the
  admin JS submits the whole element as "id" when the loaded nested element has
  no id key), which otherwise failed integer validation on save.
doctrine/orm 3.6.8 added a guard in GenerateSchemaEventArgs::setSchema() that
throws unless the DBAL Schema::edit() API (doctrine/dbal ^4.5, currently only
4.5.x-dev) is available. Symfony's doctrine-bridge postGenerateSchema listeners
(messenger transport, cache, lock, remember-me, pdo session) call setSchema()
during SchemaTool::getSchemaFromMetadata(), which CoreShop uses in
coreshop:resources:create-tables (run by coreshop:install). With the latest
stable DBAL (4.4.x) this makes install/CI fail with:

    The setSchema() method requires the DBAL Schema::edit() API ...
    This feature requires doctrine/dbal ^4.5 or higher.

Cap orm to < 3.6.8 until doctrine/dbal ^4.5 is released as stable; the cap can
be lifted once DBAL 4.5 is available.
[Deps] Cap doctrine/orm < 3.6.8 until doctrine/dbal ^4.5 is released
Adds a cart-item-action scenario that reloads the cart price rules from the
database (via a new "the cart price rules are reloaded from the database" step
that clears the EntityManager) before recalculating the cart. This exercises the
JSON serialize/deserialize of the nested condition + action, which regressed when
the configuration column changed from doctrine 'array' to 'json'. Without the fix
the nested elements are lost on reload and the discount is no longer applied.
[Rule] Fix nested conditions/actions lost with JSON configuration column
# Conflicts:
#	src/CoreShop/Component/Rule/Model/Action.php
#	src/CoreShop/Component/Rule/Model/Condition.php
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

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.

1 participant