Skip to content

Add Sylius 1.13 and 1.14 support - #3

Merged
senghe merged 3 commits into
masterfrom
feature/sylius-1.13-1.14-support
Oct 5, 2026
Merged

senghe merged 3 commits into
masterfrom
feature/sylius-1.13-1.14-support

Conversation

@liszkapawel

@liszkapawel liszkapawel commented Oct 1, 2026 •

Copy link
Copy Markdown

Bumps sylius/sylius to ~1.13.0 || ~1.14.0 and PHP to ^8.1. Drops 1.11 and 1.12.

Sylius API

No class in src/ needed a change:

  • sylius.product_variant_resolver.default was not removed in 1.13, only the tag of that name was.
    The service id is unchanged in 1.13 and 1.14, so the injection in ItemFactory stays as is. The
    1.14-only alias sylius.resolver.product_variant.default is deliberately not used, because it does
    not exist in 1.13.
  • The session.factory decoration and EventsBag extends FlashBag are unaffected by Symfony 6.4.
  • In 1.14 ResourceControllerEvent is an alias of Sylius\Resource\Symfony\EventDispatcher\GenericEvent,
    which extends Symfony's GenericEvent, so the listener type hints still match.

Test application

It was still on the 1.11/1.12 skeleton and could not boot on 1.13:

  • registered SyliusStateMachineAbstractionBundle, otherwise the container fails on the missing
    sylius_abstraction.state_machine service
  • removed config/sylius/1.11 and 1.12 and the 1.11 shim bundle
  • replaced Swiftmailer with Symfony Mailer
  • removed the dead package.json.~1.11.0.dist and package.json.~1.12.0.dist

Tooling

  • ecs.php crashed on ECSConfig::parameters(), rewritten for the current API
  • phpstan.neon moved to excludePaths and error identifiers, still level max
  • CI matrix: PHP 8.1-8.3, Symfony ^5.4/^6.4, Sylius ~1.13.0/~1.14.0

Verification

Checked against Sylius 1.13.17 and 1.14.20 on PHP 8.1:

  • phpstan (max), psalm, phpspec, phpunit, behat, composer validate --strict and
    doctrine:schema:validate green on both
  • all listeners present in debug:event-dispatcher, decorator present in debug:container session.factory
  • events actually emitted: view_item_list, view_item, add_to_cart, view_cart, begin_checkout,
    search and add_address_info from a shop walkthrough, plus purchase, remove_from_cart,
    add_payment_info, login and sign_up dispatched through the booted kernel
  • installed into a clean sylius/sylius-standard 1.14 and verified both the default template and a
    custom templateName

Known issues, not fixed here

  • CheckoutEventFactory::addShippingInfo() throws on an order without shipments, because
    Collection::first() returns false and ?-> does not short-circuit on it. Pre-existing.
  • The first request of a new anonymous visitor drops its event, since the template is guarded by
    app.session.started. Reproduces on 1.12 too, so not a regression.

Bump sylius/sylius to ~1.13.0 || ~1.14.0 and PHP to ^8.1, drop 1.11 and 1.12.
No production class needed a change; sylius.product_variant_resolver.default
still resolves on both versions, so the 1.14-only alias is not used.

- register SyliusStateMachineAbstractionBundle in the test application
- drop config/sylius/1.11 and 1.12 overrides and the 1.11 shim bundle
- replace Swiftmailer with Symfony Mailer in the test application
- fix ecs.php for the current EasyCodingStandard API
- update phpstan.neon to excludePaths and error identifiers
- update CI matrix to PHP 8.1-8.3, Symfony ^5.4/^6.4, Sylius ~1.13/~1.14
symfony server:ca:install exits 1 on the runners because no Chrome/Firefox NSS
database is present, even though the CA is installed in the system trust store.
Drop the step and run the webserver with --no-tls, as Sylius/PluginSkeleton does.
Behat base_url switched to http accordingly.
Recent Composer refuses to install packages with open security advisories.
api-platform/core ^2.7.10 is pinned by Sylius 1.13 and 1.14, so there is no
version to upgrade to; disable the block for the CI run only.
@senghe
senghe merged commit 487e052 into master Oct 5, 2026
24 checks passed
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