Skip to content

Commit 22ccb9f

Browse files
committed
feat(update): обновил пакеты, докер, убрал атрибут AsService
1 parent b57e4ba commit 22ccb9f

File tree

76 files changed

+774
-1248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+774
-1248
lines changed

backend/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"phpstan/phpstan": "^2.1",
4848
"phpstan/phpstan-doctrine": "^2.0",
4949
"phpstan/phpstan-strict-rules": "^2.0",
50-
"phpunit/phpunit": "^11.2",
50+
"phpunit/phpunit": "^12.0",
5151
"rector/rector": "^2.0",
5252
"symfony/browser-kit": "^7.2",
5353
"symfony/css-selector": "^7.2",

backend/composer.lock

Lines changed: 745 additions & 1037 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/src-dev/Infrastructure/EventListener/TestExceptionEventListener.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Dev\Infrastructure\EventListener;
66

7-
use App\Infrastructure\AsService;
87
use League\OpenAPIValidation\PSR7\Exception\ValidationFailed;
98
use Symfony\Component\DependencyInjection\Attribute\When;
109
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
@@ -14,7 +13,6 @@
1413
/**
1514
* Обработка исключений в тестовом окружении
1615
*/
17-
#[AsService]
1816
#[AsEventListener(event: KernelEvents::EXCEPTION, priority: 0)]
1917
#[When('test')]
2018
final readonly class TestExceptionEventListener

backend/src-dev/Maker/Resources/skeleton/domain/Repository.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* Репозиторий <?php echo $entity_class_name; ?> todo комментарий
2020
*/
21-
#[AsService]
21+
2222
final readonly class <?php echo $class_name.PHP_EOL; ?>
2323
{
2424
public function __construct(

backend/src-dev/Maker/Resources/skeleton/http/EntityArgumentValueResolver.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* Резолвер для сущности <?php echo $entity_title.PHP_EOL; ?>
2121
*/
22-
#[AsService]
22+
2323
final readonly class <?php echo $class_name; ?> implements ValueResolverInterface
2424
{
2525
public function __construct(

backend/src-dev/Maker/SimpleModule/CRUDGenerator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Dev\Maker\SimpleModule;
66

77
use App\Infrastructure\ApiException\ApiNotFoundException;
8-
use App\Infrastructure\AsService;
98
use App\Infrastructure\Flush;
109
use App\Infrastructure\Request\ApiRequestValueResolver;
1110
use App\Infrastructure\Response\ApiListObjectResponse;
@@ -38,7 +37,6 @@
3837
/**
3938
* Создает HTTP слой для модуля
4039
*/
41-
#[AsService]
4240
final readonly class CRUDGenerator
4341
{
4442
public function __construct(
@@ -83,7 +81,6 @@ private function generateEntityArgumentValueResolver(
8381
$useStatements = new UseStatementGenerator([
8482
$entityClass->getFullName(),
8583
$entityClass->getFullName().'Repository',
86-
AsService::class,
8784
Assert::class,
8885
ApiNotFoundException::class,
8986
ArgumentMetadata::class,

backend/src-dev/Maker/Vendor/EntityClassGeneratorForModule.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Dev\Maker\Vendor;
66

7-
use App\Infrastructure\AsService;
87
use DateTimeImmutable;
98
use Doctrine\ORM\EntityManagerInterface;
109
use Symfony\Bundle\MakerBundle\Doctrine\DoctrineHelper;
@@ -86,7 +85,6 @@ public function generateRepository(string $repositoryClass, string $entityClass)
8685
$entityAlias = strtolower($shortEntityClass[0]);
8786

8887
$useStatements = new UseStatementGenerator([
89-
AsService::class,
9088
EntityManagerInterface::class,
9189
Uuid::class,
9290
]);

backend/src-dev/OpenApi/EventListener/ValidateOpenApiSchema.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Dev\OpenApi\EventListener;
66

7-
use App\Infrastructure\AsService;
87
use League\OpenAPIValidation\PSR7\OperationAddress;
98
use League\OpenAPIValidation\PSR7\RequestValidator;
109
use League\OpenAPIValidation\PSR7\ResponseValidator;
@@ -21,7 +20,6 @@
2120
/**
2221
* Проверяет Request и Response на соответствие документации OpenApi
2322
*/
24-
#[AsService]
2523
#[When('test')]
2624
final readonly class ValidateOpenApiSchema
2725
{

backend/src-dev/PHPStan/phpstan-config.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ parameters:
1111
- ../../src/*/config.php
1212
- ../Rector/rector.config.php
1313
- ../Maker
14+
- ../PHPCsFixer
1415
parallel:
1516
maximumNumberOfProcesses: 8
1617
checkUninitializedProperties: true

backend/src-dev/Rector/rector.config.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
1111
use Rector\Config\RectorConfig;
1212
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector;
13-
use Rector\Doctrine\Set\DoctrineSetList;
1413
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
1514
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitSelfCallRector;
1615
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
17-
use Rector\PHPUnit\Set\PHPUnitSetList;
18-
use Rector\Symfony\Set\SymfonySetList;
1916
use Rector\TypeDeclaration\Rector\FunctionLike\AddParamTypeSplFixedArrayRector;
2017

2118
return RectorConfig::configure()
@@ -27,17 +24,19 @@
2724
__DIR__.'/../../src-dev/Tests',
2825
])
2926
->withParallel()
30-
->withPhpSets(php83: true)
3127
->withImportNames(importShortClasses: false)
32-
->withTypeCoverageLevel(100)
28+
->withPhpSets()
29+
->withAttributesSets()
3330
->withComposerBased(
31+
twig: true,
3432
doctrine: true,
3533
phpunit: true,
3634
symfony: true,
3735
)
3836
->withPreparedSets(
3937
deadCode: true,
4038
codeQuality: true,
39+
typeDeclarations: true,
4140
privatization: true,
4241
instanceOf: true,
4342
earlyReturn: true,
@@ -47,12 +46,6 @@
4746
doctrineCodeQuality: true,
4847
symfonyCodeQuality: true,
4948
)
50-
->withSets([
51-
SymfonySetList::SYMFONY_72,
52-
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
53-
DoctrineSetList::DOCTRINE_DBAL_40,
54-
PHPUnitSetList::PHPUNIT_110,
55-
])
5649
->withRules([
5750
RequestMethodInsteadOfStringRector::class,
5851
OneFlushInClassRector::class,

0 commit comments

Comments
 (0)