Skip to content

Commit

Permalink
Merge branch 'main' into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Nov 26, 2024
2 parents ff32227 + 3372ede commit 251981a
Show file tree
Hide file tree
Showing 71 changed files with 1,241 additions and 923 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
/phpunit.xml
/README.md
/rector.php
/renovate.json
/version-bumper.yaml
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
/phpunit.xml export-ignore
/rector.php export-ignore
/renovate.json export-ignore
/version-bumper.yaml export-ignore
5 changes: 3 additions & 2 deletions .github/workflows/cgl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
# @todo Use PHP 8.4 once PHP-CS-Fixer supports it
php-version: 8.3
tools: composer:v2, composer-require-checker, composer-unused, cs2pr
coverage: none

Expand All @@ -39,7 +40,7 @@ jobs:
- name: Reset composer.json
run: git checkout composer.json composer.lock
- name: Re-install Composer dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
- name: Check for unused dependencies
run: composer-unused --excludePackage=nyholm/psr7

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Render documentation
run: docker-compose -f docs/_build/docker-compose.yaml run --rm build
run: docker compose -f docs/_build/docker-compose.yaml run --rm build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ["8.1", "8.2", "8.3"]
composer-version: ["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"]
php-version: ["8.1", "8.2", "8.3", "8.4"]
composer-version: ["2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8"]
dependencies: ["highest", "lowest"]
# Skip tests for PHP 8.4 and incompatible Composer versions
exclude:
- php-version: "8.4"
composer-version: "2.1"
- php-version: "8.4"
composer-version: "2.2"
- php-version: "8.4"
composer-version: "2.3"
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -34,11 +42,11 @@ jobs:

# Install dependencies
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
# Composer < 2.7 is not compatible with symfony/console 7.x
composer-options: ${{ matrix.composer-version != '2.7' && '--with symfony/console:<7' }}
composer-options: ${{ matrix.composer-version < 2.7 && '--with symfony/console:<7' }}

# Run tests
- name: Run tests
Expand All @@ -56,18 +64,15 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: 8.4
tools: composer:v2
coverage: pcov

# Install dependencies
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest
# @todo Remove once Composer 2.7 is released and supported
# Composer < 2.7 is not compatible with symfony/console 7.x
composer-options: "--with symfony/console:<7"

# Run Unit tests
- name: Build coverage directory
Expand Down Expand Up @@ -104,7 +109,7 @@ jobs:

# CodeClimate
- name: CodeClimate report
uses: paambaati/codeclimate-action@v8.0.0
uses: paambaati/codeclimate-action@v9.0.0
if: env.CC_TEST_REPORTER_ID
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
Expand Down
9 changes: 5 additions & 4 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

$config = new \PhpCsFixer\Config();
$config = new PhpCsFixer\Config();
$config->getFinder()
->files()
->name('*.php')
->in(__DIR__)
->ignoreVCSIgnored(true)
->ignoreDotFiles(false)
;

$ruleset = new \CPSIT\PhpCsFixerConfig\Rule\DefaultRuleset();
$ruleset = new CPSIT\PhpCsFixerConfig\Rule\DefaultRuleset();
$ruleset->apply($config);

// Enable parallel runs (PHP-CS-Fixer >= v3.57)
if (class_exists(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::class)) {
$config->setParallelConfig(\PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
if (class_exists(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::class)) {
$config->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
}

return $config;
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM composer/composer:2.7-bin AS composer
FROM composer/composer:2.8-bin AS composer
LABEL maintainer="Elias Häußler <[email protected]>"

FROM php:8.3-alpine
FROM php:8.4-alpine
COPY --from=composer /composer /usr/bin/composer

ENV COMPOSER_ALLOW_SUPERUSER=1
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ composer create-project cpsit/project-builder <projectname>
### Docker

[![Docker](https://img.shields.io/docker/v/cpsit/project-builder?label=version&logo=docker&sort=semver)](https://hub.docker.com/r/cpsit/project-builder)
[![GHCR Pulls](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fipitio.github.io%2Fbackage%2FCPS-IT%2Fproject-builder%2Fproject-builder.json&query=%24.downloads&label=GHCR%20pulls&color=brightgreen)](https://github.com/CPS-IT/project-builder/pkgs/container/project-builder)
[![Docker Pulls](https://img.shields.io/docker/pulls/cpsit/project-builder?color=brightgreen)](https://hub.docker.com/r/cpsit/project-builder)

```bash
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"ext-filter": "*",
"ext-json": "*",
"ext-mbstring": "*",
Expand All @@ -32,7 +32,7 @@
"psr/http-message": "^1.0 || ^2.0",
"sebastianfeldmann/cli": "^3.4",
"symfony/config": "^5.4 || ^6.0 || ^7.0",
"symfony/console": "^5.4 || ^6.0",
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
"symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
"symfony/expression-language": "^5.4 || ^6.0 || ^7.0",
Expand All @@ -50,6 +50,7 @@
"composer/xdebug-handler": "^3.0",
"cpsit/php-cs-fixer-config": "^1.1",
"donatj/mock-webserver": "^2.5",
"eliashaeussler/version-bumper": "^1.2",
"ergebnis/composer-normalize": "^2.26",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.9",
Expand All @@ -74,6 +75,7 @@
},
"config": {
"allow-plugins": {
"eliashaeussler/version-bumper": true,
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true
},
Expand Down
Loading

0 comments on commit 251981a

Please sign in to comment.