Conversation
Bump PHP to >=8.2, Symfony to ^6.4 || ^7.4, sylius/* to ^2.0. Replace
setono/code-quality-pack + Psalm with setono/sylius-plugin: ^2.0 and
PHPStan; relocate src/Resources/{config,translations,views} to root
config/ + translations/ + templates/; rebuild the admin product tab on
Twig hooks (sylius_admin.product.{update,create}.content.form.{side_navigation,sections});
switch the priceTiers field to LiveCollectionType so add/delete fire
server-side via Symfony UX Live Components; bring tests/Application/
in line with Setono/SyliusPluginSkeleton; rewrite CI on top of the
setono/sylius-plugin/<job>@v2 composite actions.
See UPGRADE.md for the full breakdown.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 2.x #7 +/- ##
======================================
Coverage ? 40.81%
Complexity ? 67
======================================
Files ? 10
Lines ? 245
Branches ? 0
======================================
Hits ? 100
Misses ? 145
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CLAUDE.md: rewrite Architecture/Wiring/Conventions for the v2 layout (repo-root config/, getConfigFilesPath override, Twig hooks, LiveCollectionType + empty_data requirement, ORM 3 attribute mappings, sylius.distributor.integer rename); switch default-PR-branch note from master to 1.x and active dev to 2.x. README.md: add requirements table, install steps (bundles.php, resource override, doctrine migration), and a "How it works" section. UPGRADE.md: document the LiveCollectionType + empty_data round-trip, the getConfigFilesPath() override, ProductTrait's PHPDoc -> attribute conversion, the sylius.integer_distributor -> sylius.distributor.integer rename, and the PHP 8.4 implicit-nullable signature sweep.
loevgaard
commented
May 4, 2026
| { | ||
| $builder->add('quantity', IntegerType::class, [ | ||
| 'label' => 'setono_sylius_tier_pricing.form.price_tier.quantity', | ||
| 'empty_data' => '1', |
Member
Author
There was a problem hiding this comment.
Why do we need empty_data?
loevgaard
commented
May 4, 2026
| 'scale' => 7, // defined in src/Resources/config/doctrine/model/PriceTier.orm.xml | ||
| 'scale' => 7, // defined in config/doctrine/model/PriceTier.orm.xml | ||
| 'help' => 'setono_sylius_tier_pricing.form.price_tier.discount_help', | ||
| 'empty_data' => '0.0', |
Member
Author
There was a problem hiding this comment.
Why do we need empty_data?
Other-bundle config injected via prepend() should be a PHP array
literal, not a YAML file read from disk: static analysis catches
shape errors at compile time, the config lives next to the
template paths it references, and the extension stays testable
without filesystem fixtures.
Drops config/sylius_twig_hooks.yaml and the Yaml::parseFile() round
trip; calls $container->prependExtensionConfig('sylius_twig_hooks',
[...]) with the inlined hook map directly. Documents the convention
in CLAUDE.md.
Remove plugin-internal narrative (getPath/getConfigFilesPath rationale, empty_data reasoning, tooling swap, CI rewrite, form-extension still present). Keep only items a consumer must act on or be aware of: composer constraints, Resources/ alias rename, template override paths, App\Entity\Product mapping caveat, embedding outside admin, removed class + service id, the implicit-nullable interface signature.
loevgaard
commented
May 4, 2026
| # 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_tier_pricing_%kernel.environment%?serverVersion=5.7 | ||
| DATABASE_URL=mysql://root@127.0.0.1:3306/setono_sylius_tier_pricing_%kernel.environment%?serverVersion=11.6.2-MariaDB |
Member
Author
There was a problem hiding this comment.
Do we need to add the default port?
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.
Summary
>=8.2, Symfony^6.4 || ^7.4,sylius/* ^2.0. Replacessetono/code-quality-pack+ Psalm withsetono/sylius-plugin: ^2.0and PHPStan.src/Resources/{config,translations,views}to repo-rootconfig/,translations/,templates/. BundlegetPath()+getConfigFilesPath()overrides keep Sylius's resource registration finding the relocated Doctrine mapping.sylius_admin.product.{update,create}.content.form.{side_navigation,sections}) — auto-loaded via the bundle'sprepend().ProductFormMenuSubscriberremoved;ProductTypeExtensionkept (Sylius 2 core itself uses form extensions for sections likechannel_pricing).priceTiersfield switched toSymfony\UX\LiveComponent\Form\Type\LiveCollectionTypeso add/delete fire server-side via Live Components — same pattern Sylius admin uses for product images. Section template rendersform_widget(button_add)/form_widget(button_delete).tests/Application/updated in place against Setono/SyliusPluginSkeleton: minimal kernel, refreshedbundles.php(incl.SyliusTwigHooksBundle), fullconfig/packagesswap, test entity moved totests/Application/Entity/Product.phpwith adoctrine.orm.mappingsblock.setono/sylius-plugin/<job>@v2composite actions (PHP 8.2/8.3/8.4 × Symfony 6.4/7.4 × lowest/highest); standalone BC workflow folded intobuild.yaml.See
UPGRADE.mdfor the full breakdown of breaking changes.Test plan
composer update -Wresolves on Symfony 7.4 + Sylius 2.2.5composer check-style(ECS) passescomposer analyse(PHPStan level max) passescomposer phpunit(2 tests, 13 assertions) passesbin/console lint:container/lint:yaml config/lint:twig templatescleanbin/console doctrine:schema:create+doctrine:schema:validate --skip-synccleanorder_unit_promotionadjustments withoriginCode=tier_pricingtotalling -1313 cents (correct ceiling-rounded distribution)