Skip to content

Commit f653669

Browse files
amfolgardmaggiorgomezcasas
authored
[ci] Parametrize cache (CodelyTV#221)
* Updated amqp repository * Updated namespaces import * [ci] Decrease the psalm level * [ci] Ignore invalid psalm file * [ci] Ignore invalid psalm file * [ci] Parametrize cache version * [ci] Parametrize cache version Co-authored-by: dmaggio <dmaggio@dmaggio.com> Co-authored-by: Rafa Gómez <rgomezcasas@gmail.com>
1 parent 2b83c40 commit f653669

6 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ jobs:
1616

1717
- run: docker-compose pull
1818

19-
- uses: satackey/action-docker-layer-caching@v0.0.8
19+
- uses: satackey/action-docker-layer-caching@v0.0.11
2020
continue-on-error: true
21-
21+
with:
22+
key: php_ddd_example-cache-${{ secrets.CACHE_VERSION }}-{hash}
23+
restore-keys: |
24+
php_ddd_example-cache-${{ secrets.CACHE_VERSION }}-
2225
- name: Install dependencies
2326
run: make composer-install
2427

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ RUN apk --update upgrade \
1616

1717
RUN pickle install apcu-5.1.19
1818

19-
ADD etc/infrastructure/php/extensions/amqp.sh /root/install-amqp.sh
19+
ADD etc/infrastructure/php/extensions/rabbitmq.sh /root/install-rabbitmq.sh
2020
ADD etc/infrastructure/php/extensions/xdebug.sh /root/install-xdebug.sh
2121
RUN apk add git
22-
RUN sh /root/install-amqp.sh
22+
RUN sh /root/install-rabbitmq.sh
2323
RUN sh /root/install-xdebug.sh
2424

2525
RUN docker-php-ext-enable \
File renamed without changes.

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<ignoreFiles>
1717
<directory name="vendor" />
1818
<directory name="src/Shared/Infrastructure/Bus/Event/RabbitMq" />
19+
<directory name="src/Shared/Infrastructure/Symfony" />
1920
<directory name="tests/Shared/Infrastructure/Bus/Event/RabbitMq" />
2021
<directory name="tests/Shared/Infrastructure/Mink" />
2122
<directory name="tests/Shared/Infrastructure/PhpUnit/Constraint" />

src/Shared/Infrastructure/Symfony/FlashSession.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
namespace CodelyTv\Shared\Infrastructure\Symfony;
66

77
use CodelyTv\Shared\Domain\Utils;
8-
use Symfony\Component\HttpFoundation\Session\Session;
8+
use Symfony\Component\HttpFoundation\Session\SessionInterface;
99

1010
final class FlashSession
1111
{
1212
private static array $flashes = [];
1313

14-
public function __construct(Session $session)
14+
public function __construct(SessionInterface $session)
1515
{
1616
self::$flashes = Utils::dot($session->getFlashBag()->all());
1717
}

src/Shared/Infrastructure/Symfony/WebController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Symfony\Component\HttpFoundation\RedirectResponse;
1010
use Symfony\Component\HttpFoundation\Request;
1111
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
12-
use Symfony\Component\HttpFoundation\Session\Session;
12+
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1313
use Symfony\Component\Routing\RouterInterface;
1414
use Symfony\Component\Validator\ConstraintViolationListInterface;
1515
use Twig\Environment;
@@ -19,7 +19,7 @@ abstract class WebController extends ApiController
1919
public function __construct(
2020
private Environment $twig,
2121
private RouterInterface $router,
22-
private Session $session,
22+
private SessionInterface $session,
2323
QueryBus $queryBus,
2424
CommandBus $commandBus,
2525
ApiExceptionsHttpStatusCodeMapping $exceptionHandler

0 commit comments

Comments
 (0)