diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ef48cd3..2b48d51 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,8 @@ name: Lint # PHP syntax check on the lowest PHP version this extension supports and the -# newest one phpBB 3.3 supports. tests.yml covers PHP 8.2 with phpBB's own -# checks (code sniffer, EPV). +# newest one phpBB 3.3 supports. tests.yml runs phpBB's own checks (code +# sniffer, EPV) on phpBB 3.3 with PHP 7.4 and on phpBB 4.0 with PHP 8.2. on: push: branches: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 897f464..67db398 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,6 @@ env: IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0 EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 - PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on on: push: @@ -26,11 +25,24 @@ jobs: matrix: # php-versions: ['8.1'] include: + # phpBB 3.3 with the extension's minimum PHP - php: '7.4' db: 'none' NOTESTS: 1 + phpbb: '3.3.x' + composer: 'composer' + epv: 'dev-master' + # phpBB 4.0 (the master branch) with its minimum PHP. EPV's + # phpBB 4.0 branch, installed with phpBB's own Composer, as + # phpbb-extensions/test-framework does for phpBB 4.0 + - php: '8.2' + db: 'none' + NOTESTS: 1 + phpbb: 'master' + composer: 'php ../composer.phar' + epv: 'dev-epv-phpbb4' - name: PHP ${{ matrix.php }} - ${{ matrix.db }} + name: PHP ${{ matrix.php }} - ${{ matrix.db }}${{ matrix.phpbb == 'master' && ' - phpBB 4.0' || '' }} steps: - name: Update apt package index @@ -40,7 +52,7 @@ jobs: uses: actions/checkout@v4 with: repository: phpbb/phpbb - ref: ${{ env.PHPBB_BRANCH }} + ref: ${{ matrix.phpbb }} path: phpBB3 - name: Checkout extension @@ -65,7 +77,7 @@ jobs: - name: Setup EPV if: ${{ env.EPV != 0 }} - run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs + run: ${{ matrix.composer }} require phpbb/epv:${{ matrix.epv }} --dev --no-interaction --ignore-platform-reqs working-directory: ./phpBB3/phpBB - name: Run code sniffer diff --git a/README.md b/README.md index d17421c..28373ea 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ Click an image for the full size. See the [screenshot gallery](docs/images/scree ## Requirements -- phpBB 3.3.19 or later -- PHP 7.4 or later +- phpBB 3.3.19 or later, including phpBB 4.0 (tested on its 4.0.0-a3 development version) +- PHP 7.4 or later (phpBB 4.0 itself needs PHP 8.2 or later) ## Installation diff --git a/composer.json b/composer.json index 3be5d84..886b299 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "type": "phpbb-extension", "description": "A contact form that lets guests and members reach the board administrators by email, private message or forum post.", "homepage": "https://www.phpbbmodders.com/", - "version": "1.6.0-dev", - "time": "2026-10-06", + "version": "1.6.1-dev", + "time": "2026-10-18", "keywords": [ "phpbb", "extension", @@ -26,7 +26,7 @@ ], "require": { "php": ">=7.4", - "phpbb/phpbb": ">=3.3.19,<4.0.0@dev", + "phpbb/phpbb": ">=3.3.19,<4.1.0@dev", "composer/installers": "^1.0 || ^2.0" }, "require-dev": { @@ -35,7 +35,7 @@ "extra": { "display-name": "Contact Admin", "soft-require": { - "phpbb/phpbb": ">=3.3.19,<4.0.0@dev" + "phpbb/phpbb": ">=3.3.19,<4.1.0@dev" }, "version-check": { "host": "www.phpbb.com", diff --git a/controller/main_controller.php b/controller/main_controller.php index d6e406e..b7cc88a 100644 --- a/controller/main_controller.php +++ b/controller/main_controller.php @@ -171,7 +171,7 @@ public function displayform() // add an entry into the error log $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_CONTACT_EMAIL_INVALID', time()); - $message = $this->language->lang('CONTACT_MAIL_DISABLED', '', ''); + $message = $this->language->lang('CONTACT_MAIL_DISABLED', '', ''); return $this->helper->message($message); } diff --git a/core/contactadmin.php b/core/contactadmin.php index c7d0157..236de2d 100644 --- a/core/contactadmin.php +++ b/core/contactadmin.php @@ -92,7 +92,7 @@ public function __construct( string $root_path, string $php_ext, array $contact_constants, - ?service_collection $messenger_methods = null) + $messenger_methods = null) { $this->auth = $auth; $this->cache = $cache; @@ -205,7 +205,7 @@ public function contact_check($mode, $forum_id = false, $bot_id = false, $method // add an entry into the error log $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_CONTACT_FORUM_INVALID', time(), [$forum_id]); - $message = $this->language->lang('CONTACT_DISABLED', '', ''); + $message = $this->language->lang('CONTACT_DISABLED', '', ''); throw new http_exception(503, $message); } @@ -245,7 +245,7 @@ public function contact_check($mode, $forum_id = false, $bot_id = false, $method $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_CONTACT_BOT_INVALID', time(), [$bot_id]); // show a message to the user - $message = $this->language->lang('CONTACT_DISABLED', '', ''); + $message = $this->language->lang('CONTACT_DISABLED', '', ''); throw new http_exception(503, $message); } @@ -287,7 +287,7 @@ public function contact_check($mode, $forum_id = false, $bot_id = false, $method $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_CONTACT_NONE', time(), [$error]); // show a message to the user - $message = $this->language->lang('CONTACT_DISABLED', '', ''); + $message = $this->language->lang('CONTACT_DISABLED', '', ''); throw new http_exception(503, $message); } diff --git a/migrations/m1_update_data.php b/migrations/m1_update_data.php index 3f20633..f8bee55 100644 --- a/migrations/m1_update_data.php +++ b/migrations/m1_update_data.php @@ -17,7 +17,7 @@ class m1_update_data extends \phpbb\db\migration\migration { - static public function depends_on() + public static function depends_on() { return array('\phpbbmodders\contactadmin\migrations\version_100'); } diff --git a/migrations/m2_update_data.php b/migrations/m2_update_data.php index d4aa0e6..b3b2699 100644 --- a/migrations/m2_update_data.php +++ b/migrations/m2_update_data.php @@ -17,7 +17,7 @@ class m2_update_data extends \phpbb\db\migration\migration { - static public function depends_on() + public static function depends_on() { return array('\phpbbmodders\contactadmin\migrations\m1_update_data'); } diff --git a/migrations/m3_update_data.php b/migrations/m3_update_data.php index 739a2d1..1b8fb8a 100644 --- a/migrations/m3_update_data.php +++ b/migrations/m3_update_data.php @@ -17,7 +17,7 @@ class m3_update_data extends \phpbb\db\migration\migration { - static public function depends_on() + public static function depends_on() { return ['\phpbbmodders\contactadmin\migrations\m2_update_data']; } diff --git a/migrations/m4_update_data.php b/migrations/m4_update_data.php index 96b1b0d..a228a90 100644 --- a/migrations/m4_update_data.php +++ b/migrations/m4_update_data.php @@ -17,7 +17,7 @@ class m4_update_data extends \phpbb\db\migration\migration { - static public function depends_on() + public static function depends_on() { return ['\phpbbmodders\contactadmin\migrations\m3_update_data']; } diff --git a/migrations/version_100.php b/migrations/version_100.php index 43eaa53..8decec6 100644 --- a/migrations/version_100.php +++ b/migrations/version_100.php @@ -17,7 +17,7 @@ class version_100 extends \phpbb\db\migration\migration { - static public function depends_on() + public static function depends_on() { return array('\phpbb\db\migration\data\v31x\v314rc1'); } diff --git a/styles/prosilver/template/event/overall_footer_teamlink_after.html b/styles/prosilver/template/event/overall_footer_teamlink_after.html index 25df39c..cddad60 100644 --- a/styles/prosilver/template/event/overall_footer_teamlink_after.html +++ b/styles/prosilver/template/event/overall_footer_teamlink_after.html @@ -1,7 +1,7 @@ {% if U_CONTACTADMIN %}