Skip to content

Commit a6853e0

Browse files
author
DKravtsov
committed
PHP 8.5, MySQL 8.4.8, updated composer dependencies, refactoring.
1 parent d04fa39 commit a6853e0

94 files changed

Lines changed: 2927 additions & 1677 deletions

File tree

Some content is hidden

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

.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ XDEBUG_VERSION=3.5.0
3131
###< XDebug docker configuration ###
3232

3333
###> MySQL docker configuration. Can be overridden in: .env.local, .env.staging, .env.prod. ###
34-
# MySQL version, recommend values: 9.4.0|8.4.7|8.0.43
35-
MYSQL_VERSION=8.4.7
34+
# MySQL version, recommend values: 9.6.0|8.4.8|8.0.43
35+
MYSQL_VERSION=8.4.8
3636
# MySQL INNODB_USE_NATIVE_AIO possible values: 1|0. Set to 0 when AIO interface is not supported on OSX. https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_use_native_aio
3737
INNODB_USE_NATIVE_AIO=1
3838
# Sometimes AWS MySQL RDS has SQL_MODE="NO_ENGINE_SUBSTITUTION" (https://github.com/awsdocs/amazon-rds-user-guide/issues/160) but MySQL default described here - https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_sql_mode
@@ -120,7 +120,7 @@ JWT_TOKEN_TTL=3600
120120
###< lexik/jwt-authentication-bundle ###
121121

122122
###> nelmio/cors-bundle ###
123-
CORS_ALLOW_ORIGIN='^https?://localhost(:[0-9]+)?$'
123+
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
124124
###< nelmio/cors-bundle ###
125125

126126
###> Api-key options ###

.idea/php.xml

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

Dockerfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1.7-labs
2-
FROM php:8.4-fpm
2+
FROM php:8.5-fpm-bookworm
33

44
# set main params
55
ARG BUILD_ARGUMENT_ENV=dev
@@ -14,7 +14,6 @@ ARG XDEBUG_CONFIG=main
1414
ENV XDEBUG_CONFIG=$XDEBUG_CONFIG
1515
ARG XDEBUG_VERSION=3.5.0
1616
ENV XDEBUG_VERSION=$XDEBUG_VERSION
17-
ENV PHP_CS_FIXER_IGNORE_ENV=1
1817

1918
# check environment
2019
RUN if [ "$BUILD_ARGUMENT_ENV" = "default" ]; then echo "Set BUILD_ARGUMENT_ENV in docker build-args like --build-arg BUILD_ARGUMENT_ENV=dev" && exit 2; \
@@ -54,7 +53,6 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
5453
pdo_mysql \
5554
sockets \
5655
intl \
57-
opcache \
5856
zip \
5957
bcmath \
6058
&& docker-php-ext-enable amqp \
@@ -65,6 +63,9 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
6563
&& rm -rf /var/lib/apt/lists/* \
6664
&& apt-get clean
6765

66+
# Pull the PHP extension installer from the official image
67+
COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensions /usr/local/bin/
68+
6869
# create document root, fix permissions for www-data user and change owner to www-data
6970
RUN mkdir -p $APP_HOME/public && \
7071
mkdir -p /home/$USERNAME && chown $USERNAME:$USERNAME /home/$USERNAME \
@@ -77,9 +78,13 @@ COPY ./docker/$BUILD_ARGUMENT_ENV/www.conf /usr/local/etc/php-fpm.d/www.conf
7778
COPY ./docker/$BUILD_ARGUMENT_ENV/php.ini /usr/local/etc/php/php.ini
7879

7980
# install Xdebug in case dev/test environment
80-
COPY ./docker/general/do_we_need_xdebug.sh /tmp/
8181
COPY ./docker/dev/xdebug-${XDEBUG_CONFIG}.ini /tmp/xdebug.ini
82-
RUN chmod u+x /tmp/do_we_need_xdebug.sh && /tmp/do_we_need_xdebug.sh
82+
RUN if [ "$ENV" = "dev" ] || [ "$ENV" = "test" ]; then \
83+
install-php-extensions xdebug-${XDEBUG_VERSION} && \
84+
mv /tmp/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini; \
85+
else \
86+
rm /tmp/xdebug.ini; \
87+
fi
8388

8489
# install composer
8590
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ else
407407
endif
408408

409409
phpmd: ## Runs php mess detector
410-
@make exec cmd="php ./vendor/bin/phpmd src,tests text phpmd_ruleset.xml --suffixes php"
410+
@make exec cmd="php ./vendor/bin/phpmd analyze --format=text --ruleset=phpmd_ruleset.xml --suffixes=php src tests"
411411

412412
phpstan: ## Runs PhpStan static analysis tool
413413
ifeq ($(INSIDE_DOCKER_CONTAINER), 1)

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"Elasticsearch"
1515
],
1616
"homepage": "https://github.com/systemsdk/docker-symfony-api",
17-
"version": "v3.9.0",
17+
"version": "v4.0.0",
1818
"license": "MIT",
1919
"authors": [
2020
{
@@ -45,7 +45,7 @@
4545
}
4646
],
4747
"require": {
48-
"php": "^8.4.0",
48+
"php": "^8.5.0",
4949
"ext-amqp": "*",
5050
"ext-ctype": "*",
5151
"ext-iconv": "*",
@@ -65,11 +65,11 @@
6565
"gedmo/doctrine-extensions": "3.22.*",
6666
"lexik/jwt-authentication-bundle": "3.2.*",
6767
"mark-gerarts/automapper-plus-bundle": "1.5.*",
68-
"matomo/device-detector": "6.4.*",
69-
"matthiasnoback/symfony-console-form": "6.0.*",
70-
"nelmio/api-doc-bundle": "5.8.*",
68+
"matomo/device-detector": "6.5.*",
69+
"matthiasnoback/symfony-console-form": "7.0.*",
70+
"nelmio/api-doc-bundle": "5.9.*",
7171
"nelmio/cors-bundle": "2.6.*",
72-
"phpdocumentor/reflection-docblock": "^5.6.6",
72+
"phpdocumentor/reflection-docblock": "^6.0.3",
7373
"ramsey/uuid-doctrine": "2.1.*",
7474
"symfony/amqp-messenger": "7.4.*",
7575
"symfony/asset": "7.4.*",
@@ -97,11 +97,11 @@
9797
"symfony/routing": "7.4.*",
9898
"symfony/security-bundle": "7.4.*",
9999
"symfony/serializer": "7.4.*",
100-
"symfony/stimulus-bundle": "^2.33.0",
100+
"symfony/stimulus-bundle": "^2.34.0",
101101
"symfony/string": "7.4.*",
102102
"symfony/translation": "7.4.*",
103103
"symfony/twig-bundle": "7.4.*",
104-
"symfony/ux-turbo": "^2.33.0",
104+
"symfony/ux-turbo": "^2.34.0",
105105
"symfony/validator": "7.4.*",
106106
"symfony/web-link": "7.4.*",
107107
"symfony/yaml": "7.4.*",
@@ -119,7 +119,7 @@
119119
"systemsdk/easy-log-bundle": "^2.1.0",
120120
"roave/security-advisories": "dev-latest",
121121
"symfony/debug-bundle": "7.4.*",
122-
"symfony/maker-bundle": "^1.66.0",
122+
"symfony/maker-bundle": "^1.67.0",
123123
"symfony/requirements-checker": "^2.0.3",
124124
"symfony/stopwatch": "7.4.*",
125125
"symfony/var-dumper": "7.4.*",
@@ -139,7 +139,7 @@
139139
"config": {
140140
"allow-plugins": true,
141141
"platform": {
142-
"php": "8.4.0"
142+
"php": "8.5.0"
143143
},
144144
"preferred-install": {
145145
"*": "dist"

0 commit comments

Comments
 (0)