Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The PHPUnit matrix now installs the Sylius and Symfony versions written in each cell's label and prints them in the log. Sylius 2.0 support is dropped (
sylius/sylius^2.0→^2.1). Only CI, build files and docs change. No PHP code changes.Two commits:
2c79feb: matrix, pins,show-versions, Sylius 2.0 drop, 2.1 advisory ignore in CI, Symfony 7.3 → 7.4.9289db4: webpack cap for the Sylius 2.1 test-application build.Motivation: the cells labelled "Sylius 2.0.0" and "Sylius 2.1.0" all installed Sylius 2.2.x, so 2.0, 2.1 and Symfony 6.4 were never tested. Run 40897039497 shows Sylius 2.2.12 in every cell. The root causes and every later problem are listed under "Problems found and fixes" below.
What changes
Makefile(2c79feb):sylius/sylius:"~X.Y.0"andsylius/test-application:"~X.Y.0-alpha@alpha", whereX.Ycomes fromSYLIUS_VERSION. The label means "latest patch of that minor".~${SYMFONY_VERSION}.0.show-versionstarget (PHP version, thensylius/sylius,sylius/test-application,symfony/framework-bundle). It runs right aftercomposer require.audit.ignoreforsylius/sylius, set before the require and removed right after.Makefile(9289db4): for Sylius 2.1 only, a yarnresolutionscapwebpack: ">=5.72 <5.109"is written intovendor/sylius/test-application/package.json.distbeforecomposer test-application:install. The 2.1-only conditional is renamedSYLIUS_2_1and shared by both 2.1 steps.New local reusable workflow
.github/workflows/phpunit-matrix.yml, called byci.yml(jobsylius-matrix) andrelease.yml(jobphpunit). payplug/template-ci is not modified.sylius_phpunit.ymlhas no exclude input, so PHP 8.4 gets its own job.php-8-2php-8-4Coveragejob: PHP 8.2 / Sylius 2.1.0 / Symfony 7.4. The install line, cache key and comment were updated (it used to be 7.3, which in practice installed 2.2.x).Sylius 2.0 dropped (merchant-facing):
composer.json:sylius/sylius^2.1.composer.lock:content-hashline only, no package changes.CHANGELOG.md, under### Changed: "Dropped support for Sylius 2.0: requires Sylius 2.1 or later".README.mdcompatibility table and.github/copilot-instructions.mdupdated to match.composer.jsonSymfony constraints (^6.4 || ^7.2) are unchanged, so 7.2 and 7.3 stay declared but untested.Related issue(s): Ticket: PRE-3864
Problems found and fixes
make installrequiredsylius/sylius:"<2.3", which has no lower bound, so Composer always took the newest 2.2.x (run 40897039497: 2.2.12 in every cell).sylius/sylius:"~X.Y.0", with the minor taken fromSYLIUS_VERSION(latest patch of that minor).sylius/test-application:">=${SYLIUS_VERSION},<2.3@alpha"excluded2.0.0-ALPHA.x, because pre-releases sort below2.0.0.~X.Y.0-alpha@alpha(resolvesv2.1.0-ALPHA.6andv2.2.0-ALPHA.1).extra.symfony.require "^X.Y"let a "7.3" cell install 7.4. The matrix also passed only["7.3"], so Symfony 6.4 was never built.~X.Y.0, and the matrix covers 6.4 and 7.4.sylius/sylius2.0.x (up to 2.0.18) requiresdoctrine/orm ^2.18, which conflicts with the plugin'sdoctrine/orm >=3.5 <3.7. Resolver dry-run: exit 2 even with the advisories ignored.composer.json^2.1, lock content-hash refreshed, CHANGELOG entry, README and copilot-instructions updated.>=2.1.0,<2.2.0, no 2.1 fix; Sylius 2.1 is out of security support).SYLIUS_VERSIONis 2.1.x only,config.audit.ignore ["sylius/sylius"]is set beforecomposer requireand removed withcomposer config --unset auditright after; the require exit status is kept.audit.ignore:policy.advisories.ignorefails on Composer 2.9, whileaudit.ignoreworks on 2.8 to 2.11. It only affectssylius/sylius, and set + unset leavescomposer.jsonbyte for byte unchanged.symfony/validator,symfony/web-profiler-bundle,symfony/config), andsylius/refund-plugin2.2.1 requiressymfony/messenger ^6.4 || ^7.4 || ^8.0.show-versionsordering.test-application:install, so a failure there hid the installed versions.composer require, and only if the require succeeded.9289db4; failure seen on run 45351270063).composer test-application:install→yarn build(encore dev) withCannot find module 'webpack/lib/dependencies/LoaderDependency', thrown by the@symfony/stimulus-bridgeloader oncontrollers.merged.shop.json/controllers.merged.admin.json.src/Sylius/Bundle/{Admin,Shop}Bundle/package.jsondeclare"webpack": "^5.72"; v2.2.13 declares">=5.72 <5.109".package.jsonandscripts/merge-plugin-dependencies.js.>=5.72 <5.109, as a yarnresolutionsentry written into the test-application'spackage.json.dist, for 2.1 only.package.json.distbecause the preinstall script rebuildspackage.jsonfrom it.tests/TestApplication/package.jsononly contributes dependencies, so aresolutionskey there would be dropped.vendor/is gitignored, so this edit can't be committed by mistake.sylius-matrix / php-8-2 / …,sylius-matrix / php-8-4 / …). A repo admin has to update the required checks ondevelop(see Notes for Reviewer).Type of Change
sylius/sylius^2.0→^2.1)Breaking change is left unticked: no released version of the plugin supports Sylius 2.0 (2.0.0 is still
Unreleased). Merchants installing 2.0.0 will need Sylius 2.1 or later.Checklist
Code Quality
composer validate --strictpasses; thequalityjob, with composer validate, ECS and PHPStan, passes on run 45353915696)Testing
sonarcloudCI jobSecurity & Ops
show-versionsfails the step if a package is missing; therequireexit status is kept after the audit unset; a failing webpack cap stopsmakebeforetest-application:install)Testing notes
CI results: run 45353915696 (head
9289db4)show-versions)quality / PHP Qualitysylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.1.0 Symfony 6.4)OK (1160 tests, 2656 assertions)sylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.1.0 Symfony 7.4)OK (1160 tests, 2656 assertions)sylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.2.0 Symfony 6.4)OK (1160 tests, 2656 assertions)sylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.2.0 Symfony 7.4)OK (1160 tests, 2656 assertions)sylius-matrix / php-8-4 / PHPUnit (PHP 8.4 Sylius 2.2.0 Symfony 7.4)OK (1160 tests, 2656 assertions)CoverageOK (1160 tests, 2656 assertions), Clover report generatedcomposer installfrom the lock (lockedsylius/syliusv2.2.10, which has advisories) is not blocked.2c79feb) failed on the webpack problem on the 2.1 cells and Coverage (item 8). Resolved by9289db4.Automated, local (Docker; host PHP is 7.4)
make -n install -e SYLIUS_VERSION=2.1.0|2.2.0 SYMFONY_VERSION=6.4|7.4show-versionsbeforetest-application:installcomposer, 5 scenariosmake install-sylius COMPOSER=<stub>(scratch copy of the Makefile)package.json.distmissing: exit 2 beforetest-application:installyarn install+yarn buildon the 2.1 test applicationshow-versions, real vendormake show-versions(PHP 8.5 container, repo read-only)python3 -c 'import yaml…'on the 3 workflowsneedstargets unchangedactionlinton the 3 workflowsdevelopcomposer validate --strict(container)Resolver dry-run per cell: Composer 2.11.2 with the plugin's
composer.jsonandcomposer.lock, symfony/flex loaded,platform.phpper cell, the Makefile's sequence,composer require --dev --dry-run -W.Controls:
doctrine/orm ^2.18conflict).Manual tests: none run (CI-only change).
Not tested locally: PHPUnit, PHPStan, ECS, Behat. No PHP changed and the local
vendor/is out of date; the CI results above cover PHPUnit, ECS and PHPStan.Notes for Reviewer
Admin action before merge: the PHPUnit check names changed. Old names looked like
sylius-matrix / PHPUnit (PHP 8.2 Sylius 2.0.0 Symfony 7.3). New names, confirmed on run 45353915696:sylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.1.0 Symfony 6.4)sylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.1.0 Symfony 7.4)sylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.2.0 Symfony 6.4)sylius-matrix / php-8-2 / PHPUnit (PHP 8.2 Sylius 2.2.0 Symfony 7.4)sylius-matrix / php-8-4 / PHPUnit (PHP 8.4 Sylius 2.2.0 Symfony 7.4)If branch protection on
developrequires the old names, a repo admin must update it, or merges stay blocked waiting for checks that never report. I could not read the current required checks (no access).Sonar numbers:
Coveragenow really runs on Sylius 2.1 / Symfony 7.4 (before, it silently ran on 2.2.x), so coverage numbers may move.release.ymlcalls the same local workflow, but it only runs on the next*-rc*tag, so it is not exercised by this PR.CI on this PR (base
develop):quality(composer validate, ECS, PHPStan),sylius-matrix(5 cells),Coverage(JS tests + PHPUnit with PCOV),sonarcloud(quality gate enforced).Local
make installstill rewritescomposer.json(extra.symfony.requireand the Sylius constraints), as it did before. The audit ignore leaves nothing behind. The 2.1 webpack cap only editsvendor/sylius/test-application/package.json.dist(gitignored).Impact: PHP floor unchanged (
^8.2). No UPC impact. No upgrade script. Sylius 2.3 is still not supported: it drops knp-gaufrette-bundle, whichsylius/refund-pluginstill loads.🤖 Generated with Claude Code