Skip to content

Commit 9ef7868

Browse files
committed
chore: update deps
1 parent ad09a33 commit 9ef7868

34 files changed

+1256
-1082
lines changed

.env

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
1+
# In all environments, the following files are loaded if they exist,
2+
# the latter taking precedence over the former:
3+
#
4+
# * .env contains default values for the environment variables needed by the app
5+
# * .env.local uncommitted file with local overrides
6+
# * .env.$APP_ENV committed environment-specific defaults
7+
# * .env.$APP_ENV.local uncommitted environment-specific overrides
8+
#
9+
# Real environment variables win over .env files.
10+
#
11+
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
12+
# https://symfony.com/doc/current/configuration/secrets.html
13+
#
14+
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
15+
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
16+
117
###> symfony/framework-bundle ###
218
APP_ENV=dev
319
APP_SECRET=6aae3d25d74cc223fc0bfdc801ce12e2
420
###< symfony/framework-bundle ###
521

622
###> doctrine/doctrine-bundle ###
7-
DATABASE_URL="postgresql://symfony:ChangeMe@database:5432/app?serverVersion=13&charset=utf8"
23+
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
24+
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
25+
#
26+
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
27+
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8&charset=utf8mb4"
28+
DATABASE_URL="postgresql://symfony:!ChangeMe!@database:5432/app?serverVersion=15&charset=utf8"
829
###< doctrine/doctrine-bundle ###
930

1031
###> nelmio/cors-bundle ###
1132
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
1233
###< nelmio/cors-bundle ###
1334

1435
###> symfony/messenger ###
36+
# Choose one of the transports below
37+
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
38+
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
39+
# MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
1540
###< symfony/messenger ###

.env.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
APP_SECRET='$ecretf0rt3st'
22
SYMFONY_DEPRECATIONS_HELPER=999999
3-
4-
###> doctrine/doctrine-bundle ###
5-
DATABASE_URL="postgresql://symfony:ChangeMe@database:5432/app_test?serverVersion=13&charset=utf8"
6-
###< doctrine/doctrine-bundle ###

.github/workflows/main.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: PHP-CS-Fixer
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1313

1414
- name: Setup PHP
1515
uses: shivammathur/setup-php@v2
@@ -25,19 +25,19 @@ jobs:
2525
name: Psalm
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
2929

3030
- name: Setup PHP
3131
uses: shivammathur/setup-php@v2
3232
with:
33-
php-version: '8.1'
33+
php-version: '8.2'
3434

3535
- name: Get composer cache directory
3636
id: composercache
3737
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
3838

3939
- name: Cache dependencies
40-
uses: actions/cache@v2
40+
uses: actions/cache@v3
4141
with:
4242
path: ${{ steps.composercache.outputs.dir }}
4343
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -54,19 +54,19 @@ jobs:
5454
name: Deptrac bounded contexts
5555
steps:
5656
- name: Checkout
57-
uses: actions/checkout@v2
57+
uses: actions/checkout@v3
5858

5959
- name: Setup PHP
6060
uses: shivammathur/setup-php@v2
6161
with:
62-
php-version: '8.1'
62+
php-version: '8.2'
6363

6464
- name: Get composer cache directory
6565
id: composercache
6666
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
6767

6868
- name: Cache dependencies
69-
uses: actions/cache@v2
69+
uses: actions/cache@v3
7070
with:
7171
path: ${{ steps.composercache.outputs.dir }}
7272
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -83,19 +83,19 @@ jobs:
8383
name: Deptrac hexagonal
8484
steps:
8585
- name: Checkout
86-
uses: actions/checkout@v2
86+
uses: actions/checkout@v3
8787

8888
- name: Setup PHP
8989
uses: shivammathur/setup-php@v2
9090
with:
91-
php-version: '8.1'
91+
php-version: '8.2'
9292

9393
- name: Get composer cache directory
9494
id: composercache
9595
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
9696

9797
- name: Cache dependencies
98-
uses: actions/cache@v2
98+
uses: actions/cache@v3
9999
with:
100100
path: ${{ steps.composercache.outputs.dir }}
101101
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -116,7 +116,7 @@ jobs:
116116
image: postgres:13-alpine
117117
env:
118118
POSTGRES_USER: symfony
119-
POSTGRES_PASSWORD: ChangeMe
119+
POSTGRES_PASSWORD: '!ChangeMe!'
120120
options: >-
121121
--health-cmd pg_isready
122122
--health-interval 10s
@@ -127,19 +127,19 @@ jobs:
127127

128128
steps:
129129
- name: Checkout
130-
uses: actions/checkout@v2
130+
uses: actions/checkout@v3
131131

132132
- name: Setup PHP
133133
uses: shivammathur/setup-php@v2
134134
with:
135-
php-version: '8.1'
135+
php-version: '8.2'
136136

137137
- name: Get composer cache directory
138138
id: composercache
139139
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
140140

141141
- name: Cache dependencies
142-
uses: actions/cache@v2
142+
uses: actions/cache@v3
143143
with:
144144
path: ${{ steps.composercache.outputs.dir }}
145145
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -151,4 +151,4 @@ jobs:
151151
- name: Run tests
152152
run: bin/phpunit
153153
env:
154-
DATABASE_URL: 'postgresql://symfony:ChangeMe@localhost:5432/app_test?serverVersion=13&charset=utf8'
154+
DATABASE_URL: 'postgresql://symfony:!ChangeMe!@localhost:5432/app_test?serverVersion=15&charset=utf8'

Dockerfile

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44

55

66
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
7-
ARG PHP_VERSION=8.1
7+
ARG PHP_VERSION=8.2
88
ARG CADDY_VERSION=2
99

1010
# "php" stage
1111
FROM php:${PHP_VERSION}-fpm-alpine AS symfony_php
1212

13+
# php extensions installer: https://github.com/mlocati/docker-php-extension-installer
14+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
15+
1316
# persistent / runtime deps
1417
RUN apk add --no-cache \
1518
acl \
@@ -19,38 +22,20 @@ RUN apk add --no-cache \
1922
git \
2023
;
2124

22-
ARG APCU_VERSION=5.1.21
2325
RUN set -eux; \
24-
apk add --no-cache --virtual .build-deps \
25-
$PHPIZE_DEPS \
26-
icu-dev \
27-
libzip-dev \
28-
zlib-dev \
29-
; \
30-
\
31-
docker-php-ext-configure zip; \
32-
docker-php-ext-install -j$(nproc) \
26+
install-php-extensions \
3327
intl \
3428
zip \
35-
; \
36-
pecl install \
37-
apcu-${APCU_VERSION} \
38-
; \
39-
pecl clear-cache; \
40-
docker-php-ext-enable \
4129
apcu \
4230
opcache \
43-
; \
44-
\
45-
runDeps="$( \
46-
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
47-
| tr ',' '\n' \
48-
| sort -u \
49-
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
50-
)"; \
51-
apk add --no-cache --virtual .phpexts-rundeps $runDeps; \
52-
\
53-
apk del .build-deps
31+
;
32+
33+
###> recipes ###
34+
###> doctrine/doctrine-bundle ###
35+
RUN set -eux; \
36+
install-php-extensions pdo_pgsql
37+
###< doctrine/doctrine-bundle ###
38+
###< recipes ###
5439

5540
COPY docker/php/docker-healthcheck.sh /usr/local/bin/docker-healthcheck
5641
RUN chmod +x /usr/local/bin/docker-healthcheck
@@ -67,7 +52,7 @@ RUN chmod +x /usr/local/bin/docker-entrypoint
6752

6853
VOLUME /var/run/php
6954

70-
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
55+
COPY --from=composer/composer:2-bin /composer /usr/bin/composer
7156

7257
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
7358
ENV COMPOSER_ALLOW_SUPERUSER=1
@@ -92,15 +77,6 @@ ENV SYMFONY_VERSION ${SYMFONY_VERSION}
9277
RUN composer create-project "${SKELETON} ${SYMFONY_VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-interaction; \
9378
composer clear-cache
9479

95-
###> recipes ###
96-
###> doctrine/doctrine-bundle ###
97-
RUN apk add --no-cache --virtual .pgsql-deps postgresql-dev; \
98-
docker-php-ext-install -j$(nproc) pdo_pgsql; \
99-
apk add --no-cache --virtual .pgsql-rundeps so:libpq.so.5; \
100-
apk del .pgsql-deps
101-
###< doctrine/doctrine-bundle ###
102-
###< recipes ###
103-
10480
COPY . .
10581

10682
RUN set -eux; \
@@ -118,16 +94,13 @@ CMD ["php-fpm"]
11894
FROM caddy:${CADDY_VERSION}-builder-alpine AS symfony_caddy_builder
11995

12096
RUN xcaddy build \
121-
--with github.com/dunglas/mercure \
12297
--with github.com/dunglas/mercure/caddy \
123-
--with github.com/dunglas/vulcain \
12498
--with github.com/dunglas/vulcain/caddy
12599

126100
FROM caddy:${CADDY_VERSION} AS symfony_caddy
127101

128102
WORKDIR /srv/app
129103

130-
COPY --from=dunglas/mercure:v0.11 /srv/public /srv/mercure-assets/
131104
COPY --from=symfony_caddy_builder /usr/bin/caddy /usr/bin/caddy
132105
COPY --from=symfony_php /srv/app/public public/
133106
COPY docker/caddy/Caddyfile /etc/caddy/Caddyfile

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.DEFAULT_GOAL := help
22

3-
DC = docker-compose
3+
DC = docker compose
44
EXEC = $(DC) exec php
55
COMPOSER = $(EXEC) composer
66

@@ -57,7 +57,7 @@ start:
5757

5858
## Stop the project
5959
stop:
60-
@$(DC) kill
60+
@$(DC) stop
6161
@$(DC) rm -v --force
6262

6363
.PHONY: php database install vendor start stop

composer.json

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,34 @@
99
}
1010
],
1111
"require": {
12-
"php": ">=8.1",
12+
"php": ">=8.2",
1313
"ext-ctype": "*",
1414
"ext-iconv": "*",
1515
"api-platform/core": "^3.0",
16-
"doctrine/annotations": "^1.0",
16+
"doctrine/annotations": "^2.0",
1717
"doctrine/doctrine-bundle": "^2.5",
1818
"doctrine/orm": "^2.11",
1919
"nelmio/cors-bundle": "^2.2",
2020
"phpdocumentor/reflection-docblock": "^5.3",
2121
"phpstan/phpdoc-parser": "^1.2",
22-
"symfony/asset": "6.1.*",
23-
"symfony/console": "6.1.*",
24-
"symfony/dotenv": "6.1.*",
25-
"symfony/expression-language": "6.1.*",
22+
"symfony/asset": "6.2.*",
23+
"symfony/console": "6.2.*",
24+
"symfony/dotenv": "6.2.*",
25+
"symfony/expression-language": "6.2.*",
2626
"symfony/flex": "^2",
27-
"symfony/framework-bundle": "6.1.*",
28-
"symfony/messenger": "6.1.*",
27+
"symfony/framework-bundle": "6.2.*",
28+
"symfony/messenger": "6.2.*",
2929
"symfony/monolog-bundle": "^3.0",
30-
"symfony/property-access": "6.1.*",
31-
"symfony/property-info": "6.1.*",
32-
"symfony/proxy-manager-bridge": "6.1.*",
33-
"symfony/runtime": "6.1.*",
34-
"symfony/security-bundle": "6.1.*",
35-
"symfony/serializer": "6.1.*",
36-
"symfony/twig-bundle": "6.1.*",
37-
"symfony/uid": "6.1.*",
38-
"symfony/validator": "6.1.*",
39-
"symfony/yaml": "6.1.*",
30+
"symfony/property-access": "6.2.*",
31+
"symfony/property-info": "6.2.*",
32+
"symfony/proxy-manager-bridge": "6.2.*",
33+
"symfony/runtime": "6.2.*",
34+
"symfony/security-bundle": "6.2.*",
35+
"symfony/serializer": "6.2.*",
36+
"symfony/twig-bundle": "6.2.*",
37+
"symfony/uid": "6.2.*",
38+
"symfony/validator": "6.2.*",
39+
"symfony/yaml": "6.2.*",
4040
"webmozart/assert": "^1.10"
4141
},
4242
"config": {
@@ -87,22 +87,27 @@
8787
"extra": {
8888
"symfony": {
8989
"allow-contrib": false,
90-
"require": "6.1.*",
91-
"docker": true
90+
"require": "6.2.*",
91+
"docker": true,
92+
"endpoint": [
93+
"https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/main/index.json",
94+
"https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php-contrib/flex/main/index.json",
95+
"flex://defaults"
96+
]
9297
}
9398
},
9499
"require-dev": {
95100
"friendsofphp/php-cs-fixer": "^3.11",
96101
"justinrainbow/json-schema": "^5.2",
97102
"phpunit/phpunit": "^9.5",
98-
"qossmic/deptrac-shim": "^0.24.0",
99-
"symfony/browser-kit": "6.1.*",
100-
"symfony/css-selector": "6.1.*",
101-
"symfony/debug-bundle": "6.1.*",
102-
"symfony/http-client": "6.1.*",
103-
"symfony/phpunit-bridge": "^6.1",
104-
"symfony/stopwatch": "6.1.*",
105-
"symfony/web-profiler-bundle": "6.1.*",
106-
"vimeo/psalm": "^4.27"
103+
"qossmic/deptrac-shim": "^1.0",
104+
"symfony/browser-kit": "6.2.*",
105+
"symfony/css-selector": "6.2.*",
106+
"symfony/debug-bundle": "6.2.*",
107+
"symfony/http-client": "6.2.*",
108+
"symfony/phpunit-bridge": "6.2.*",
109+
"symfony/stopwatch": "6.2.*",
110+
"symfony/web-profiler-bundle": "6.2.*",
111+
"vimeo/psalm": "^5.6"
107112
}
108113
}

0 commit comments

Comments
 (0)