ongr-io / ElasticsearchBundle

Symfony bundle for Elasticsearch with steroids
MIT License
313 stars 189 forks source link

change default source directory to /src/Document #958

Open mjvanmiddelaar opened 4 years ago

mjvanmiddelaar commented 4 years ago

ONGR\ElasticsearchBundle\DependencyInjection\Compiler\MappingPass autoloads literally all classes in the default source directory, which is /src

It cannot be assumed all classes in /src abide by the PSR-0 standard or have autoloading setup in a different way. For instance, Doctrine Migrations after default SF5 setup, will be placed in /src/Migrations and they cannot be autoloaded by default.

Since the README.md suggests to place new Document classes in /src/Document, it is my proposal to make /src/Document the default source directory for the ElasticsearchBundle so developers can install this bundle on new Symfony 5 application without running into autoloading issues.