Service autowiring exclude rules updated.

This commit is contained in:
Alexey Skobkin 2018-06-25 22:39:47 +03:00
parent 69a2326c3e
commit c5d2f68c57
4 changed files with 14 additions and 6 deletions

View file

@ -17,12 +17,20 @@ services:
App\: App\:
resource: '../src/*' resource: '../src/*'
exclude: '../src/{Entity,Migrations,Tests,Kernel.php}' exclude: '../src/{Api/V1/{DTO},Magnetico/{Entity,Migrations},Entity,FormRequest,Migrations,Tests,Kernel.php}'
# Use array in exclude config from Symfony 4.2
#- '../src/Api/V1/{DTO}'
#- '../src/Magnetico/{Entity,Migrations}'
#- '../src/{Entity,FormRequest,Migrations,Tests,Kernel.php}'
App\Controller\: App\Controller\:
resource: '../src/Controller' resource: '../src/Controller'
tags: ['controller.service_arguments'] tags: ['controller.service_arguments']
App\Api\V1\Controller\:
resource: '../src/Api/V1/Controller'
tags: ['controller.service_arguments']
# Fast normalizer for Symfony Serializer # Fast normalizer for Symfony Serializer
get_set_method_normalizer: get_set_method_normalizer:
class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer

View file

@ -2,7 +2,8 @@
namespace App\Controller; namespace App\Controller;
use App\Form\{CreateUserRequest, CreateUserRequestType}; use App\Form\{CreateUserRequestType};
use App\FormRequest\CreateUserRequest;
use App\Repository\{UserRepository}; use App\Repository\{UserRepository};
use App\User\Exception\InvalidInviteException; use App\User\Exception\InvalidInviteException;
use App\User\UserManager; use App\User\UserManager;

View file

@ -2,10 +2,9 @@
namespace App\Form; namespace App\Form;
use App\FormRequest\CreateUserRequest;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\{EmailType, PasswordType, TextType};
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View file

@ -1,6 +1,6 @@
<?php <?php
namespace App\Form; namespace App\FormRequest;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;