If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.
bin/
config/
src/
tests/
vendor/
Via Composer
$ composer require sf4/api-user
config/packages/doctrine.yaml
doctrine:
# ...
orm:
# ...
mappings:
# ...
Sf4\ApiUser:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/vendor/sf4/api-user/src/Entity'
prefix: 'Sf4\ApiUser\Entity'
alias: Sf4\ApiUser
config/routes.yaml
# ...
api_user:
resource: '../vendor/sf4/api-user/src/Routes/api-user.yaml'
prefix: /user
config/services.yaml
services:
# ...
Sf4\Api\Repository\RepositoryFactory:
class: Sf4\Api\Repository\RepositoryFactory
arguments:
$entityManager: '@Doctrine\ORM\EntityManagerInterface'
$entities:
user: Sf4\ApiUser\Entity\User
user_detail: Sf4\ApiUser\Entity\UserDetail
# ...
Sf4\Api\RequestHandler\RequestHandlerInterface:
# ...
- method: setAvailableRoutes
arguments:
- api_default: 'Sf4\Api\Request\DefaultRequest'
# ...
api_user_list: 'Sf4\ApiUser\Request\ListRequest'
api_user_detail: 'Sf4\ApiUser\Request\DetailRequest'
api_user_save_detail: 'Sf4\ApiUser\Request\SaveDetailRequest'
config/packages/translation.yaml
framework:
# ...
translator:
# ...
paths:
# ...
- '%kernel.project_dir%/vendor/sf4/api-user/src/translations'
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email siim.liimand@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.