php - silex file structure for custom service providers -
i working on silex project requires custom service providers , related classes written.
i aware of preferred file structure of silex projects cannot anywhere find information on custom classes should fit structure. composer supplied libraries naturally in vendor folder, custom ones go?
at moment (trimmed down space) directory structure follows:
. ├── composer.json ├── composer.lock ├── composer.phar ├── src │ └── dashboard │ ├── controller │ │ ├── indexcontroller.php │ │ └── viewcontroller.php │ └── model │ └── users.php ├── vendor │ ├── autoload.php │ ├── composer ├── views │ ├── index.twig │ ├── layout.twig │ ├── logout.twig │ └── view.twig └── web ├── css │ ├── bootstrap.min.css │ └── style.css ├── index.php ├── js │ ├── bootstrap.min.js │ ├── jquery-2.0.3.min.js │ ├── jquery-ui-1.10.3.min.js └── twiglib.php where in custom service providers go , custom non composer included libraries? in src under specific namespace? or in vendor folder?
i can see where put 3rd party service providers in silex app vendor folder suggested, creating new service providers in silex, contradicts , advises against editing vendor folder , putting in src folder.
is there official standard?
vendor folder supposed contain composer dependencies, sure bad design add specific classes there manually. can put custom service providers separate git repositories , use them in project via composer. or, if way hard come, put them src folder, in case either separate folder services or, if prefer domain driven design, can put every service provider domain specific folders (i.e. in case smth /src/dashboard/dashboardservice.php). not sure if common standard exists.
Comments
Post a Comment