Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

ottaviano
Copy link

@ottaviano ottaviano commented Nov 20, 2021

Hello 馃憢
I copied this piece of code from v1.0.0 of the bundle to keep the possibility of using Sf service in the bundle config:

AutoFormat.Custom: 
  - '@my_custom_service'

Copy link
Collaborator

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

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

Hello @ottaviano :) Thank you for this PR and sorry for the delay. Are you still interested in finishing this?

$loader->load('html_purifier.xml');

$configs = $this->processConfiguration(new Configuration(), $configs);
$configs = array_map([$this, 'resolveServices'], $configs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$configs = array_map([$this, 'resolveServices'], $configs);
$configs = $container->resolveServices($configs);

Copy link
Author

Choose a reason for hiding this comment

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

Hello @HeahDude, the test no longer passes with this solution, @App\MyService is not replaced by Reference instance

Copy link
Collaborator

Choose a reason for hiding this comment

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

Alright then we need to be more careful with possible conflict and allow escaping @ when it's expected as legit character.
I propose to use a regex instead and allow escaping by doubling @@ as it is done in yaml config in Symfony.
We should also add a note about it in the docs (in the README).

@HeahDude HeahDude added this to the 4.1 milestone Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.