KnpRadBundle icon indicating copy to clipboard operation
KnpRadBundle copied to clipboard

[RFC] it could load every yml file present in config/services folder

Open docteurklein opened this issue 11 years ago • 6 comments
trafficstars

for example:

        $path =  __DIR__.'/Resources/config/services';
        foreach (Finder::create()->name('*.yml')->in($path) as $file) {
            $loader->load($file->getPathname());
        }

docteurklein avatar Jul 16 '14 12:07 docteurklein

Interesting idea although it's more common to store service definition files into Resources/config directly.

Or maybe it could load recursively all yml files from Resources/config than contains a parameters or services key?

And maybe it should allow user to autoload service def through xml files (by a rad.configuration.format config key that contain yml by default for example).

gquemener avatar Jul 16 '14 13:07 gquemener

yeah, the path I meant is src/App/Resources/config/services.

The last folder (services) is interesting because Resources/config is full of unrelated stuff, and it's messy to mix unrelated yml files (routing & DIC f.e).

Concerning the file format, let's use the DelegatingFileLoader, it will gracefully handle yml, xliff, php, and co.

docteurklein avatar Jul 16 '14 13:07 docteurklein

DelegatingLoader => doge

What is the "co" format you mention?

gquemener avatar Jul 16 '14 13:07 gquemener

i knew it was amibguous :) I meant "& co" => "and all that stuff" => "etcaetera" :)

docteurklein avatar Jul 16 '14 13:07 docteurklein

Oh I thought you meant http://bit.ly/18Eq63e

gquemener avatar Jul 16 '14 13:07 gquemener

bastard :)

docteurklein avatar Jul 16 '14 13:07 docteurklein