I am currently building a fairly large Symfony 2 application with many ever-growing packages that I struggle to maintain.
I try to ensure that all packages are tied to each module of the system, which provides me with a good management structure. Which is not so nice, mine app/config/config.yml, which quickly got out of hand. You can understand the import in this file, which helped me a little, but I would like to move a number of configurations for each package, which should help to save these packages again in our other applications.
Here are some examples of what I would like to move into separate packages.
1) Injection dependencies
We use the JMSDiExtraBundle in all internal packages, as we find that it develops a little faster and easier to manage.
jms_di_extra:
locations:
bundles:
- AppBundle
- BlogBundle
- ContentBundle
- StoreBundle
- UserBundle
I would like this block to be moved to each group of persons config.ymlor better, but it would be included in each package DependencyInjection/AppBundleExtension.php.
2) Routing
Use to configure the route, but every package still needs, including one app/config/routing.yml, leaving us with a rather large unmanaged file.
Some examples
app:
resource: "@AppBundle/Controller"
type: annotation
blog:
resource: "@BlogBundle/Controller"
type: annotation
content:
resource: "@ContentBundle/Controller"
type: annotation
oneup_uploader:
resource: .
type: uploader
3) OneUp Uploader
, 500 20+ , . , app/config/uploader.yml, config.yml. - , !
oneup_uploader:
mappings:
bundle_name_reference1:
frontend: blueimp
storage:
type: gaufrette
filesystem: gaufrette.local_filesystem
bundle_name_reference2:
frontend: blueimp
storage:
type: gaufrette
filesystem: gaufrette.local_filesystem
, , / , AppKernel.php. , , Symfony , , .