From 5cc04bb0044a7b0e5498c30d547d7d2695c2888b Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Thu, 22 Dec 2022 12:06:32 +0100 Subject: [PATCH 1/7] Support PHP 8.2 --- .github/workflows/ci.yml | 1 + CHANGELOG.md | 4 + README.md | 2 +- composer.json | 2 +- composer.lock | 164 ++++++++++++++++------------------- website/docusaurus.config.js | 6 +- 6 files changed, 88 insertions(+), 91 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d447282..6381ecd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" steps: - name: "Checkout" uses: "actions/checkout@v2.4.0" diff --git a/CHANGELOG.md b/CHANGELOG.md index 77d54f15..4ae1be36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Support PHP 8.2 + ## [2.5.0] - 2022-02-13 ### Added diff --git a/README.md b/README.md index 2688d143..c666cd57 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ If you just start using this package, you should install version 2. | Version | PHP Version | | ------- | ----------- | -| 2.\* | 7.4 - 8.0 | +| 2.\* | 7.4 - 8.2 | | 0.16.\* | 7.0 - 8.0 | | 0.11.\* | 5.3.0 - 7.4 | diff --git a/composer.json b/composer.json index 6e604319..b31aac0c 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "docs": "https://ical.poerschke.nrw" }, "require": { - "php": ">=7.4 || ~8.0.0 || ~8.1.0", + "php": ">=7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", "ext-mbstring": "*", "symfony/deprecation-contracts": "^2.1 || ^3.0" }, diff --git a/composer.lock b/composer.lock index 43c0ad82..e46422e6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a5270fe68575af07cbd3df3c67d3d30d", + "content-hash": "2a589b3d4b92cfdab2150e9a6ac1b998", "packages": [ { "name": "symfony/deprecation-contracts", @@ -108,13 +108,13 @@ } }, "autoload": { - "psr-4": { - "Amp\\": "lib" - }, "files": [ "lib/functions.php", "lib/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -241,79 +241,6 @@ ], "time": "2021-03-30T17:13:30+00:00" }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, { "name": "composer/pcre", "version": "1.0.1", @@ -1839,6 +1766,68 @@ }, "time": "2021-11-30T19:35:32+00:00" }, + { + "name": "ocramius/package-versions", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/PackageVersions.git", + "reference": "065921ed7cb2a6861443d91138d0a4378316af8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/065921ed7cb2a6861443d91138d0a4378316af8d", + "reference": "065921ed7cb2a6861443d91138d0a4378316af8d", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.2.0", + "php": "~8.1.0 || ~8.2.0" + }, + "replace": { + "composer/package-versions-deprecated": "*" + }, + "require-dev": { + "composer/composer": "^2.4.4", + "doctrine/coding-standard": "^10.0.0", + "ext-zip": "^1.15.0", + "phpunit/phpunit": "^9.5.26", + "roave/infection-static-analysis-plugin": "^1.25.0", + "vimeo/psalm": "^4.29.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/Ocramius/PackageVersions/issues", + "source": "https://github.com/Ocramius/PackageVersions/tree/2.7.0" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", + "type": "tidelift" + } + ], + "time": "2022-10-31T12:51:46+00:00" + }, { "name": "ondram/ci-detector", "version": "3.5.1", @@ -2182,6 +2171,7 @@ "issues": "https://github.com/PHP-CS-Fixer/diff/issues", "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" }, + "abandoned": true, "time": "2020-10-14T08:32:19+00:00" }, { @@ -3210,12 +3200,12 @@ } }, "autoload": { - "psr-4": { - "Pipeline\\": "src/" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Pipeline\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5697,12 +5687,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, "files": [ "Resources/functions.php" ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, "exclude-from-classmap": [ "/Tests/" ] @@ -6161,9 +6151,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4 || ~8.0.0 || ~8.1.0", + "php": ">=7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", "ext-mbstring": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index f907b5d1..3029aef8 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -43,11 +43,13 @@ module.exports = { items: [ { label: "Raise a question", - to: "https://github.com/markuspoerschke/iCal/discussions/categories/q-a", + to: + "https://github.com/markuspoerschke/iCal/discussions/categories/q-a", }, { label: "Report a bug", - to: "https://github.com/markuspoerschke/iCal/issues", + to: + "https://github.com/markuspoerschke/iCal/issues", }, ], }, From 25f49567038ae417931b43788b6bde82c87b0cc2 Mon Sep 17 00:00:00 2001 From: markuspoerschke Date: Thu, 22 Dec 2022 11:08:36 +0000 Subject: [PATCH 2/7] Fix code style! --- website/docusaurus.config.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 3029aef8..f907b5d1 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -43,13 +43,11 @@ module.exports = { items: [ { label: "Raise a question", - to: - "https://github.com/markuspoerschke/iCal/discussions/categories/q-a", + to: "https://github.com/markuspoerschke/iCal/discussions/categories/q-a", }, { label: "Report a bug", - to: - "https://github.com/markuspoerschke/iCal/issues", + to: "https://github.com/markuspoerschke/iCal/issues", }, ], }, From 102f47cd9fdfe6d8e5a66acf4e98f0f0e38f679b Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Thu, 22 Dec 2022 12:21:28 +0100 Subject: [PATCH 3/7] Always update ocramius/package-versions This package is very strictly coupled to supported PHP versions. Since this package supports more versions, the version needs to be updated to work with older versions. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efeee064..01b6997f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,10 @@ jobs: path: "${{ steps.determine-composer-cache-directory.outputs.directory }}" key: "php-${{ matrix.php-version }}-composer-cache" + - name: "Update ocramius/package-versions" + if: ${{ matrix.php-version != '8.2' }} + run: "composer up ocramius/package-versions" + - name: "Composer update" if: ${{ matrix.php-version == '7.4' }} run: "composer up --prefer-lowest" From 36f74db7d27737f1c4b97cfed322f8c355f5e6ca Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Thu, 22 Dec 2022 12:29:09 +0100 Subject: [PATCH 4/7] Fix condition for updating packages --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01b6997f..f4064801 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: key: "php-${{ matrix.php-version }}-composer-cache" - name: "Update ocramius/package-versions" - if: ${{ matrix.php-version != '8.2' }} + if: ${{ matrix.php-version != '7.4' }} run: "composer up ocramius/package-versions" - name: "Composer update" From e13f34e8088072b2867d9de439de27d6b94cae5a Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Thu, 22 Dec 2022 12:34:58 +0100 Subject: [PATCH 5/7] Ignore php version when checking code style --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index db283775..bbb99b43 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ PATH := $(CURDIR)/vendor/bin:$(PATH) PSALM_FLAGS ?= PHPUNIT_FLAGS ?= INFECTION_FLAGS ?= +PHP_CS_FIXER_IGNORE_ENV := 1 .PHONY: help help: From e404f834bb28a9cb0ec9b565f7c743766c6b46da Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Thu, 22 Dec 2022 12:41:28 +0100 Subject: [PATCH 6/7] Fix checking code style --- Makefile | 2 +- composer.lock | 197 +++++++++++++++++++------------------------------- 2 files changed, 74 insertions(+), 125 deletions(-) diff --git a/Makefile b/Makefile index bbb99b43..37f796ea 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -include Makefile.local export XDEBUG_MODE=coverage +export PHP_CS_FIXER_IGNORE_ENV=1 MAKEFLAGS += --warn-undefined-variables SHELL := bash @@ -8,7 +9,6 @@ PATH := $(CURDIR)/vendor/bin:$(PATH) PSALM_FLAGS ?= PHPUNIT_FLAGS ?= INFECTION_FLAGS ?= -PHP_CS_FIXER_IGNORE_ENV := 1 .PHONY: help help: diff --git a/composer.lock b/composer.lock index 379f769c..19691089 100644 --- a/composer.lock +++ b/composer.lock @@ -241,6 +241,79 @@ ], "time": "2021-03-30T17:13:30+00:00" }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-01-17T14:14:24+00:00" + }, { "name": "composer/pcre", "version": "1.0.1", @@ -1760,130 +1833,6 @@ }, "time": "2022-09-04T07:30:47+00:00" }, - { - "name": "ocramius/package-versions", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "6707caff2e84a2368f29fdf2cb28a6b5a9e3ab53" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/6707caff2e84a2368f29fdf2cb28a6b5a9e3ab53", - "reference": "6707caff2e84a2368f29fdf2cb28a6b5a9e3ab53", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2.2.0", - "php": "~8.0.0 || ~8.1.0" - }, - "replace": { - "composer/package-versions-deprecated": "*" - }, - "require-dev": { - "composer/composer": "^2.2.0", - "doctrine/coding-standard": "^9.0.0", - "ext-zip": "^1.15.0", - "phpunit/phpunit": "^9.5.9", - "roave/infection-static-analysis-plugin": "^1.10.0", - "vimeo/psalm": "^4.10.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/Ocramius/PackageVersions/issues", - "source": "https://github.com/Ocramius/PackageVersions/tree/2.5.1" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", - "type": "tidelift" - } - ], - "time": "2022-03-05T18:04:57+00:00" - }, - { - "name": "ocramius/package-versions", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "065921ed7cb2a6861443d91138d0a4378316af8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/065921ed7cb2a6861443d91138d0a4378316af8d", - "reference": "065921ed7cb2a6861443d91138d0a4378316af8d", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2.2.0", - "php": "~8.1.0 || ~8.2.0" - }, - "replace": { - "composer/package-versions-deprecated": "*" - }, - "require-dev": { - "composer/composer": "^2.4.4", - "doctrine/coding-standard": "^10.0.0", - "ext-zip": "^1.15.0", - "phpunit/phpunit": "^9.5.26", - "roave/infection-static-analysis-plugin": "^1.25.0", - "vimeo/psalm": "^4.29.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/Ocramius/PackageVersions/issues", - "source": "https://github.com/Ocramius/PackageVersions/tree/2.7.0" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", - "type": "tidelift" - } - ], - "time": "2022-10-31T12:51:46+00:00" - }, { "name": "ondram/ci-detector", "version": "3.5.1", From 08d1958c68fd2067ab6826825e214ac9bfe85588 Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Thu, 22 Dec 2022 12:47:57 +0100 Subject: [PATCH 7/7] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7130508..2db1f959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Support chaining of Calendar.setPublishedTTL() [#452](https://github.com/markuspoerschke/iCal/pull/452) -- Support PHP 8.2 +- Support PHP 8.2 [#470](https://github.com/markuspoerschke/iCal/pull/470) ## [2.7.0] - 2022-06-21