Skip to content

Commit

Permalink
Extra tweaks
Browse files Browse the repository at this point in the history
- add .nvmrc to auto select proper version to use with NVM
- remove EOL Symfony versions from ci & helpers
- remove php8 helper (PHP <= 8.1)
- update .nvmrc from doc app
- doc app PHP <=8.3
- CS & PhpStan improvements
- drop Symfony < 6 BC layers
- use fig/log-test to replace TestLogger
  • Loading branch information
ogizanagi committed Apr 4, 2024
1 parent b558c7d commit 6938a01
Show file tree
Hide file tree
Showing 16 changed files with 161 additions and 358 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
push:
branches:
- master
pull_request: ~
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]

jobs:

Expand Down Expand Up @@ -82,25 +83,11 @@ jobs:
matrix:
include:
# Most recent, non-EOL versions
- name: 'Test Symfony 6.1 [Linux, PHP 8.1]'
os: 'ubuntu-latest'
php: '8.1'
symfony: '6.1.*'

- name: 'Test Symfony 6.2 [Linux, PHP 8.1]'
os: 'ubuntu-latest'
php: '8.1'
symfony: '6.2.*'

- name: 'Test Symfony 6.3 [Linux, PHP 8.2]'
os: 'ubuntu-latest'
php: '8.2'
symfony: '6.3.*'

- name: 'Test Symfony 6.4 [Linux, PHP 8.2]'
os: 'ubuntu-latest'
php: '8.2'
symfony: '6.4.*'

- name: 'Test Symfony 7.0 [Linux, PHP 8.3]'
os: 'ubuntu-latest'
php: '8.3'
Expand All @@ -114,6 +101,13 @@ jobs:
allow-unstable: true
allow-failure: true

- name: 'Test Symfony 7.1 [Linux, PHP 8.4]'
os: 'ubuntu-latest'
php: '8.4'
symfony: '7.1.*@dev'
allow-unstable: true
allow-failure: true

steps:
- name: 'Checkout'
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@author Maxime Steinhausser <[email protected]>
EOF;

$finder = PhpCsFixer\Finder::create()
$finder = (new PhpCsFixer\Finder())
->in([__DIR__])
->exclude('doc/app')
->exclude('tests/fixtures/app/var')
Expand Down
36 changes: 1 addition & 35 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
include .make/help.mk
include .make/text.mk

PHP_CS_FIXER_VERSION=v3.49.0
PHP_CS_FIXER_VERSION=v3.52.1

##########
# Colors #
Expand All @@ -15,13 +15,6 @@ COLOR_INFO := \033[32m
COLOR_WARNING := \033[33m
COLOR_COMMENT := \033[36m

###########
# Helpers #
###########

php8:
@php -r "exit (PHP_MAJOR_VERSION == 8 ? 0 : 1);" || ($(call message_error, Please use PHP 8) && exit 1)

###########
# Install #
###########
Expand All @@ -37,31 +30,6 @@ install:
symfony composer config minimum-stability --unset
symfony composer update --prefer-dist

## Install - Install Symfony 6.1 deps
install.61: setup
install.61: export SYMFONY_REQUIRE = 6.1.*@dev
install.61:
rm -f composer.lock
symfony composer update

## Install - Install Symfony 6.2 deps
install.62: setup
install.62: export SYMFONY_REQUIRE = 6.2.*@dev
install.62:
rm -f composer.lock
symfony composer config minimum-stability dev
symfony composer update
symfony composer config minimum-stability --unset

## Install - Install Symfony 6.3 deps
install.63: setup
install.63: export SYMFONY_REQUIRE = 6.3.*@dev
install.63:
rm -f composer.lock
symfony composer config minimum-stability dev
symfony composer update
symfony composer config minimum-stability --unset

## Install - Install Symfony 6.4 deps
install.64: setup
install.64: export SYMFONY_REQUIRE = 6.4.*@dev
Expand Down Expand Up @@ -102,12 +70,10 @@ lint.fix: lint.php-cs-fixer.fix
lint.composer:
symfony composer validate --strict

lint.php-cs-fixer: php8
lint.php-cs-fixer: php-cs-fixer.phar
lint.php-cs-fixer:
symfony php ./php-cs-fixer.phar fix --dry-run --diff

lint.php-cs-fixer.fix: php8
lint.php-cs-fixer.fix: php-cs-fixer.phar
lint.php-cs-fixer.fix:
symfony php ./php-cs-fixer.phar fix
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
},
"require-dev": {
"ekino/phpstan-banned-code": "^1.0",
"fig/log-test": "^1.1",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/phpstan": "^1.6",
"phpunit/phpunit": "^9.6",
Expand Down
2 changes: 1 addition & 1 deletion doc/app/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
6 changes: 3 additions & 3 deletions doc/app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "project",
"license": "proprietary",
"require": {
"php": "^8.2",
"php": ">=8.3",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "^1.11",
Expand All @@ -16,6 +16,7 @@
"symfony/monolog-bundle": "^3.7",
"symfony/runtime": "^7.0",
"symfony/twig-bundle": "^7.0",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/yaml": "^7.0",
"twig/extra-bundle": "^3.0",
"twig/twig": "^3.0"
Expand All @@ -24,8 +25,7 @@
"symfony/debug-bundle": "^7.0",
"symfony/stopwatch": "^7.0",
"symfony/var-dumper": "^7.0",
"symfony/web-profiler-bundle": "^7.0",
"symfony/webpack-encore-bundle": "^2.1"
"symfony/web-profiler-bundle": "^7.0"
},
"config": {
"optimize-autoloader": true,
Expand Down
148 changes: 74 additions & 74 deletions doc/app/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6938a01

Please sign in to comment.