-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: migrate to PHP 8.4 and Symfony 6.4 #128
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
Open
PedroTroller
wants to merge
1
commit into
master
Choose a base branch
from
refactor/php84-symfony64
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
| name: Pull Request | ||
|
|
||
| on: pull_request | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| php-cs-fixer: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - run: make start | ||
| - run: docker compose run --rm --no-deps php vendor/bin/php-cs-fixer fix --diff --dry-run | ||
| container-deprecations: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - run: make start | ||
| - run: | | ||
| OUTPUT=$(docker compose run --rm --no-deps php bin/console debug:container --deprecations) | ||
|
|
||
| echo "$OUTPUT" | ||
|
|
||
| if [[ "$OUTPUT" == *"[OK]"* ]]; then | ||
| exit 0 | ||
| else | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?php | ||
|
|
||
| $finder = new PhpCsFixer\Finder() | ||
| ->in(__DIR__) | ||
| ->exclude('var') | ||
| ; | ||
|
|
||
| return new PhpCsFixer\Config() | ||
| ->setRules([ | ||
| '@PhpCsFixer:risky' => true, | ||
| '@PHP84Migration' => true, | ||
| ]) | ||
| ->setRiskyAllowed(true) | ||
| ->setFinder($finder) | ||
| ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()) | ||
| ->setUsingCache(false) | ||
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,38 @@ | ||
| FROM composer:2.5.8 as composer | ||
| FROM composer:2 AS composer | ||
|
|
||
| ################################## | ||
|
|
||
| FROM php:8.3.6-fpm-alpine3.19 | ||
| FROM php:8.4-fpm-alpine | ||
|
|
||
| COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
|
||
| RUN apk add --no-cache \ | ||
| bash==5.2.21-r0 \ | ||
| git==2.43.6-r0 \ | ||
| icu-dev==74.1-r0 | ||
| WORKDIR /usr/src/app | ||
|
|
||
| RUN mkdir -p /usr/src/app \ | ||
| && addgroup docker \ | ||
| && adduser -S -h /home/docker -u ${USER_ID:-1000} -G docker docker \ | ||
| RUN addgroup docker \ | ||
| && adduser -S -h /home/docker -u 1000 -G docker docker \ | ||
| && chown -R docker /home/docker /usr/src/app \ | ||
| && apk add --no-cache --virtual=.build-deps \ | ||
| autoconf==2.71-r2 \ | ||
| g++==13.2.1_git20231014-r0 \ | ||
| make==4.4.1-r2 \ | ||
| && docker-php-ext-configure intl \ | ||
| && docker-php-ext-install -j"$(nproc)" intl pdo_mysql \ | ||
| && pecl install apcu \ | ||
| && docker-php-ext-enable apcu intl \ | ||
| $PHPIZE_DEPS \ | ||
| && apk add --no-cache \ | ||
| bash \ | ||
| git \ | ||
| icu-dev \ | ||
| && docker-php-ext-configure \ | ||
| intl \ | ||
| && docker-php-ext-install -j"$(nproc)" \ | ||
| intl \ | ||
| pdo_mysql \ | ||
| && pecl install \ | ||
| apcu \ | ||
| && docker-php-ext-enable \ | ||
| apcu \ | ||
| intl \ | ||
| && apk del .build-deps | ||
|
|
||
| WORKDIR /usr/src/app | ||
|
|
||
| COPY composer.json /usr/src/app/composer.json | ||
| COPY composer.lock /usr/src/app/composer.lock | ||
| COPY composer.* /usr/src/app/ | ||
|
|
||
| RUN composer install --no-scripts | ||
|
|
||
| COPY . /usr/src/app | ||
| COPY --chown=docker:docker . /usr/src/app | ||
|
|
||
| RUN chown -R 1000:1000 /usr/src/app | ||
| USER 1000:1000 | ||
| USER docker | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| --- | ||
| services: | ||
| php: | ||
| platform: linux/x86_64 | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
clementvtrd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| env_file: .env | ||
| volumes: | ||
| - .:/usr/src/app:rw | ||
| restart: unless-stopped | ||
|
|
||
| nginx: | ||
| platform: linux/x86_64 | ||
| image: nginx:alpine | ||
| ports: | ||
| - 80:80 | ||
| volumes: | ||
| - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro | ||
| - ./public:/usr/src/app/public:ro | ||
| restart: unless-stopped | ||
|
|
||
| phpmyadmin: | ||
| platform: linux/x86_64 | ||
| image: phpmyadmin | ||
| environment: | ||
| PMA_ARBITRARY: 1 | ||
| ports: | ||
| - 8080:80 | ||
| restart: unless-stopped | ||
|
|
||
| database: | ||
| platform: linux/x86_64 | ||
| image: mysql:8.4 | ||
| environment: | ||
| MYSQL_RANDOM_ROOT_PASSWORD: "yes" | ||
| MYSQL_DATABASE: ${MYSQL_DATABASE} | ||
| MYSQL_PASSWORD: ${MYSQL_PASSWORD} | ||
| MYSQL_USER: ${MYSQL_USER} | ||
| volumes: | ||
| - db_data:/var/lib/mysql:rw | ||
| restart: unless-stopped | ||
|
|
||
| volumes: | ||
| db_data: ~ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu ne lock plus la version installée ? Hadolint ne crie pas ? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ce que j'ai voulu faire c'est de ne pas avoir à repasser sur le projet tous les deux jours, c'est pour ça que c'est pas une version de patch que j'ai donné pour php et que j'ai pas précisé de version pour alpine. On a pas de contrainte de prod (qui nous pousse à préciser les versions de paquets).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est pas faux :) Est-ce qu'on peut prévoir un build hebdomadaire avec la CI pour s'assurer que tout build chaque lundi par exemple ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bah il faut rebase chaque branche et chaque commit de chaque module avancé alors... gros boulot. L0 je vais essayer de faire tourner la CI sur chaque commit mais je ne sais pas si on est capable de rebuild chaque semaine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah oui c'est vrai chaque module a sa propre branche, j'avais un peu zappé cette partie