Skip to content

use resource tags for aggregates, events & headers - #286

Merged
DavidBadura merged 6 commits into
4.0.xfrom
resource-tags
Oct 4, 2026
Merged

DavidBadura merged 6 commits into
4.0.xfrom
resource-tags

Conversation

@DavidBadura

@DavidBadura DavidBadura commented Dec 10, 2025 •

Copy link
Copy Markdown
Member

Aggregates, events and headers are now discovered via Symfony resource tags instead of the aggregates, events and headers path options, which are removed. Any class with the matching attribute that is covered by an autoconfigured service resource gets picked up and excluded from the container. This requires symfony/dependency-injection 7.3 or newer.

@DavidBadura
DavidBadura force-pushed the resource-tags branch 2 times, most recently from 40d2656 to f79f18c Compare December 10, 2025 13:40
@DavidBadura DavidBadura added this to the 4.0.0 milestone Dec 10, 2025
@DavidBadura DavidBadura added enhancement New feature or request BC-Break labels Dec 10, 2025
@DavidBadura DavidBadura changed the title use resource tags for aggregates & events use resource tags for aggregates, events & headers Dec 10, 2025

@DanielBadura DanielBadura left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM CI still failing tho

@DavidBadura DavidBadura self-assigned this Mar 24, 2026
@DavidBadura
DavidBadura force-pushed the resource-tags branch 2 times, most recently from 5a6cdf5 to 65acc84 Compare October 3, 2026 09:22
Type the registry parameters in the compiler passes, register the missing
default for event_sourcing.headers and resolve the class from the service
definition so classes with a custom service id are picked up correctly.
The docs no longer mention the removed aggregates, events and headers paths.
Event aliases were dropped, the header registry lost the internal headers
and duplicate names silently overwrote each other. This restores the
behaviour of the previous attribute registry factories.
Header aliases are now available in event-sourcing 4.0.x. They are
registered after the internal headers and throw if an alias is already
in use, same as the attribute registry factory does.
Comment thread composer.json
"symfony/config": "^6.4.0 || ^7.0.0 || ^8.0.0",
"symfony/console": "^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/dependency-injection": "^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/dependency-injection": "^7.3.0 || ^8.0.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think we could drop 6.4 for all components then, as framework users mostly update all components and not only one.

@DavidBadura
DavidBadura merged commit bad232c into 4.0.x Oct 4, 2026
23 checks passed
@DavidBadura
DavidBadura deleted the resource-tags branch October 4, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BC-Break enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants