It's entirely possible, you just end up with slightly more complex configurations:
# services for all src/*/ directories, ecxluding
App\:
resource: '../src/*'
exclude:
- ../src/Tests/
- ../src/Kernel.php
- '../src/*/{Entity,Migrations}'
App\Blog\Controller\:
resource: '../src/Blog/Controller'
tags: ['controller.service_arguments']
# repeat for other sub-directories
# App\Main\Controller\:
To use the Maker Bundle, give it a more specific path
# config/packages/dev/maker.yaml
# create this file if you need to configure anything
maker:
# tell MakerBundle that all of your classes lives in an
# Acme namespace, instead of the default App
# (e.g. Acme\Entity\Article, Acme\Command\MyCommand, etc)
root_namespace: 'App\Blog\'
Since it would all still be the same app, you could avoid the 'fake bundle' layout, by inverting it, and grouping each type of class by sections:
src/
- Controller/
-- Blog/
-- Main/
- Entity
-- Blog/
-- Main/
This would not need any configuration changes to the standard style.