Closed Spomky closed 8 years ago
That's not possible to have a service as this bundle works at compile time. However you can dynamically update this bundle configuration using an extension (with PrependExtensionInterdace
).
@Ener-Getick is right, as always 🙂
@dunglas I wouldn't say that :stuck_out_tongue: We learn from each other :slightly_smiling_face:
Hi,
I have a little DX issue with that bundle. My project uses the excellent
matthiasnoback/symfony-bundle-plugins)
and actions are stored in each plugin folders.Developers can modify the
dunglas_action.directories
configuration value to add folders containing classes. Hoever, I think this step could be avoided by adding a compiler class that will add the concerned folders without any configuration modification. Something that look like the following class:Do you think it is possible to provide a service (I named it
dunglas_action.directory_manager
in my example) that will provide aaddPatterns(array $patterns)
(oraddPattern(string $pattern)
) method?From my point of view it will requires to move all the logic in the DunglasActionExtension.php to that dedicated service.