-
Notifications
You must be signed in to change notification settings - Fork 351
Using tagged_iterators for the markup listener
#7403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.6
Are you sure you want to change the base?
Conversation
| public const SERVICE_ID = 'sulu_markup.response_listener'; | ||
|
|
||
| /** | ||
| * @deprecated Use the value instead | ||
| */ | ||
| public const TAG_NAME = 'sulu_markup.parser'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could move this to the ParserInterface as a constant. Could be helpful for people who use PHP to Configure their app?
738dfae to
ff726c6
Compare
2047f0f to
5786b9b
Compare
|
@alexander-schranz This should be BC break free now. We can still remove those classes in 3.0 but that's a different MR. |
5f13ec7 to
32ee9eb
Compare
32ee9eb to
85f1f03
Compare
85f1f03 to
b9d17de
Compare
3dedd16 to
f97c26a
Compare
f97c26a to
29df2d7
Compare
29df2d7 to
923e314
Compare
|
@mamazu This should be using a tagged_locator instead because we do not need all services here. |
923e314 to
d986090
Compare
| $container = new class([ | ||
| 'html' => $this->markupParser->reveal(), | ||
| ]) implements ContainerInterface { | ||
| public function __construct(private array $services) | ||
| { | ||
| } | ||
|
|
||
| public function get($id) | ||
| { | ||
| return $this->services[$id]; | ||
| } | ||
|
|
||
| public function has($id): bool | ||
| { | ||
| return \array_key_exists($id, this->services); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be generalized or we could pull this from the container if it's a KernelTestCase
57a6e85 to
2a9d31e
Compare
2a9d31e to
73779de
Compare
What's in this PR?
Using the tagged iterator concept to reduce the amount of code that sulu has to create.
Why?
See linked issue.
Example Usage
More info on Symfony Tagged Services
To Do