From b2635604f8b266bdb0df5201563173cae14d3b97 Mon Sep 17 00:00:00 2001 From: Alwin Drenth Date: Tue, 13 Jul 2021 13:58:55 +0200 Subject: [PATCH] Add support for PHP 7.4 or higher --- .github/workflows/php.yml | 2 +- Plugin.php | 20 ++------------------ README.md | 2 +- composer.json | 5 +++-- models/Settings.php | 18 +++--------------- updates/version.yaml | 1 + 6 files changed, 11 insertions(+), 37 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index d73cbbd..b1c4618 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, 7.3, 7.2 ] + php: [ 8.0, 7.4 ] stability: [ prefer-lowest, prefer-stable ] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} diff --git a/Plugin.php b/Plugin.php index 87a3f1c..7deed51 100644 --- a/Plugin.php +++ b/Plugin.php @@ -1,7 +1,5 @@ [ 'vdlp.securitytxt.access_settings', ], - ] + ], ]; } } diff --git a/README.md b/README.md index 31b2e06..476ebf3 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Go to the Settings section and provide the required information. ## Requirements -PHP ^7.0 +PHP 7.4 or higher ## Installation diff --git a/composer.json b/composer.json index dea502e..24b947b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "vdlp/oc-securitytxt-plugin", "type": "october-plugin", - "description": "Define security policies for your October CMS website", + "description": "Define security policies for your website.", "license": "GPL-2.0", "authors": [ { @@ -10,12 +10,13 @@ } ], "require": { - "php": "^7.2||^8.0", + "php": "^7.4 || ^8.0", "composer/installers": "^1.0" }, "archive": { "exclude": [ ".gitignore", + ".github", ".idea/" ] } diff --git a/models/Settings.php b/models/Settings.php index 01095aa..78233c0 100644 --- a/models/Settings.php +++ b/models/Settings.php @@ -6,12 +6,7 @@ use October\Rain\Database\Model; -/** - * Class Settings - * - * @package Vdlp\SecurityTxt\Models - */ -class Settings extends Model +final class Settings extends Model { /** * @var array @@ -20,13 +15,6 @@ class Settings extends Model 'System.Behaviors.SettingsModel' ]; - /** - * @var string - */ - public $settingsCode = 'vdlp_security_settings'; - - /** - * @var string - */ - public $settingsFields = 'fields.yaml'; + public string $settingsCode = 'vdlp_security_settings'; + public string $settingsFields = 'fields.yaml'; } diff --git a/updates/version.yaml b/updates/version.yaml index f9007ef..f5eba73 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -2,3 +2,4 @@ 1.0.1: Update plugin documentation 1.0.2: Minor code improvements 1.1.0: Update plugin dependencies +2.0.0: Add support for PHP 7.4 or higher