-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[ResourceBundle] added the ability to configure services, forms, twig extensions, validations and mapping using yml or xml files (or both) #2092
[ResourceBundle] added the ability to configure services, forms, twig extensions, validations and mapping using yml or xml files (or both) #2092
Conversation
@gperdomor In overall looks good, but there are issues in related bundles, i.e. in |
@stloyd done. I checked the others bundles and only CoreBundle was affected. |
It looks correct and I like it ! |
sprintf('%s.driver.%s', $this->getBundlePrefix(), $driver) | ||
)); | ||
if ($this->mappingFormat === self::MAPPING_XML) { | ||
if (class_exists($mappingsPassClassName)) { |
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.
I would move this check as before instead of duplicating it:
if (class_exists($mappingsPassClassName)) {
if (self::MAPPING_XML === $this->mappingFormat) {
} else {
}
}
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.
@stloyd you're right!
@pjedrzejewski any feedback? |
@stloyd you're right, i will wait the @pjedrzejewski feedback for make the adjustments and do only one commit |
… extensions, validations and mapping using yml or xml files (or both)
@pjedrzejewski 👍 for merge! |
@pjedrzejewski any feedback? |
👍 |
[ResourceBundle] added the ability to configure services, forms, twig extensions, validations and mapping using yml or xml files (or both)
My feedback is merge! 👍 |
Thanks @gperdomor! |
Thanks to you @pjedrzejewski for this amazing project 👍 |
[ResourceBundle] added the ability to configure services, forms, twig extensions, validations and mapping using yml or xml files (or both)
I don't know why this bundle uses XML files for configuration and mapping, but personally i like more work with YAML files, is more simple for me.
With this changes, if someone want to configure the mapping of a bundle using YAML files, only have to change the mappingFormat variable value to 'yml' on the bundle class. To use YAML for the configuration files (services, form, twig, etc) only have to change the configFormat variable value to 'yml' on the bundle extension.
Also mixed scenarios are possible (mapping in XML and config/services files in YAML or viceversa).