From b11e63f8cfda3ba393d9d64716298f326cd96440 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Sun, 10 Dec 2023 12:26:01 +0100 Subject: [PATCH 1/2] increase dependencies --- .docker/base/php74/Dockerfile | 21 --------------- .docker/base/{php80 => php83}/Dockerfile | 2 +- .docker/development/php80/Dockerfile | 5 ---- .../development/{php74 => php83}/Dockerfile | 2 +- .github/workflows/php.yml | 4 +-- .php-cs-fixer.php | 3 +-- CHANGELOG.md | 4 +++ CONTRIBUTING.md | 8 +++--- README.md | 4 +-- composer.json | 26 ++++++++++--------- docker-compose.yml | 20 +++++--------- 11 files changed, 35 insertions(+), 64 deletions(-) delete mode 100644 .docker/base/php74/Dockerfile rename .docker/base/{php80 => php83}/Dockerfile (97%) delete mode 100644 .docker/development/php80/Dockerfile rename .docker/development/{php74 => php83}/Dockerfile (61%) diff --git a/.docker/base/php74/Dockerfile b/.docker/base/php74/Dockerfile deleted file mode 100644 index b44f167..0000000 --- a/.docker/base/php74/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM php:7.4-fpm - -USER root - -# install system packages -RUN apt-get update \ - && apt-get -y install git wget \ - && apt-get install -qqy libzip-dev libpng-dev libjpeg-dev libfreetype6-dev \ - && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* - -# configure php packages -RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ - -# install php requirements -RUN docker-php-ext-install zip iconv gd - -# install xdebug -RUN pecl install xdebug-3.1.5 \ - && docker-php-ext-enable xdebug - -COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer diff --git a/.docker/base/php80/Dockerfile b/.docker/base/php83/Dockerfile similarity index 97% rename from .docker/base/php80/Dockerfile rename to .docker/base/php83/Dockerfile index 25b0908..3f063f2 100644 --- a/.docker/base/php80/Dockerfile +++ b/.docker/base/php83/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0-fpm +FROM php:8.3-fpm USER root diff --git a/.docker/development/php80/Dockerfile b/.docker/development/php80/Dockerfile deleted file mode 100644 index 54fe96b..0000000 --- a/.docker/development/php80/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM pugx/poser:php80 - -USER root - -WORKDIR "/application" diff --git a/.docker/development/php74/Dockerfile b/.docker/development/php83/Dockerfile similarity index 61% rename from .docker/development/php74/Dockerfile rename to .docker/development/php83/Dockerfile index cddd459..9729fb6 100644 --- a/.docker/development/php74/Dockerfile +++ b/.docker/development/php83/Dockerfile @@ -1,4 +1,4 @@ -FROM pugx/poser:php74 +FROM pugx/poser:php83 USER root diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index dc3580d..ee4b91b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -8,7 +8,7 @@ on: jobs: cs-fix: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: PHP-CS-Fixer steps: - name: Checkout @@ -20,7 +20,7 @@ jobs: strategy: matrix: - container: [ "php74", "php80", "php81", "php82" ] + container: [ "php81", "php82", "php83" ] runs-on: ubuntu-latest container: pugx/poser:${{ matrix.container }} diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 8785899..98e099b 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -11,8 +11,7 @@ ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, - '@PHP74Migration:risky' => true, - '@PHPUnit75Migration:risky' => true, + '@PHP81Migration' => true, 'declare_strict_types' => false, 'native_function_invocation' => ['include' => ['@all']], 'concat_space' => ['spacing' => 'one'], diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ba384d..36fb3c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added +* add compatibility to Symfony v7 and PHP 8.3 +* drop compatibility to Symfony v4 and PHP 7.4 + ## [v2.3.1] - 2022-02-21 ### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e89066..fd00c97 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,10 +36,10 @@ composer behat ```bash docker-compose up --build -d -docker-compose exec php74 composer install -docker-compose exec php74 composer phpspec -docker-compose exec php74 composer behat -docker-compose exec php74 composer php-cs-fixer +docker-compose exec php83 composer install +docker-compose exec php83 composer phpspec +docker-compose exec php83 composer behat +docker-compose exec php83 composer php-cs-fixer ``` or diff --git a/README.md b/README.md index 42dfa15..6f25e8a 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ This library is used by https://poser.pugx.org ## Dependencies -* PHP 7.4 or higher +* PHP 8.1 or higher * GD extension -to use the library with lower php version use the tag [v1.4](https://github.com/badges/poser/tree/v1.4.0) +you can still use the library with lower PHP versions, using the old releases ## Use as command diff --git a/composer.json b/composer.json index 58a5fe4..f8e78ad 100644 --- a/composer.json +++ b/composer.json @@ -32,19 +32,19 @@ } ], "require": { - "php": ">=7.4", + "php": "^8.1", "ext-gd": "*", "ext-simplexml": "*", - "kartsims/easysvg": "^2.4", - "symfony/console": "^4.0|^5.0|^6.0" + "kartsims/easysvg": "^2.5", + "symfony/console": "^5.0 || ^6.0 || ^7.0" }, "require-dev": { - "behat/behat": "^3.8", - "phpspec/phpspec": "^7.0", - "friends-of-phpspec/phpspec-code-coverage": "^6.0", - "friendsofphp/php-cs-fixer": "^3.5", + "behat/behat": "^3.13", + "phpspec/phpspec": "^7.4", + "friends-of-phpspec/phpspec-code-coverage": "^6.3", + "friendsofphp/php-cs-fixer": "^3.41", "moave/phpspec-data-provider-extension": "dev-feat/add-compatibility-to-php80", - "vimeo/psalm": "^4.3" + "vimeo/psalm": "^4.30" }, "config": { "bin-dir": "bin", @@ -60,10 +60,12 @@ "phpspec": "bin/phpspec run --format=pretty --ansi", "phpspec-coverage": "bin/phpspec run -f progress -c phpspec-coverage.yml --ansi", "behat": "bin/behat --snippets-for", - "docker:build:php74": "docker build -t pugx/poser:php74 -f .docker/base/php74/Dockerfile .", - "docker:push:php74": "docker push pugx/poser:php74", - "docker:build:php80": "docker build -t pugx/poser:php80 -f .docker/base/php80/Dockerfile .", - "docker:push:php80": "docker push pugx/poser:php80" + "docker:build:php81": "docker build -t pugx/poser:php81 -f .docker/base/php81/Dockerfile .", + "docker:push:php81": "docker push pugx/poser:php81", + "docker:build:php82": "docker build -t pugx/poser:php82 -f .docker/base/php80/Dockerfile .", + "docker:push:php82": "docker push pugx/poser:php82", + "docker:build:php83": "docker build -t pugx/poser:php83 -f .docker/base/php80/Dockerfile .", + "docker:push:php83": "docker push pugx/poser:php83" }, "extra": { "branch-alias": { diff --git a/docker-compose.yml b/docker-compose.yml index cd27901..8845ba7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,33 +1,25 @@ version: '3.7' services: - php74: - build: - context: .docker/development/php74 - working_dir: /application - stdin_open: true - volumes: - - .:/application:cached - - php80: + php81: build: - context: .docker/development/php80 + context: .docker/development/php81 working_dir: /application stdin_open: true volumes: - .:/application:cached - php81: + php82: build: - context: .docker/development/php81 + context: .docker/development/php82 working_dir: /application stdin_open: true volumes: - .:/application:cached - php82: + php83: build: - context: .docker/development/php82 + context: .docker/development/php83 working_dir: /application stdin_open: true volumes: From 39a51bd478ebaac278d66c5beecff29da366dac9 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Mon, 11 Dec 2023 10:33:23 +0100 Subject: [PATCH 2/2] Fix scripts --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f8e78ad..97000e6 100644 --- a/composer.json +++ b/composer.json @@ -62,9 +62,9 @@ "behat": "bin/behat --snippets-for", "docker:build:php81": "docker build -t pugx/poser:php81 -f .docker/base/php81/Dockerfile .", "docker:push:php81": "docker push pugx/poser:php81", - "docker:build:php82": "docker build -t pugx/poser:php82 -f .docker/base/php80/Dockerfile .", + "docker:build:php82": "docker build -t pugx/poser:php82 -f .docker/base/php82/Dockerfile .", "docker:push:php82": "docker push pugx/poser:php82", - "docker:build:php83": "docker build -t pugx/poser:php83 -f .docker/base/php80/Dockerfile .", + "docker:build:php83": "docker build -t pugx/poser:php83 -f .docker/base/php83/Dockerfile .", "docker:push:php83": "docker push pugx/poser:php83" }, "extra": {