Skip to content

Upgrade to Sylius 1.14 and adopt the 1.14.x plugin skeleton#42

Open
loevgaard wants to merge 3 commits into
1.xfrom
upgrade-to-1.14-skeleton
Open

Upgrade to Sylius 1.14 and adopt the 1.14.x plugin skeleton#42
loevgaard wants to merge 3 commits into
1.xfrom
upgrade-to-1.14-skeleton

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Brings dependencies, the test application, CI and tooling up to the Setono/SyliusPluginSkeleton@1.14.x standard.

Highlights

  • Dependencies: Sylius 1.12 → 1.14, Symfony ^6.4 (dropped 5.4), PHP >=8.1. Dev tooling delegated to setono/sylius-plugin-pack ~1.14.1. The Sylius split packages src/ actually uses are declared at ^1.0.
  • Tooling: PHPStan (level max) replaces Psalm, PHPUnit replaces phpspec, shipmonk/composer-dependency-analyser replaces composer-require-checker; Rector + Infection added.
  • Test application: rebuilt on the 1.14 skeleton (modern Kernel/bundles, @sylius-ui/frontend assets); QuickPay config/packages, config/routes and config/validator/Address.xml re-applied.
  • Tests: spec/ (phpspec) → tests/ (PHPUnit), plus DependencyInjection tests and PHPStan kernel loaders.
  • CI: build.yaml rewritten (triggers on 1.*.x/master/main, PHP 8.1–8.3 × Symfony ~6.4.0, with mutation + coverage jobs); added backwards-compatibility-check.yaml, issue templates and FUNDING.
  • Housekeeping: refreshed .gitattributes/.editorconfig/.gitignore and CLAUDE.md.

Notes / follow-ups

  • PHPStan baselines 33 pre-existing src/ type issues (phpstan-baseline.neon) — to be fixed and shrunk over time.
  • Surfaced a latent bug: invalid preg_replace('@', …) pattern in KlarnaTestShopUserFixture (baselined).
  • The winzou state-machine integration should migrate to Sylius\Abstraction\StateMachine to support the symfony_workflow adapter (follow-up).
  • Rector/ECS mechanical auto-fixes (constructor promotion, readonly) were applied to src/.

Bring dependencies, the test application, CI and tooling up to the
Setono/SyliusPluginSkeleton@1.14.x standard.

- composer: Sylius 1.12 -> 1.14, Symfony ^6.4 (drop 5.4), delegate dev
  tooling to setono/sylius-plugin-pack; declare the Sylius split packages
  src actually uses
- tooling: PHPStan (level max, with baseline) replaces Psalm; PHPUnit
  replaces phpspec; composer-dependency-analyser replaces
  composer-require-checker; add Rector, Infection
- test application: rebuilt on the 1.14 skeleton (modern Kernel, bundles,
  @sylius-ui/frontend assets), QuickPay config/routes/validator re-applied
- CI: rewrite build.yaml (1.*.x/master/main, PHP 8.1-8.3 x SF ~6.4.0,
  mutation + coverage jobs), add backwards-compatibility-check workflow
- housekeeping: refresh .gitattributes/.editorconfig/.gitignore, CLAUDE.md

PHPStan baselines pre-existing src type issues; the winzou state-machine
integration migration to Sylius\Abstraction\StateMachine is left as a
follow-up.
Comment on lines +5 to +7
- "1.*.x" # Matches our branch versioning that mirrors Sylius', e.g. '1.12.x'
- "master"
- "main"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
- "1.*.x" # Matches our branch versioning that mirrors Sylius', e.g. '1.12.x'
- "master"
- "main"
- "*.x"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v5"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Use v6

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Comment thread tests/Application/.env
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/setono_sylius_quickpay_%kernel.environment%?serverVersion=5.7
DATABASE_URL=mysql://root@127.0.0.1/setono_sylius_quickpay_%kernel.environment%?serverVersion=8.0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
DATABASE_URL=mysql://root@127.0.0.1/setono_sylius_quickpay_%kernel.environment%?serverVersion=8.0
DATABASE_URL=mysql://root@127.0.0.1/setono_sylius_quickpay_%kernel.environment%?serverVersion=11.6.2-MariaDB

@@ -1,5 +1,5 @@
{
"name": "sylius/plugin-skeleton-test-application",
"name": "setono/sylius-quickpay-plugin-test-application",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"name": "setono/sylius-quickpay-plugin-test-application",
"name": "setono/sylius-plugin-skeleton-test-application",

use Setono\SyliusQuickpayPlugin\Form\Type\QuickPayGatewayConfigurationType;
use Symfony\Component\Form\FormBuilderInterface;

final class QuickPayGatewayConfigurationTypeTest extends TestCase

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Form tests should extend Symfonys TypeTestCase

- Add KlarnaTestShopUserFixture::load() iterable-type error to the PHPStan
  baseline (only surfaces against the lowest fixtures-bundle parent signature)
- Allow the backwards-compatibility-check to install the advisory-affected
  base-branch dependencies (api-platform/core) via global audit.block-insecure
Roave installs with --no-dev by default, but the plugin's Sylius parent
classes/traits (SyliusPluginTrait, AbstractFixture) come from dev
dependencies, so reflection failed with false "could not be found" breaks.
Pass --install-development-dependencies; keep the global audit override so the
advisory-pinned base branch can still be installed for the comparison.
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