Rewrite (M0): strip old plugin, scaffold resource-agnostic engine#110
Merged
Conversation
Complete-rewrite groundwork (new major on feature/v1-rewrite): - Delete the old Google-Shopping-specific domain, pipeline, templates and config. - Add the 7 extension-point interfaces + registries (FeedType, MappingPreset, ValueResolver, LookupSource, Transformation, FilterOperator, Writer), wired via _instanceof autoconfiguration + tagged_iterator injection. - Add foundational value objects: FeedContext, FeedItem (bag), FieldType/ScopeDimension/ SourceType enums, FieldDefinition, FieldMapping, TransformationConfig, FilterSet. - New domain model: Feed (+translation), FeedSource, FeedField, FeedFilter with setono_sylius_feed__ table prefix; registered as Sylius resources. - Rewrite the workflow graph to ready/processing/completed/failed (process/complete/ fail/reset). - composer: add league/csv + symfony/property-access, drop spatie/enum. - Disable the Infection mutation-test CI job (out of scope for the rewrite). Green locally: ECS, PHPStan max (cleared baseline), PHPUnit, lint:container, lint:yaml/twig, Rector, composer validate/normalize, Doctrine mapping validate. Dependency-analyser deferred to the M1 boundary (deps consumed by M1).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 1.x #110 +/- ##
======================================
Coverage ? 97.01%
Complexity ? 178
======================================
Files ? 24
Lines ? 502
Branches ? 0
======================================
Hits ? 487
Misses ? 15
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The SCA CI job removes sylius/sylius, resolving the standalone resource-bundle TranslatableTrait (Sylius\Resource\Model, class_alias'd) whose only constructor is __construct (no initializeTranslationsCollection). Aliasing the trait constructor therefore produced an undefined method under PHPStan. Initialize the translations collection directly in the constructor instead — works for both the monorepo and standalone trait variants.
loevgaard
commented
Jun 17, 2026
loevgaard
commented
Jun 17, 2026
loevgaard
commented
Jun 17, 2026
loevgaard
commented
Jun 17, 2026
loevgaard
commented
Jun 17, 2026
loevgaard
commented
Jun 17, 2026
loevgaard
commented
Jun 17, 2026
loevgaard
commented
Jun 17, 2026
- Keep the mutation-tests CI job but mark it continue-on-error (ignored, not removed). - Lowercase FeedContext::key() for case-insensitive filesystem/URL stability. - Narrow resource-class types with class-string phpdoc (DataSource, ValueResolver). - Introduce an abstract, iterable+countable Registry base; all 7 registries now extend it and their interfaces extend IteratorAggregate (iterable by nature). - Rename the shared FilterOperator* to Operator* (new Operator namespace, tag setono_sylius_feed.operator) since the operator vocabulary is shared by filters, field conditions and conditional transforms. - FeedItem now implements IteratorAggregate, ArrayAccess and Countable over its bag.
- Split the PHPUnit suite into 'unit' (tests/Unit, no kernel) and 'functional' (tests/Functional, boots the test-app kernel via FunctionalTestCase); add composer phpunit-unit / phpunit-functional scripts. - Unit tests for every M0 class: FeedContext, FeedItem, FieldMapping, TransformationConfig, FieldDefinition, FilterSet, all 7 registries (+ abstract Registry base), FeedGraph, and the Feed/FeedSource/FeedField/FeedFilter/ FeedTranslation models. - Functional tests: registry service wiring (all 7 tags), the feed state-machine registration, and the Doctrine mappings (table names + Feed associations). - Mark the registry services public so they're retrievable (they are the plugin's central registry API, injected from M1 onward). - CLAUDE.md: require every feature to be tested, document the unit/functional split, fix the single-test example, and correct the now non-blocking mutation-testing note. 68 tests (54 unit + 54 assertions... 14 functional) green; ECS, PHPStan max, Rector clean.
loevgaard
commented
Jun 18, 2026
Flysystem (modernize & keep the storage seam): - RegisterFilesystemPass now targets FilesystemOperator only (drop the league/flysystem v1 / FilesystemInterface dual-support carried over from the old plugin). - composer: require league/flysystem ^2.1||^3.0 and flysystem-bundle ^2.4||^3.0. - Drop the now-unused v1 ignores from composer-dependency-analyser.php and the League\Flysystem class.notFound ignore from phpstan.neon. PR review: - Remove phpstan-baseline.neon and its include — the rewrite keeps zero errors, no baseline. - Add a generic Registry\RegistryInterface (iterable + countable) extended by all seven registry interfaces; lift the shared has()/all() into the abstract Registry so each concrete registry is just a narrowed get() + key extractor.
We won't use the batcher for batch processing. Drop both packages from composer (and the lock), unregister SetonoDoctrineORMBatcherBundle from the test app, drop the batcher-bundle entry from the dependency-analyser ignore list, and remove it from the README install instructions. The M1 DoctrineDataSource will stream via Query::toIterable() + EntityManager::clear() per read-batch instead (plan notes updated).
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.
Complete rewrite — new major version (M0)
This branch begins the complete rewrite of the plugin into a resource-agnostic feed
generation engine (design:
.notes/sylius-feed-plugin-spec.md). It targets1.xas the newmajor; the old plugin remains on
0.6.x(default) and0.7.x. There is no upgrade path —the old domain code does not carry forward.
Work is milestone-gated (
.notes/rewrite-progress.md). This PR contains M0 only.M0 — strip old plugin + scaffold the engine skeleton
LookupSource, Transformation, FilterOperator, Writer), auto-tagged via
_instanceofand wiredwith
tagged_iteratorinjection.FeedContext, bag-backedFeedItem,FieldType/ScopeDimension/SourceTypeenums,FieldDefinition,FieldMapping,TransformationConfig,FilterSet.Feed(+ translation),FeedSource,FeedField,FeedFilter(
setono_sylius_feed__table prefix), registered as Sylius resources.ready → processing → completed | failed.league/csv+symfony/property-access, dropspatie/enum.Verified locally
ECS · PHPStan max (cleared baseline) · PHPUnit ·
lint:container·lint:yaml/lint:twig·Rector ·
composer validate --strict/normalize· Doctrine mapping validate.Known: dependency-analysis will fail on this commit
M0's minimal
src/does not yet use several declared runtime deps (doctrine/orm, messenger,liip-imagine, twig, league/csv, property-access, …). These are consumed by M1, so the
dependency-analysisjob is expected to report unused dependencies until M1 lands. Not aregression — a milestone-sequencing artifact.
Next
M1 — core engine: product-variant resolvers, streaming
XmlWriter+google_rss,FeedGenerator,ProductVariantFeedType+DoctrineDataSource,GoogleShoppingMappingPreset,fixtures + a functional test producing a valid Google RSS feed.