Skip to content

Sylius 2 - #1

Open
LucaGallinari wants to merge 14 commits into
mainfrom
sylius-2
Open

Sylius 2#1
LucaGallinari wants to merge 14 commits into
mainfrom
sylius-2

Conversation

@LucaGallinari

Copy link
Copy Markdown
Member

No description provided.

…HP 8.2

Bumps sylius/sylius to ~2.2.0, php to ^8.2, drops the obsolete
doctrine/dbal ^3.0 conflict and the abandoned friendsofsymfony/jsrouting-bundle
(incompatible with Symfony 7), and aligns dev tooling (phpstan, phpspec,
phpunit, psalm, sylius-labs/coding-standard, sylius/test-application) with
current Sylius 2.x versions.
…ions/

Aligns with the Sylius 2.x plugin layout: config/app/*.yml -> config/*.yaml,
views/* -> templates/* (snake_case), translations/*.yml -> translations/*.yaml.
Overrides Bundle::getPath() to point at the plugin root so Symfony resolves
the new top-level directories instead of the legacy Resources/ convention,
and updates every internal template/config path reference accordingly
(controllers, routing, DI extension, README install/copy instructions).
Winzou's SM\Factory\FactoryInterface was replaced in Sylius 2.x by
Sylius\Abstraction\StateMachine\StateMachineInterface (graph-aware
can()/apply()). Also fixes GatewayConfigInterface being imported from
Payum\Core\Model instead of Sylius\Component\Payment\Model, a pre-existing
type mismatch masked by the old phpstan version and only surfaced once
PaymentMethodInterface::getGatewayConfig() got strict typed.
Drops the legacy tests/Application Symfony 4/5-style app (custom Kernel,
gulp-based frontend, JMSSerializer/FOSRestBundle/Sonata-era bundle list) in
favor of the sylius/test-application vendor package, keeping only the two
customer/product-variant repository overrides this plugin's tests actually
need in tests/TestApplication/src. Updates phpunit.xml.dist and
behat.yml.dist to boot Sylius\TestApplication\Kernel instead of the removed
app kernel.
- OrderIndexPage no longer redeclares the parent's now-readonly $tableAccessor
- ManagingOrdersContext: EmailCheckerInterface moved from
  Sylius\Component\Core\Test\Services to Sylius\Behat\Service\Checker
- services.xml: sylius.behat.notification_checker ->
  sylius.behat.notification_checker.admin, sylius.address_comparator ->
  Sylius\Component\Addressing\Comparator\AddressComparatorInterface
phpstan.neon: drop pre-1.0 config keys (excludes_analyse,
checkMissingIterableValueType) no longer understood by phpstan ^1.12, add
tests/Behat to the analysed paths, and baseline 78 pre-existing errors that
were never actually checked under the old phpstan 0.12.96 pin.

Add psalm.xml + baseline (previously not configured at all) and consolidate
the duplicate easy-coding-standard.neon/.yml into a single ecs.php matching
sylius-labs/coding-standard ^4.4's expected format.

Remaining diffs across src/ and spec/ are ECS's automatic style fixes
(trailing commas, closure spacing) with no behavioral change.
Matrix: PHP 8.2/8.3, Symfony ^7.3, Sylius ~2.2.0, Node 22.x, MySQL 8.0/8.4.
Bumps actions/checkout and actions/cache/upload-artifact to v4, replaces the
deprecated ::set-output syntax with $GITHUB_OUTPUT, points every step at
vendor/bin/console and vendor/sylius/test-application instead of the removed
tests/Application, adds container linting, psalm, and a roave_bc_check job,
and runs static analysis before spinning up MySQL/Chrome.
Adds compose.yml (php/mysql/nginx + chrome/chrome-proxy for Behat JS tests +
mailhog) and compose.override.dist.yml, following the same pattern used in
SyliusMailchimpPlugin: prebuilt ghcr.io/sylius/sylius-* images, nginx pointed
at vendor/sylius/test-application via WORKING_DIR, and a nodejs service to
build test-application's frontend assets. compose.override.yml/compose.test.yml
and docker/xdebug.ini are gitignored as personal local overrides, same as
upstream. Documents the workflow in README.md.
…impPlugin

Matrix collapsed to php 8.4 / mysql 8.4 (was 8.2/8.3 and 8.0/8.4), matching
the other Sylius 2.x plugin. Also aligns steps: explicit phpstan flags
(-c phpstan.neon -l max src/), psalm without --no-cache, phpunit split into
unit/non-unit steps (matching phpunit.xml.dist's unit/functional/integration/
non-unit testsuites, with empty placeholder tests/Unit, tests/Functional,
tests/Integration dirs since none exist yet), behat without -f progress, and
roave_bc_check bumped to PHP 8.4.
…ring with Mailchimp

Switches from the BUNDLES_TO_ENABLE/CONFIGS_TO_IMPORT/ROUTES_TO_IMPORT env
vars (Wishlist-style) to a physical bundles.php + routes.yaml driven via
SYLIUS_TEST_APP_BUNDLES_PATH/SYLIUS_TEST_APP_CONFIGS_TO_IMPORT/
SYLIUS_TEST_APP_ROUTES_TO_IMPORT, matching SyliusMailchimpPlugin's
tests/TestApplication convention. Also adds BEHAT_CHROME_URL and gitignores
tests/TestApplication/.env*.local for parity.
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