Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.18.0 #330

Merged
merged 173 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
710c238
Use smaller docker image for composer binary
veteran29 Nov 3, 2022
c5e30a0
Merge pull request #261 from ArmaForces/composer-bin
veteran29 Nov 3, 2022
11e7e96
Add GitHub icon to navbar
3Mydlo3 Jan 4, 2023
a5f95e9
Change navbar icon GitHub link to ArmaForces organization
3Mydlo3 Jan 5, 2023
3623a26
Revert icon name
3Mydlo3 Jan 5, 2023
8e001f4
Add ArmaForces organization GitHub link icon to navbar (#262)
3Mydlo3 Mar 19, 2023
7227d02
Add Spearhead DLC icon (#263)
jskowronski39 Jul 24, 2023
479f833
Update Symfony to the latest LTS version (#264)
jskowronski39 Jul 24, 2023
5814a07
Replace Restcord with DiscordPHP
jskowronski39 Aug 9, 2023
3a256bb
Update Dockerfile to PHP 8.1
veteran29 Aug 14, 2023
dcbcf56
Update default php config
veteran29 Aug 14, 2023
ed04aa3
Add optional way of removing vendor/ from bind mount for Windows/Mac
veteran29 Aug 14, 2023
15b5173
Disable preload.php
veteran29 Aug 14, 2023
f82628e
Re-enable preload.php on prod
veteran29 Aug 14, 2023
7a42eac
Remove tabs from dockerfile
veteran29 Aug 14, 2023
d0defa6
Add pdo_mysql
veteran29 Aug 14, 2023
aa551fc
Update entrypoint, disable preload
veteran29 Aug 14, 2023
2487fa1
Allow setfacl to fail
veteran29 Aug 14, 2023
573fc6d
Update info about bind mounts on Windows/Mac
veteran29 Aug 14, 2023
5590161
Merge pull request #267 from ArmaForces/feature/replace-restcord
jskowronski39 Aug 14, 2023
1178c5a
Output PHP container logs on CI failure
veteran29 Aug 14, 2023
98dd777
Fix tests failure
veteran29 Aug 14, 2023
0090d42
Wait for database in docker-entrypoint
veteran29 Aug 14, 2023
fe6c19c
Wait for database before attempting DB migration
veteran29 Aug 14, 2023
92ef575
Simplify permissions structure (#268)
jskowronski39 Aug 14, 2023
b6f00c2
Update database wait
veteran29 Aug 14, 2023
34ac0fd
Set APP_ENV of test stack
veteran29 Aug 14, 2023
51fdb9c
Dockerfile - Bump PHP to 8.1, simplify extension installs (#270)
jskowronski39 Aug 14, 2023
db546db
Refactor entities
jskowronski39 Aug 14, 2023
fc2bf8a
Entities refactor (#269)
jskowronski39 Aug 14, 2023
b966515
Prevent auto package install in test
veteran29 Aug 15, 2023
0808f15
Add interfaces to services
jskowronski39 Aug 14, 2023
734a58d
Refactor controllers using ADR pattern
jskowronski39 Aug 15, 2023
2bdc5ff
Refactor validators; replace annotations with attributes
jskowronski39 Aug 15, 2023
461669d
Add interfaces to services (#271)
jskowronski39 Aug 15, 2023
63f4c7c
Refactor controllers using ADR pattern (#272)
jskowronski39 Aug 15, 2023
349fd3b
Refactor validators; replace annotations with attributes (#273)
jskowronski39 Aug 15, 2023
8fd0d5e
Remove some of the deprecations
jskowronski39 Aug 15, 2023
f987c54
Refactor ApiKeyAuthenticator
jskowronski39 Aug 15, 2023
daff501
Refactor DiscordAuthenticator
jskowronski39 Aug 15, 2023
762e311
Remove some of the deprecations (#274)
jskowronski39 Aug 15, 2023
1545b13
Refactor authentication; switch to Passports (#275)
jskowronski39 Aug 15, 2023
1144cba
Fix use externalId as Passport user identifier
jskowronski39 Aug 15, 2023
52a47f3
Fix missing union return type
jskowronski39 Aug 15, 2023
552c59c
Fix missing union return type (#276)
jskowronski39 Aug 16, 2023
d5c3b6b
Fix use externalId as Passport user identifier (#277)
jskowronski39 Aug 16, 2023
3e9bb85
Fix missing voter subject
jskowronski39 Aug 18, 2023
f805c8c
Fix mods display condition
jskowronski39 Aug 18, 2023
991a5b4
Fix DLC validator
jskowronski39 Aug 18, 2023
2f4f1f3
Replace expression assert with custom validator
jskowronski39 Aug 18, 2023
2f42171
Fix missing voter subject (#279)
jskowronski39 Aug 18, 2023
5ee2cfe
Fix mods display condition (#280)
jskowronski39 Aug 18, 2023
91527cf
Fix DLC validator (#281)
jskowronski39 Aug 18, 2023
99e4d22
Replace expression assert with custom validator (#282)
jskowronski39 Aug 18, 2023
5eda103
Update Symfony version to 6.3
jskowronski39 Aug 15, 2023
554f625
Update PHP to 8.2
jskowronski39 Aug 16, 2023
998ef3b
Ensure code compatibility
jskowronski39 Aug 15, 2023
7b10889
Update Symfony to 6.3 and PHP 8.2 (#278)
jskowronski39 Aug 18, 2023
dde950d
Update frontend dependencies
jskowronski39 Aug 18, 2023
58f4a6a
Update frontend dependencies (#283)
jskowronski39 Aug 19, 2023
78a15ab
Remove old configs
jskowronski39 Aug 19, 2023
20a9731
Remove old configs (#284)
jskowronski39 Aug 19, 2023
bc919d0
Remove invalid typehint
jskowronski39 Aug 19, 2023
dd2c1aa
Remove invalid typehint (#285)
jskowronski39 Aug 19, 2023
afef56d
Fix issue with mods lost on update
jskowronski39 Aug 26, 2023
a4ea50a
Fix issue with mods lost on update - dev (#287)
veteran29 Aug 26, 2023
7058e8e
Remove call to deprecated service
jskowronski39 Aug 27, 2023
a9d7c3a
Remove unused repository method
jskowronski39 Aug 27, 2023
e915aa7
Fix readme workflows badge
jskowronski39 Aug 27, 2023
12387ca
Replace elao/enum with native PHP enums
jskowronski39 Aug 27, 2023
a286ac5
Remove call to deprecated service (#290)
jskowronski39 Aug 27, 2023
bbc53af
Remove unused repository method (#289)
jskowronski39 Aug 27, 2023
2d1029d
Fix readme workflows badge (#291)
jskowronski39 Aug 27, 2023
1ecc70c
Add tests namespace checker function; fix namespaces
jskowronski39 Aug 28, 2023
ef64f94
Replace elao/enum with native PHP enums (#288)
jskowronski39 Aug 28, 2023
96043b6
Add tests namespace checker function; fix namespaces (#292)
jskowronski39 Aug 28, 2023
dc71376
Wait for services to be ready in detached mode
veteran29 Aug 29, 2023
d0b7254
Use docker compose instead of docker-compose
veteran29 Aug 29, 2023
afbdb14
Tests - Wait for services to be ready in detached mode (#293)
veteran29 Aug 29, 2023
4c7adb6
Improve mysql container healthcheck
jskowronski39 Oct 5, 2023
277f46f
Remove unused data provider
jskowronski39 Oct 10, 2023
c3c7525
Fix test name
jskowronski39 Oct 10, 2023
c3d64fa
Improve mysql container healthcheck (#294)
jskowronski39 Oct 12, 2023
024df13
Fix tests (#295)
jskowronski39 Oct 12, 2023
952bfb2
Add Steam API client mock
jskowronski39 Oct 10, 2023
e525abf
Add Steam API client mock (#296)
jskowronski39 Oct 13, 2023
1c201bc
Replace MySQL with Postgres
jskowronski39 Oct 12, 2023
340df3c
Replace MySQL with Postgres (#297)
jskowronski39 Oct 13, 2023
4647951
Fix validators
jskowronski39 Oct 20, 2023
045f1bb
Disable mod source change on edit
jskowronski39 Oct 22, 2023
fd00872
Fix validators (#300)
jskowronski39 Oct 22, 2023
a7e772d
Disable mod source change on edit (#301)
jskowronski39 Oct 22, 2023
ffc3cc0
Use mod source list to determine available fields and options
jskowronski39 Oct 22, 2023
18be65c
Use mod source list to determine available fields and options (#302)
jskowronski39 Oct 22, 2023
1d0e4e7
Add time freeze to fixtures
jskowronski39 Oct 22, 2023
8166d82
Restore removed tests
jskowronski39 Oct 22, 2023
1bd550b
Use clock component (#303)
jskowronski39 Oct 22, 2023
68ceb3c
Fix migrations
jskowronski39 Oct 22, 2023
29c617e
Merge branch 'master' into feature/sync-dev-master
jskowronski39 Oct 22, 2023
c8e7954
Sync dev master (#304)
jskowronski39 Oct 25, 2023
f278420
Update Symfony and related packages to latest version
jskowronski39 Jan 7, 2024
9ba4259
Update Symfony and related packages to latest version (#305)
jskowronski39 Jan 7, 2024
71bab1a
Fix store SteamId on user login
jskowronski39 Dec 28, 2023
176ec96
Fix use common template for both user and user group permissions
jskowronski39 Jan 7, 2024
64004b2
Use dedicated repository method to fetch single mod list
jskowronski39 Jan 7, 2024
a8e9668
Remove unused dependency
jskowronski39 Jan 7, 2024
2c897f0
Use attributes instead of annotations
jskowronski39 Jan 7, 2024
7e7f773
Remove recreate mod when changing mod type
jskowronski39 Jan 7, 2024
8151144
Fix route argument name
jskowronski39 Jan 7, 2024
663b938
Improve handling of empty values in validators
jskowronski39 Jan 7, 2024
3700e35
Change validation message target to specific field instead of form
jskowronski39 Jan 7, 2024
ad47263
Fix issue with cascade delete when user assigned as owner to mod list
jskowronski39 Jan 7, 2024
187ac4a
Fix directory validator regex
jskowronski39 Jan 7, 2024
78d0f87
Make translation messages consistent with Symfony validators
jskowronski39 Jan 7, 2024
9e01769
Reimplement background image cache to avoid cache warmup on deploy
jskowronski39 Jan 8, 2024
be576c7
Fix store SteamId on user login (#306)
jskowronski39 Jan 8, 2024
00dad38
Fix use common template for both user and user group permissions (#307)
jskowronski39 Jan 8, 2024
9ce7f74
Use dedicated repository method to fetch single mod list (#308)
jskowronski39 Jan 8, 2024
afabe10
Remove unused dependency (#309)
jskowronski39 Jan 8, 2024
cae15b2
Use attributes instead of annotations (#310)
jskowronski39 Jan 8, 2024
a7c62eb
Remove recreate mod when changing mod type (#311)
jskowronski39 Jan 8, 2024
f6bca3a
Fix route argument name (#312)
jskowronski39 Jan 8, 2024
fd26cdd
Improve handling of empty values in validators (#313)
jskowronski39 Jan 8, 2024
17f976f
Change validation message target to specific field instead of form (#…
jskowronski39 Jan 8, 2024
21a8187
Fix issue with cascade delete when user assigned as owner to mod list…
jskowronski39 Jan 8, 2024
93700a6
Fix directory validator regex (#316)
jskowronski39 Jan 8, 2024
a267ad5
Make translation messages consistent with Symfony validators (#317)
jskowronski39 Jan 8, 2024
75ed412
Reimplement background image cache to avoid cache warmup on deploy (#…
jskowronski39 Jan 8, 2024
14b0932
Update readme oauth integration description
jskowronski39 Jan 10, 2024
ed9714a
Add Codeception with extra modules
jskowronski39 Jan 10, 2024
6c978a3
Add Codeception config
jskowronski39 Aug 28, 2023
9be4e84
Update unit tests
jskowronski39 Oct 12, 2023
27d828f
Update integration tests
jskowronski39 Oct 12, 2023
869b5d2
Remove existing functional tests
jskowronski39 Oct 28, 2023
08982ce
Refactor fixtures
jskowronski39 Jan 13, 2024
6b68bce
Add home page tests
jskowronski39 Jan 10, 2024
babdda8
Add security tests
jskowronski39 Jan 10, 2024
25f3bb3
Add user tests
jskowronski39 Jan 10, 2024
35c1f50
Add user group tests
jskowronski39 Jan 10, 2024
aa2ff2c
Add DLC tests
jskowronski39 Jan 10, 2024
396b4fd
Add mod tests
jskowronski39 Jan 10, 2024
403514f
Add mod group tests
jskowronski39 Jan 10, 2024
885ebee
Add mod list tests
jskowronski39 Jan 10, 2024
2fc13eb
Add mod list public tests
jskowronski39 Jan 10, 2024
29672ba
Add attendance api tests
jskowronski39 Jan 10, 2024
98b9562
Add mod list api tests
jskowronski39 Jan 10, 2024
b829c58
Remove data transformer registry
jskowronski39 Jan 13, 2024
9ba76f5
Remove unused command
jskowronski39 Jan 13, 2024
184fc2d
Add codeception; improve functional tests (#319)
jskowronski39 Jan 15, 2024
ddca1cc
Remove data transformer registry (#321)
jskowronski39 Jan 15, 2024
ecb70bd
Remove unused command (#322)
jskowronski39 Jan 15, 2024
c3e4e0a
Update readme oauth integration description (#320)
jskowronski39 Jan 15, 2024
1d0e1d9
Change access modifiers to private
jskowronski39 Jan 13, 2024
205f85e
Remove doctrine test bundle
jskowronski39 Jan 15, 2024
686e545
Change access modifiers to private (#323)
jskowronski39 Jan 15, 2024
8d7e3a8
Remove doctrine test bundle (#324)
jskowronski39 Jan 15, 2024
f6e3815
Update Api Platform to 3.2
jskowronski39 Jan 15, 2024
337e6e9
Adjust config and existing code
jskowronski39 Jan 19, 2024
8cc9928
Update Api Platform to 3.2 (#325)
jskowronski39 Mar 6, 2024
1f916eb
Add identifier factory
jskowronski39 Mar 6, 2024
2203fcb
Split code by modules
jskowronski39 Mar 9, 2024
4402790
Add identifier factory (#326)
jskowronski39 Mar 15, 2024
b86dea6
Split code by modules (#327)
jskowronski39 Mar 15, 2024
78587bb
Replace doctrine subscribers with listeners
jskowronski39 Mar 17, 2024
9568cff
Replace doctrine subscribers with listeners (#329)
jskowronski39 Jun 27, 2024
3b1efec
Update Doctrine ORM to fix an issue with schema validation
jskowronski39 Nov 16, 2024
cc6d5dc
Update framework dependencies to fix security issues
jskowronski39 Nov 16, 2024
02ea0c7
Fix docker compose deprecations
jskowronski39 Nov 16, 2024
89c9bf6
Fix ORM schema validation by updating project dependencies (#331)
jskowronski39 Nov 27, 2024
6e2672a
Add support for external mod lists
jskowronski39 Nov 16, 2024
20c34af
Add support for external mod lists (#332)
jskowronski39 Nov 28, 2024
6cf1040
Refactor navbar items rendering
jskowronski39 Nov 28, 2024
d3b40cb
Refactor navbar items rendering (#333)
jskowronski39 Nov 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
89 changes: 35 additions & 54 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
# the different stages of this Dockerfile are meant to be built into separate images
# https://docs.docker.com/compose/compose-file/#target

ARG PHP_VERSION=8.0
ARG PHP_VERSION=8.2
ARG NGINX_VERSION=1.17

# Build assets in disposable node image
FROM node:11-alpine as armaforces_web_assets
FROM node:18-alpine as armaforces_web_assets

WORKDIR /tmp/app_build

COPY package.json package-lock.json webpack.config.js ./
COPY --link package.json package-lock.json webpack.config.js ./
RUN npm install

WORKDIR /tmp/app_build/assets/

COPY assets ./
COPY --link assets ./
RUN npm run build:ci


# Build PHP application image
FROM php:${PHP_VERSION}-fpm-alpine AS armaforces_web_php

# build for production
ENV APP_ENV=prod

WORKDIR /www/app

# php extensions installer: https://github.com/mlocati/docker-php-extension-installer
COPY --from=mlocati/php-extension-installer --link /usr/bin/install-php-extensions /usr/local/bin/

# persistent / runtime deps
RUN apk add --no-cache \
acl \
fcgi \
Expand All @@ -29,63 +38,33 @@ RUN apk add --no-cache \
git \
;

ARG APCU_VERSION=5.1.18
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
icu-dev \
libzip-dev \
zlib-dev \
postgresql-dev \
; \
\
docker-php-ext-configure zip; \
docker-php-ext-install -j$(nproc) \
install-php-extensions \
intl \
zip \
pdo_pgsql \
; \
pecl install \
apcu-${APCU_VERSION} \
; \
pecl clear-cache; \
docker-php-ext-enable \
apcu \
opcache \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --no-cache --virtual .api-phpexts-rundeps $runDeps; \
\
apk del .build-deps \
;

COPY --from=composer/composer:2-bin /composer /usr/bin/composer
RUN ln -s $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
COPY .docker/php/conf.d/armaforces-web.ini $PHP_INI_DIR/conf.d/armaforces-web.ini
pdo_pgsql \
;

RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
COPY --link .docker/php/conf.d/armaforces-web.ini $PHP_INI_DIR/conf.d/
COPY --link .docker/php/conf.d/armaforces-web.prod.ini $PHP_INI_DIR/conf.d/

# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV PATH="${PATH}:/root/.composer/vendor/bin"

WORKDIR /www/app

# build for production
ARG APP_ENV=prod
COPY --from=composer/composer:2-bin --link /composer /usr/bin/composer

# prevent the reinstallation of vendors at every changes in the source code
COPY composer.json composer.lock symfony.lock .env ./
RUN set -eux; \
composer install --prefer-dist --no-dev --no-scripts --no-progress --no-suggest; \
composer install --prefer-dist --no-dev --no-scripts --no-progress; \
composer clear-cache

# copy only specifically what we need
COPY bin bin/
COPY --link bin bin/
COPY config config/
COPY migrations migrations/
COPY public public/
Expand All @@ -98,12 +77,11 @@ RUN set -eux; \
composer dump-autoload --classmap-authoritative --no-dev; \
composer run-script --no-dev post-install-cmd; \
chmod +x bin/console; sync
VOLUME /www/app/var

# copy assets manifests
COPY --from=armaforces_web_assets /tmp/app_build/public/build/ public/build/

COPY .docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
COPY --link .docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint

# .env is copied again as COPY needs to copy at least one file
Expand All @@ -130,20 +108,23 @@ CMD ["nginx", "-g", "daemon off;"]

FROM armaforces_web_php AS armaforces_web_php_dev

ARG XDEBUG_VERSION=3.1.1
ENV APP_ENV=dev
#VOLUME /www/app/var/

RUN rm $PHP_INI_DIR/conf.d/app.prod.ini; \
mv "$PHP_INI_DIR/php.ini" "$PHP_INI_DIR/php.ini-production"; \
mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"

RUN set -eux; \
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS; \
pecl install xdebug-$XDEBUG_VERSION; \
docker-php-ext-enable xdebug; \
apk del .build-deps
install-php-extensions xdebug

RUN apk add --no-cache \
nodejs \
npm

ENV XDEBUG_INI_PATH=$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini
COPY .docker/php/conf.d/docker-php-ext-xdebug.ini $XDEBUG_INI_PATH
COPY --link .docker/php/conf.d/docker-php-ext-xdebug.ini $XDEBUG_INI_PATH

COPY .docker/php/scripts/xon.sh /usr/bin/xon
COPY .docker/php/scripts/xoff.sh /usr/bin/xoff
COPY --link .docker/php/scripts/xon.sh /usr/bin/xon
COPY --link .docker/php/scripts/xoff.sh /usr/bin/xoff
RUN chmod +x /usr/bin/xon /usr/bin/xoff
17 changes: 9 additions & 8 deletions .docker/php/conf.d/armaforces-web.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Borrowed from https://github.com/api-platform/api-platform/blob/master/api/docker/php/conf.d/api-platform.ini

apc.enable_cli = 1
# Borrowed from https://github.com/api-platform/api-platform/blob/6ddd494ccec4dc5d0329c1ded75101e58b8747e4/api/docker/php/conf.d/app.ini
expose_php = 0
date.timezone = Europe/Warsaw
session.auto_start = Off
short_open_tag = Off
apc.enable_cli = 1
session.use_strict_mode = 1
zend.detect_unicode = 0

# http://symfony.com/doc/current/performance.html
; https://symfony.com/doc/current/performance.html
realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.enable_file_override = 1
2 changes: 2 additions & 0 deletions .docker/php/conf.d/armaforces-web.prod.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
;opcache.preload_user = www-data
;opcache.preload = /www/app/config/preload.php
12 changes: 5 additions & 7 deletions .docker/php/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ if [ "${1#-}" != "$1" ]; then
fi

if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
PHP_INI_RECOMMENDED="$PHP_INI_DIR/php.ini-production"
if [ "$APP_ENV" != 'prod' ]; then
PHP_INI_RECOMMENDED="$PHP_INI_DIR/php.ini-development"
fi
ln -sf "$PHP_INI_RECOMMENDED" "$PHP_INI_DIR/php.ini"

mkdir -p var/cache var/log
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var || true
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var || true

if [ "$APP_ENV" = 'dev' ]; then
composer install --prefer-dist --no-progress --no-interaction || true
fi

if [ "$APP_ENV" = 'prod' ]; then
php bin/console doctrine:migrations:migrate --allow-no-migration --no-interaction
fi

fi

exec docker-php-entrypoint "$@"
5 changes: 1 addition & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
Expand Down Expand Up @@ -43,10 +44,6 @@ APP_SECRET=3c0e1589d36f2c28609e4ec5af60f545
DATABASE_URL="postgresql://user:password@pgsql:5432/af_website?serverVersion=16&charset=utf8"
###< doctrine/doctrine-bundle ###

###> symfony/mailer ###
# MAILER_DSN=smtp://localhost
###< symfony/mailer ###

###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ###
6 changes: 3 additions & 3 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
SYMFONY_DEPRECATIONS_HELPER=weak
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

APP_SECURITY_OAUTH_DISCORD_SERVER_ID=1
APP_SECURITY_OAUTH_DISCORD_SERVER_ID=

APP_SECURITY_API_ALLOWED_KEYS=test_key

APP_URL_TEAMSPEAK='teamspeak.example.com'
APP_URL_TEAMSPEAK='ts3server://ts.localhost.com?password=test'
18 changes: 12 additions & 6 deletions .github/workflows/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,27 @@ jobs:

- name: Start stack
run: |
docker-compose -f docker-compose.test.yml up -d
docker-compose exec -T php composer install
docker compose -f docker-compose.test.yml up --wait
docker compose exec -T php composer install

- name: Setup database
- name: Setup tests
run: |
make db env=test
make test-setup

- name: Run lint
run: |
docker-compose exec -T php bin/console cache:warmup --env=dev
docker compose exec -T php bin/console cache:warmup --env=dev
make cs env=test ci=true

- name: Run tests
run: |
make test-ci
make test

- name: Failure logs
if: failure()
run: |
docker compose logs php
docker compose logs mysql

docker_release:
name: Docker release
Expand Down
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.idea
/VERSION
# IDEs
.idea

/VERSION
fos_js_routes.js
public/img/background

Expand All @@ -14,16 +15,16 @@ public/img/background
/vendor/
###< symfony/framework-bundle ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
Expand Down
15 changes: 9 additions & 6 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
->exclude('node_modules')
->notPath('config/bundles.php')
Expand All @@ -11,7 +12,11 @@
->notPath('public/index.php')
->notPath('src/Kernel.php')
->notPath('tests/bootstrap.php')
->in(__DIR__)

# Codeception
->exclude('tests/_data')
->exclude('tests/_output')
->exclude('tests/_support/_generated')
;

return (new PhpCsFixer\Config())
Expand All @@ -26,12 +31,11 @@
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,

'php_unit_test_annotation' => [
'style' => 'annotation',
],
'php_unit_internal_class' => false,
'php_unit_method_casing' => false,
'php_unit_test_class_requires_covers' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'ordered_traits' => false,
'ordered_class_elements' => [
'order' => [
'use_trait', // traits
Expand Down Expand Up @@ -64,7 +68,6 @@
],
'sort_algorithm' => 'none',
],
'phpdoc_separation' => false
])
->setFinder($finder)
;
Loading