diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 61dd07a..9b5725d 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -1,457 +1,29 @@
name: Tests
-env:
- EXTNAME: phpbb/skeleton # Your extension vendor/package name
- SNIFF: 1 # Run code sniffer on your code? 1 or 0
- 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:
branches: # Run tests when commits are pushed to these branches in your repo
+ - main
- master
- develop
+ - dev/*
pull_request: # Run tests when pull requests are made on these branches in your repo
branches:
+ - main
- master
- develop
+ - dev/*
jobs:
- # START Basic Checks Job (EPV, code sniffer, images check, etc.)
- basic-checks:
- runs-on: ubuntu-22.04
- strategy:
- matrix:
- include:
- - php: '7.2'
- db: "none"
- NOTESTS: 1
-
- name: PHP ${{ matrix.php }} - ${{ matrix.db }}
-
- steps:
- - name: Checkout phpBB
- uses: actions/checkout@v4
- with:
- repository: phpbb/phpbb
- ref: ${{ env.PHPBB_BRANCH }}
- path: phpBB3
-
- - name: Checkout extension
- uses: actions/checkout@v4
- with:
- path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
- coverage: none
-
- - name: Setup environment for phpBB
- env:
- DB: ${{ matrix.db }}
- PHP_VERSION: ${{ matrix.php }}
- NOTESTS: '1'
- run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS
- working-directory: ./phpBB3
-
- - name: Setup EPV
- if: ${{ env.EPV != 0 }}
- run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs
- working-directory: ./phpBB3/phpBB
-
- - name: Run code sniffer
- if: ${{ env.SNIFF != 0 }}
- env:
- NOTESTS: '1'
- run: .github/ext-sniff.sh $EXTNAME $NOTESTS
- working-directory: ./phpBB3
-
- - name: Check image ICC profiles
- if: ${{ env.IMAGE_ICC != 0 }}
- run: .github/check-image-icc-profiles.sh
- working-directory: ./phpBB3
-
- - name: Check executable files
- if: ${{ env.EXECUTABLE_FILES != 0 }}
- run: .github/ext-check-executable-files.sh ./ $EXTNAME
- working-directory: ./phpBB3
-
- - name: Run EPV
- if: ${{ env.EPV != 0 }}
- run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/"
- working-directory: ./phpBB3
- # END Basic Checks Job
-
- # START MySQL and MariaDB Job
- mysql-tests:
- runs-on: ubuntu-22.04
- strategy:
- matrix:
- include:
- - php: '7.2'
- db: "mariadb:10.1"
- - php: '7.2'
- db: "mariadb:10.2"
- - php: '7.2'
- db: "mariadb:10.3"
- - php: '7.2'
- db: "mariadb:10.4"
- - php: '7.2'
- db: "mariadb:10.5"
- - php: '7.2'
- db: "mysql:5.6"
- db_alias: "MyISAM Tests"
- MYISAM: 1
- - php: '7.2'
- db: "mysql:5.6"
- - php: '7.2'
- db: "mysql:5.7"
- COVERAGE: 1
- db_alias: "mysql:5.7 with Coverage"
- - php: '7.3'
- db: "mysql:5.7"
- - php: '7.4'
- db: "mysql:5.7"
- - php: '7.4'
- db: "mysql:8.0"
- - php: '8.0'
- db: "mysql:5.7"
- - php: '8.1'
- db: "mysql:5.7"
- - php: '8.2'
- db: "mysql:5.7"
- - php: '8.3'
- db: "mysql:5.7"
- - php: '8.4'
- db: "mysql:5.7"
-
- name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
-
- services:
- mysql:
- image: ${{ matrix.db }}
- env:
- MYSQL_ALLOW_EMPTY_PASSWORD: yes
- MYSQL_DATABASE: phpbb_tests
- ports:
- - 3306:3306
- options: >-
- --health-cmd="mysqladmin ping"
- --health-interval=10s
- --health-timeout=5s
- --health-retries=3
-
- redis:
- image: redis
- options: >-
- --health-cmd "redis-cli ping"
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
- ports:
- - 6379:6379
-
- steps:
- - name: Checkout phpBB
- uses: actions/checkout@v4
- with:
- repository: phpbb/phpbb
- ref: ${{ env.PHPBB_BRANCH }}
- path: phpBB3
-
- - name: Checkout extension
- uses: actions/checkout@v4
- with:
- path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
-
- - id: database-type
- env:
- MATRIX_DB: ${{ matrix.db }}
- run: |
- db=$(echo "${MATRIX_DB%%:*}")
- echo "db=$db" >> $GITHUB_OUTPUT
-
- - name: Setup PHP
- if: ${{ matrix.COVERAGE != 1 }}
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
- coverage: none
-
- - name: Setup PHP with Coverage
- if: ${{ matrix.COVERAGE == 1 }}
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
- coverage: xdebug
-
- - name: Setup environment for phpBB
- env:
- DB: ${{steps.database-type.outputs.db}}
- PHP_VERSION: ${{ matrix.php }}
- NOTESTS: '0'
- run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
- working-directory: ./phpBB3
-
- - name: Setup database
- env:
- DB: ${{steps.database-type.outputs.db}}
- MYISAM: ${{ matrix.MYISAM != 1 && '0' || '1' }}
- run: .github/setup-database.sh $DB $MYISAM
- working-directory: ./phpBB3
-
- - name: Setup PHPUnit files
- env:
- DB: ${{steps.database-type.outputs.db}}
- COVERAGE: ${{ matrix.COVERAGE != 1 && '0' || '1' }}
- run: |
- if [ $COVERAGE == '1' ]
- then
- sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/language\/<\/directory>\n\t\t\t\t..\/migrations\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' .github/phpunit-$DB-github.xml &> phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml
- else
- mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
- fi
- working-directory: ./phpBB3
-
- - name: Run unit tests
- env:
- DB: ${{steps.database-type.outputs.db}}
- COVERAGE: ${{ matrix.COVERAGE != 1 && '0' || '1' }}
- run: |
- if [ $COVERAGE == '1' ]
- then
- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php --coverage-clover build/logs/clover.xml
- else
- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
- fi
- working-directory: ./phpBB3
-
- - name: Send code coverage
- if: ${{ matrix.COVERAGE == 1 }}
- uses: codecov/codecov-action@v3
- with:
- files: ./phpBB3/build/logs/clover.xml
- # END MySQL and MariaDB Job
-
- # START PostgreSQL Job
- postgres-tests:
- runs-on: ubuntu-22.04
- strategy:
- matrix:
- include:
- - php: '7.2'
- db: "postgres:9.5"
- - php: '7.2'
- db: "postgres:9.6"
- - php: '7.2'
- db: "postgres:10"
- - php: '7.2'
- db: "postgres:11"
- - php: '7.2'
- db: "postgres:12"
- - php: '7.2'
- db: "postgres:13"
- - php: '7.3'
- db: "postgres:13"
- - php: '7.4'
- db: "postgres:13"
- - php: '8.0'
- db: "postgres:12"
- - php: '8.0'
- db: "postgres:13"
- - php: '8.1'
- db: "postgres:14"
- - php: '8.2'
- db: "postgres:14"
- - php: '8.3'
- db: "postgres:14"
- - php: '8.4'
- db: "postgres:14"
-
- name: PHP ${{ matrix.php }} - ${{ matrix.db }}
-
- services:
- postgres:
- image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
- env:
- POSTGRES_HOST: localhost
- POSTGRES_USER: postgres
- POSTGRES_PASSWORD: postgres
- ports:
- - 5432:5432
- options: >-
- -v /var/run/postgresql:/var/run/postgresql
- --health-cmd pg_isready
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
-
- redis:
- image: redis
- options: >-
- --health-cmd "redis-cli ping"
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
- ports:
- - 6379:6379
-
- steps:
- - name: Checkout phpBB
- uses: actions/checkout@v4
- with:
- repository: phpbb/phpbb
- ref: ${{ env.PHPBB_BRANCH }}
- path: phpBB3
-
- - name: Checkout extension
- uses: actions/checkout@v4
- with:
- path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
-
- - id: database-type
- env:
- MATRIX_DB: ${{ matrix.db }}
- run: |
- db=$(echo "${MATRIX_DB%%:*}")
- echo "db=$db" >> $GITHUB_OUTPUT
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
- coverage: none
-
- - name: Setup environment for phpBB
- env:
- DB: ${{steps.database-type.outputs.db}}
- PHP_VERSION: ${{ matrix.php }}
- NOTESTS: '0'
- run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
- working-directory: ./phpBB3
-
- - name: Setup database
- env:
- DB: ${{steps.database-type.outputs.db}}
- MYISAM: '0'
- run: .github/setup-database.sh $DB $MYISAM
- working-directory: ./phpBB3
-
- - name: Setup PHPUnit files
- run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
- working-directory: ./phpBB3
-
- - name: Run unit tests
- env:
- DB: ${{steps.database-type.outputs.db}}
- run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
- working-directory: ./phpBB3
- # END PostgreSQL Job
-
- # START Other Tests Job (SQLite 3 and mssql)
- other-tests:
- runs-on: ubuntu-22.04
- strategy:
- matrix:
- include:
- - php: '7.2'
- db: "sqlite3"
- - php: '7.2'
- db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
- db_alias: 'MSSQL 2019'
- - php: '7.2'
- db: "mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04"
- db_alias: 'MSSQL 2022'
-
- name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
-
- services:
- mssql:
- image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' || matrix.db }}
- env:
- SA_PASSWORD: "Pssw0rd_12"
- ACCEPT_EULA: "y"
- ports:
- - 1433:1433
- options: >-
- --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Pssw0rd_12' -Q \"Use [master]; CREATE DATABASE [phpbb_tests] COLLATE Latin1_General_CI_AS\" || exit 1"
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
- --health-start-period 10s
-
- redis:
- image: redis
- options: >-
- --health-cmd "redis-cli ping"
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
- ports:
- - 6379:6379
-
- steps:
- - name: Checkout phpBB
- uses: actions/checkout@v4
- with:
- repository: phpbb/phpbb
- ref: ${{ env.PHPBB_BRANCH }}
- path: phpBB3
-
- - name: Checkout extension
- uses: actions/checkout@v4
- with:
- path: phpBB3/phpBB/ext/${{ env.EXTNAME }}
-
- - id: database-type
- env:
- MATRIX_DB: ${{ matrix.db }}
- run: |
- if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ]
- then
- db='mssql'
- else
- db=$(echo "${MATRIX_DB%%:*}")
- fi
- echo "db=$db" >> $GITHUB_OUTPUT
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap
- coverage: none
-
- - name: Setup environment for phpBB
- env:
- DB: ${{steps.database-type.outputs.db}}
- PHP_VERSION: ${{ matrix.php }}
- NOTESTS: '0'
- run: .github/setup-phpbb.sh $DB $PHP_VERSION ${NOTESTS:-0}
- working-directory: ./phpBB3
-
- - name: Setup database
- env:
- DB: ${{steps.database-type.outputs.db}}
- MYISAM: '0'
- run: .github/setup-database.sh $DB $MYISAM
- working-directory: ./phpBB3
-
- - name: Setup PHPUnit files
- run: mkdir -p phpBB/ext/$EXTNAME/.github && cp .github/phpunit* $_
- working-directory: ./phpBB3
-
- - name: Run unit tests
- env:
- DB: ${{steps.database-type.outputs.db}}
- run: phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/.github/phpunit-$DB-github.xml --bootstrap ./tests/bootstrap.php
- working-directory: ./phpBB3
- # END Other Tests Job
+ call-tests:
+ uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@master
+ with:
+ EXTNAME: phpbb/skeleton # Your extension vendor/package name
+ SNIFF: 1 # Run code sniffer on your code? 1 or 0
+ IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0
+ EPV: 0 # Run EPV (Extension Pre Validator) on your code? 1 or 0
+ EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0
+ CODECOV: 1 # Run code coverage via codecov? 1 or 0
+ PHPBB_BRANCH: master # The phpBB branch to run tests on
+ secrets:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Do not change this
diff --git a/composer.json b/composer.json
index 83173ff..edb8f38 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "The official phpBB skeleton extension generator.",
"homepage": "https://www.phpbb.com/customise/db/official_tool/ext_skeleton/",
- "version": "1.1.13",
+ "version": "1.2.0-dev",
"license": "GPL-2.0-only",
"authors": [
{
@@ -19,7 +19,7 @@
}
],
"require": {
- "php": ">=5.6",
+ "php": ">=8.1",
"composer/installers": "~1.0"
},
"require-dev": {
@@ -28,7 +28,7 @@
"extra": {
"display-name": "phpBB Skeleton Extension",
"soft-require": {
- "phpbb/phpbb": ">=3.2.3,<4.0.0@dev"
+ "phpbb/phpbb": ">=4.0.0@dev"
},
"version-check": {
"host": "www.phpbb.com",
@@ -36,5 +36,10 @@
"filename": "version_check",
"ssl": true
}
+ },
+ "config": {
+ "allow-plugins": {
+ "composer/installers": true
+ }
}
}
diff --git a/composer.lock b/composer.lock
index 336bc59..791ccbf 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,160 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "cc528df5b57423e40c915b49a9287abc",
- "packages": [],
+ "content-hash": "020b66f81248fc66d1b48e0385f457ee",
+ "packages": [
+ {
+ "name": "composer/installers",
+ "version": "v1.12.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/installers.git",
+ "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19",
+ "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0 || ^2.0"
+ },
+ "replace": {
+ "roundcube/plugin-installer": "*",
+ "shama/baton": "*"
+ },
+ "require-dev": {
+ "composer/composer": "1.6.* || ^2.0",
+ "composer/semver": "^1 || ^3",
+ "phpstan/phpstan": "^0.12.55",
+ "phpstan/phpstan-phpunit": "^0.12.16",
+ "symfony/phpunit-bridge": "^4.2 || ^5",
+ "symfony/process": "^2.3"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "Composer\\Installers\\Plugin",
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Installers\\": "src/Composer/Installers"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kyle Robinson Young",
+ "email": "kyle@dontkry.com",
+ "homepage": "https://github.com/shama"
+ }
+ ],
+ "description": "A multi-framework Composer library installer",
+ "homepage": "https://composer.github.io/installers/",
+ "keywords": [
+ "Craft",
+ "Dolibarr",
+ "Eliasis",
+ "Hurad",
+ "ImageCMS",
+ "Kanboard",
+ "Lan Management System",
+ "MODX Evo",
+ "MantisBT",
+ "Mautic",
+ "Maya",
+ "OXID",
+ "Plentymarkets",
+ "Porto",
+ "RadPHP",
+ "SMF",
+ "Starbug",
+ "Thelia",
+ "Whmcs",
+ "WolfCMS",
+ "agl",
+ "aimeos",
+ "annotatecms",
+ "attogram",
+ "bitrix",
+ "cakephp",
+ "chef",
+ "cockpit",
+ "codeigniter",
+ "concrete5",
+ "croogo",
+ "dokuwiki",
+ "drupal",
+ "eZ Platform",
+ "elgg",
+ "expressionengine",
+ "fuelphp",
+ "grav",
+ "installer",
+ "itop",
+ "joomla",
+ "known",
+ "kohana",
+ "laravel",
+ "lavalite",
+ "lithium",
+ "magento",
+ "majima",
+ "mako",
+ "mediawiki",
+ "miaoxing",
+ "modulework",
+ "modx",
+ "moodle",
+ "osclass",
+ "pantheon",
+ "phpbb",
+ "piwik",
+ "ppi",
+ "processwire",
+ "puppet",
+ "pxcms",
+ "reindex",
+ "roundcube",
+ "shopware",
+ "silverstripe",
+ "sydes",
+ "sylius",
+ "symfony",
+ "tastyigniter",
+ "typo3",
+ "wordpress",
+ "yawik",
+ "zend",
+ "zikula"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/installers/issues",
+ "source": "https://github.com/composer/installers/tree/v1.12.0"
+ },
+ "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": "2021-09-13T08:19:44+00:00"
+ }
+ ],
"packages-dev": [
{
"name": "phing/phing",
@@ -70,8 +222,8 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": ">=5.6"
+ "php": ">=8.1"
},
"platform-dev": [],
- "plugin-api-version": "2.0.0"
+ "plugin-api-version": "2.2.0"
}
diff --git a/console/create.php b/console/create.php
index 2e89568..f65887d 100644
--- a/console/create.php
+++ b/console/create.php
@@ -18,6 +18,7 @@
use phpbb\skeleton\helper\packager;
use phpbb\skeleton\helper\validator;
use phpbb\user;
+use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
@@ -97,7 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln($this->language->lang('EXTENSION_CLI_SKELETON_SUCCESS'));
- return 0;
+ return SymfonyCommand::SUCCESS;
}
/**
diff --git a/ext.php b/ext.php
index dc6c9b0..51df532 100644
--- a/ext.php
+++ b/ext.php
@@ -46,25 +46,20 @@ public function is_enableable()
*/
protected function phpbb_requirement()
{
- if (phpbb_version_compare(PHPBB_VERSION, '3.2.3', '<'))
+ if (phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '<'))
{
- $this->errors[] = 'PHPBB_VERSION_MIN_ERROR';
- }
-
- else if (phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '>='))
- {
- $this->errors[] = 'PHPBB_VERSION_MAX_ERROR';
+ $this->errors[] = 'PHPBB_VERSION_ERROR';
}
}
/**
- * Check PHP 5.6.0 minimum requirement.
+ * Check PHP 8.1 minimum requirement.
*
* @return void
*/
protected function php_requirement()
{
- if (PHP_VERSION_ID < 50600)
+ if (PHP_VERSION_ID < 80100)
{
$this->errors[] = 'PHP_VERSION_ERROR';
}
diff --git a/helper/packager.php b/helper/packager.php
index 237a402..f9c602e 100644
--- a/helper/packager.php
+++ b/helper/packager.php
@@ -208,9 +208,7 @@ protected function get_template_engine()
$path_helper,
$this->phpbb_container->getParameter('core.cache_dir'),
$this->phpbb_container->get('ext.manager'),
- new loader(
- new filesystem()
- )
+ new loader()
);
// Custom filter for use by packager to decode greater/less than symbols
diff --git a/language/en/common.php b/language/en/common.php
index b1b6758..2f5cb5e 100644
--- a/language/en/common.php
+++ b/language/en/common.php
@@ -155,7 +155,6 @@
'SKELETON_INVALID_PHPBB_MAX_VERSION'=> 'The maximum phpBB version requirement is invalid.',
'NO_ZIPARCHIVE_ERROR' => 'The ZipArchive class is required, but was not found in your PHP configuration.',
- 'PHP_VERSION_ERROR' => 'PHP 5.6 or newer is required to use this extension.',
- 'PHPBB_VERSION_MIN_ERROR' => 'phpBB 3.2.3 or newer is required to use this extension.',
- 'PHPBB_VERSION_MAX_ERROR' => 'phpBB 4 is not supported with this version of the extension. Please check for a newer version of this extension.'
+ 'PHP_VERSION_ERROR' => 'PHP 8.1 or newer is required to use this extension.',
+ 'PHPBB_VERSION_ERROR' => 'phpBB 4.0.0-dev or newer is required to use this extension.',
]);
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 574c6b9..cd8d13a 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,16 +1,27 @@
-
-
+
+
+ ./
+
+
+ ./language/
+ ./migrations/
+ ./tests/
+
+
./tests
@@ -20,15 +31,4 @@
./tests/functional/
-
-
-
- ./
-
- ./language/
- ./migrations/
- ./tests/
-
-
-
diff --git a/skeleton/phpunit.xml.dist.twig b/skeleton/phpunit.xml.dist.twig
index e40aa26..c2368ef 100644
--- a/skeleton/phpunit.xml.dist.twig
+++ b/skeleton/phpunit.xml.dist.twig
@@ -1,3 +1,4 @@
+{% if skeleton_version_compare(REQUIREMENTS.phpbb_version_max, "4.0", "<") %}
+{% else %}
+
+
+
+
+ ./
+
+
+ ./language/
+ ./migrations/
+ ./tests/
+
+
+
+
+ ./tests
+ ./tests/functional
+
+
+ ./tests/functional/
+
+
+
+{% endif %}
diff --git a/skeleton/styles/prosilver/template/event/overall_header_navigation_prepend.html.twig b/skeleton/styles/prosilver/template/event/overall_header_navigation_prepend.html.twig
index d9183e1..a3e8089 100644
--- a/skeleton/styles/prosilver/template/event/overall_header_navigation_prepend.html.twig
+++ b/skeleton/styles/prosilver/template/event/overall_header_navigation_prepend.html.twig
@@ -1,9 +1,15 @@
{% if skeleton_version_compare(REQUIREMENTS.phpbb_version_min, "3.2", "<") %}{# for phpBB 3.1.x #}
{{ '{{' }} lang('{{ EXTENSION.extension_name|upper }}_PAGE') }}
-{% else %}{# for phpBB > 3.2.x #}
+{% elseif skeleton_version_compare(REQUIREMENTS.phpbb_version_min, "4.0", "<") %}{# for phpBB 3.2.x - 3.3.x #}
{{ '{{' }} lang('{{ EXTENSION.extension_name|upper }}_PAGE') }}
+{% else %}{# for phpBB > 4.0.x #}
+
+
+ {{ '{{' }} Icon('font', 'circle-question', lang('{{ EXTENSION.extension_name|upper }}_PAGE'), false, 'fas') }}
+
+
{% endif %}
diff --git a/styles/prosilver/template/event/overall_header_navigation_prepend.html b/styles/prosilver/template/event/overall_header_navigation_prepend.html
index dbc405f..d645473 100644
--- a/styles/prosilver/template/event/overall_header_navigation_prepend.html
+++ b/styles/prosilver/template/event/overall_header_navigation_prepend.html
@@ -1,6 +1,5 @@
-
- {{ lang('PHPBB_SKELETON_EXT') }}
+ {{ Icon('font', 'skull', lang('PHPBB_SKELETON_EXT'), false, 'fas', {'style': 'height:14px;width:14px;'}) }}
diff --git a/styles/prosilver/template/skeleton_body.html b/styles/prosilver/template/skeleton_body.html
index 12a5cc5..9df544b 100644
--- a/styles/prosilver/template/skeleton_body.html
+++ b/styles/prosilver/template/skeleton_body.html
@@ -19,7 +19,7 @@ {{ lang('PHPBB_CREATE_SKELETON_EXT') }}
@@ -98,7 +98,7 @@ {{ lang('SKELETON_COMPONENT_GROUP_' ~ group) }}<
diff --git a/tests/console/create_test.php b/tests/console/create_test.php
index bdd09f9..a349002 100644
--- a/tests/console/create_test.php
+++ b/tests/console/create_test.php
@@ -141,7 +141,7 @@ public function get_command_tester($question_answers = []): CommandTester
return $response;
};
$helper = $this->getMockBuilder('\Symfony\Component\Console\Helper\QuestionHelper')
- ->setMethods(['ask'])
+ ->onlyMethods(['ask'])
->disableOriginalConstructor()
->getMock();
$helper->method('ask')
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 0b663f9..e9a8bc7 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -36,7 +36,6 @@ protected function setup_engine(array $new_config = array())
new \phpbb\symfony_request(
new \phpbb_mock_request()
),
- $filesystem,
$this->createMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
@@ -46,8 +45,10 @@ protected function setup_engine(array $new_config = array())
$cache_path = $phpbb_root_path . 'cache/twig';
$context = new \phpbb\template\context();
- $loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), '');
+ $loader = new \phpbb\template\twig\loader();
+ $assets_bag = new \phpbb\template\assets_bag();
$twig = new \phpbb\template\twig\environment(
+ $assets_bag,
$config,
$filesystem,
$path_helper,