Skip to content

Commit d1cd1eb

Browse files
author
DKravtsov
committed
Updated composer dependencies, refactoring, added new security checker, added phpstan-deprecation-rules.
1 parent fa93c44 commit d1cd1eb

File tree

110 files changed

+1214
-837
lines changed

Some content is hidden

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

110 files changed

+1214
-837
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ XDEBUG_VERSION=3.3.2
3131
###< XDebug docker configuration ###
3232

3333
###> MySQL docker configuration. Can be overridden in: .env.local, .env.staging, .env.prod. ###
34-
# MySQL version, recommend values: 8.4.2|8.3.0|8.2.0|8.1.0|8.0.39
34+
# MySQL version, recommend values: 9.1.0|9.0.1|8.4.2|8.3.0|8.2.0|8.1.0|8.0.39
3535
MYSQL_VERSION=8.4.2
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

.idea/php.xml

+296-295
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# syntax=docker/dockerfile:1.7-labs
12
FROM php:8.3-fpm
23

34
# set main params
@@ -42,6 +43,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
4243
libzip-dev \
4344
wget \
4445
librabbitmq-dev \
46+
debsecan \
4547
&& pecl install amqp \
4648
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
4749
&& docker-php-ext-configure intl \
@@ -53,6 +55,8 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
5355
opcache \
5456
zip \
5557
&& docker-php-ext-enable amqp \
58+
&& apt-get install --no-install-recommends -y \
59+
$(debsecan --suite bookworm --format packages --only-fixed) \
5660
&& rm -rf /tmp/* \
5761
&& rm -rf /var/list/apt/* \
5862
&& rm -rf /var/lib/apt/lists/* \
@@ -74,10 +78,6 @@ COPY ./docker/general/do_we_need_xdebug.sh /tmp/
7478
COPY ./docker/dev/xdebug-${XDEBUG_CONFIG}.ini /tmp/xdebug.ini
7579
RUN chmod u+x /tmp/do_we_need_xdebug.sh && /tmp/do_we_need_xdebug.sh
7680

77-
# install security-checker in case dev/test environment
78-
COPY ./docker/general/do_we_need_security-checker.sh /tmp/
79-
RUN chmod u+x /tmp/do_we_need_security-checker.sh && /tmp/do_we_need_security-checker.sh
80-
8181
# install composer
8282
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
8383
RUN chmod +x /usr/bin/composer
@@ -114,6 +114,10 @@ RUN if [ "$BUILD_ARGUMENT_ENV" = "dev" ] || [ "$BUILD_ARGUMENT_ENV" = "test" ];
114114
else export APP_ENV=$BUILD_ARGUMENT_ENV && COMPOSER_MEMORY_LIMIT=-1 composer install --optimize-autoloader --no-interaction --no-progress --no-dev; \
115115
fi
116116

117+
# checks for security vulnerability advisories for installed packages in case dev/test environment
118+
RUN if [ "$BUILD_ARGUMENT_ENV" = "dev" ] || [ "$BUILD_ARGUMENT_ENV" = "test" ]; then COMPOSER_MEMORY_LIMIT=-1 composer audit; \
119+
fi
120+
117121
# create cached config file .env.local.php in case staging/prod environment
118122
RUN if [ "$BUILD_ARGUMENT_ENV" = "staging" ] || [ "$BUILD_ARGUMENT_ENV" = "prod" ]; then composer dump-env $BUILD_ARGUMENT_ENV; \
119123
fi

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ composer-install: ## Installs composer dependencies
277277
composer-update: ## Updates composer dependencies
278278
@make exec-bash cmd="COMPOSER_MEMORY_LIMIT=-1 composer update"
279279

280+
composer-audit: ## Checks for security vulnerability advisories for installed packages
281+
@make exec-bash cmd="COMPOSER_MEMORY_LIMIT=-1 composer audit"
282+
280283
info: ## Shows Php and Symfony version
281284
@make exec cmd="php --version"
282285
@make exec cmd="bin/console about"

composer.json

+1-1
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.2.1",
17+
"version": "v3.3.0",
1818
"license": "MIT",
1919
"authors": [
2020
{

0 commit comments

Comments
 (0)