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.
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.