Skip to content

Commit 2b7ef7c

Browse files
refactor: update and fix some issues for symfony 7
1 parent 8c785cb commit 2b7ef7c

Some content is hidden

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

66 files changed

+598
-626
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ FROM php:8.3.6-fpm-alpine3.19
66

77
COPY --from=composer /usr/bin/composer /usr/bin/composer
88

9+
ENV COMPOSER_ALLOW_SUPERUSER=1
10+
911
RUN apk add --no-cache \
1012
bash==5.2.21-r0 \
1113
git==2.43.0-r0 \

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
},
5757
"config": {
5858
"allow-plugins": {
59-
"symfony/*": true
59+
"symfony/*": true,
60+
"php-http/discovery": true
6061
},
6162
"optimize-autoloader": true,
6263
"preferred-install": {

composer.lock

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

config/services.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ services:
1414
resource: '../src/Application/'
1515
exclude:
1616
- '../src/Application/DomainEventsHandler/'
17+
18+
Infrastructure\Doctrine\DataFixtures\:
19+
resource: '../src/Infrastructure/Doctrine/DataFixtures/**.php'

config/services/doctrine_event_listeners.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ services:
88
Infrastructure\Doctrine\EventListener\HashUserPasswordListener:
99
tags:
1010
- { name: doctrine.event_listener, event: prePersist }
11-
- { name: doctrine.event_listener, event: preUpdate }
11+
- { name: doctrine.event_listener, event: preUpdate }

config/services/domain_events.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
services:
33
_defaults:
44
autowire: true
5+
autoconfigure: true
56
public: false
67

78
Domain\EventsRegisterer: ~

config/services/use_cases.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ services:
88
Domain\UseCase\:
99
resource: '%kernel.project_dir%/src/Domain/UseCase/**/Handler.php'
1010
tags:
11-
- { name: messenger.message_handler, bus: command.bus }
11+
- { name: messenger.message_handler, bus: command.bus }
12+
13+
_instanceof:
14+
Domain\HasEventsRegisterer:
15+
calls:
16+
- setEventRegisterer: ['@Domain\EventsRegisterer']

src/Application/Controller/AuthenticationController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
final class AuthenticationController extends AbstractController
1919
{
2020
public function __construct(
21-
private UsersCollection $usersCollection,
22-
private CommandBus $commandBus
21+
private readonly UsersCollection $usersCollection,
22+
private readonly CommandBus $commandBus
2323
) {
2424
}
2525

src/Application/Controller/DinosaursController.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Application\MessageBus\CommandBus;
88
use Application\MessageBus\EventBus;
99
use Application\MessageBus\QueryBus;
10-
use Domain\Event\DinosaurIsBorn;
1110
use Domain\Exception\DinosaurNotFoundException;
1211
use Domain\Query\GetSingleDinosaur;
1312
use Domain\Query\GetAllDinosaurs;
@@ -23,9 +22,9 @@
2322
final class DinosaursController extends AbstractController
2423
{
2524
public function __construct(
26-
private CommandBus $commandBus,
27-
private QueryBus $queryBus,
28-
private EventBus $eventBus
25+
private readonly CommandBus $commandBus,
26+
private readonly QueryBus $queryBus,
27+
private readonly EventBus $eventBus
2928
) {
3029
}
3130

src/Application/Controller/SpeciesController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
final class SpeciesController extends AbstractController
2323
{
2424
public function __construct(
25-
private CommandBus $commandBus,
26-
private QueryBus $queryBus
25+
private readonly CommandBus $commandBus,
26+
private readonly QueryBus $queryBus
2727
) {
2828
}
2929

0 commit comments

Comments
 (0)