diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index b1c4618..d657f0f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: true matrix: - php: [ 8.0, 7.4 ] + php: [ 8.0 ] stability: [ prefer-lowest, prefer-stable ] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} @@ -28,6 +28,9 @@ jobs: php-version: ${{ matrix.php }} coverage: none + - name: Add HTTP basic auth credentials + run: echo '${{ secrets.VDLP_OCTOBER_CMS_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json + - name: Validate composer.json and composer.lock run: composer validate diff --git a/.gitignore b/.gitignore index 485dee6..3ce5adb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea +vendor diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1f858..94e50c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.2.0] - 2022-11-28 + +### Changes + +- Drop support for PHP 7.4 +- Drop support for October CMS 1.x + ## [2.1.0] - 2022-03-05 ### Changes diff --git a/README.md b/README.md index 42df0d0..dd8f86e 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ You can also decode those ids back. This is useful in bundling several parameter ## Requirements -* PHP 7.4 or higher -* October CMS 1.x or 2.x +* PHP 8.0.2 or higher +* October CMS 2.x or higher ## Installation diff --git a/classes/Hashids.php b/classes/Hashids.php index d905340..b5f9d73 100644 --- a/classes/Hashids.php +++ b/classes/Hashids.php @@ -9,11 +9,9 @@ class Hashids implements HashidsInterface { - private HashidsHelper $hashids; - - public function __construct(HashidsHelper $hashids) - { - $this->hashids = $hashids; + public function __construct( + private HashidsHelper $hashids + ) { } /** diff --git a/classes/HashidsManager.php b/classes/HashidsManager.php index adfe8ed..361aab2 100644 --- a/classes/HashidsManager.php +++ b/classes/HashidsManager.php @@ -14,13 +14,11 @@ class HashidsManager { protected array $instances = []; - protected Repository $config; - protected HashidsFactory $factory; - public function __construct(Repository $config, HashidsFactory $factory) - { - $this->config = $config; - $this->factory = $factory; + public function __construct( + protected Repository $config, + protected HashidsFactory $factory + ) { } /** diff --git a/composer.json b/composer.json index d9861cf..dbc6a9f 100644 --- a/composer.json +++ b/composer.json @@ -9,17 +9,31 @@ "email": "octobercms@vdlp.nl" } ], + "support": { + "email": "octobercms@vdlp.nl" + }, "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0.2", "composer/installers": "^1.0 || ^2.0", - "hashids/hashids": "^4.0", - "october/system": "^1.0 || ^2.0" + "hashids/hashids": "^4.1", + "october/rain": ">=2.0" }, + "repositories": [ + { + "type": "composer", + "url": "https://gateway.octobercms.com" + } + ], "archive": { "exclude": [ ".gitignore", ".github", ".idea/" ] + }, + "config": { + "allow-plugins": { + "composer/installers": true + } } } diff --git a/updates/version.yaml b/updates/version.yaml index 0ef3202..808d89b 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -6,3 +6,4 @@ v1.1.0: v2.0.0: Drop PHP 7.1 support v2.0.1: Update plugin dependencies v2.1.0: Maintenance release +v2.2.0: Drop PHP 7.4 support / Drop October CMS 1.x support