Skip to content

Commit

Permalink
[FEATURE] Update extension for TYPO3 v12 support
Browse files Browse the repository at this point in the history
With this PR the extension is shippable for TYPO3 v12. This adds support
for the backend integration.
  • Loading branch information
calien666 committed Feb 8, 2024
1 parent 876e1f9 commit 7a68480
Show file tree
Hide file tree
Showing 34 changed files with 581 additions and 442 deletions.
4 changes: 2 additions & 2 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: typo3-xlsimport
type: typo3
docroot: .Build/public
php_version: "8.0"
php_version: "8.1"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
Expand Down Expand Up @@ -181,7 +181,7 @@ nodejs_version: "16"

# disable_settings_management: false
# If true, ddev will not create CMS-specific settings files like
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
# Drupal's LocalConfiguration.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
# In this case the user must provide all such settings.

# You can inject environment variables into the web container with:
Expand Down
File renamed without changes.
62 changes: 62 additions & 0 deletions .github/workflows/test11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: tests11

on:
push:
pull_request:
schedule:
- cron: '42 5 * * *'

jobs:
testsuite:
name: all tests
runs-on: ubuntu-20.04
strategy:
# This prevents cancellation of matrix job runs, if one or more already failed
# and let the remaining matrix jobs be executed anyway.
fail-fast: false
matrix:
php: [ '7.4', '8.0', '8.1', '8.2' ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -s composerUpdate

- name: Composer validate
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -s composerValidate

- name: Lint PHP
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -s lint

- name: CGL
# php-cs-fixer has isues with php8.2, so avoid executing it with that php version.
if: ${{ matrix.php <= '8.1' }}
run: Build/Scripts/runTests.sh -t 11 -n -p ${{ matrix.php }} -s cgl

- name: phpstan
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -s phpstan -e "--error-format=github"

- name: Unit Tests
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -s unit

- name: Functional Tests with mariadb and mysqli
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -d mariadb -a mysqli -s functional

- name: Functional Tests with mariadb and pdo_mysql
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -d mariadb -a pdo_mysql -s functional

- name: Functional Tests with mysql and mysqli
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -d mysql -a mysqli -s functional

- name: Functional Tests with mysql and pdo_mysql
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -d mysql -a pdo_mysql -s functional

- name: Functional Tests with postgres
# v11 postgres functional disabled with PHP 8.2 since https://github.com/doctrine/dbal/commit/73eec6d882b99e1e2d2d937accca89c1bd91b2d7
# is not fixed in doctrine core v11 doctrine 2.13.9
if: ${{ matrix.php <= '8.1' }}
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -d postgres -s functional

- name: Functional Tests with sqlite
run: Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php }} -d sqlite -s functional
57 changes: 57 additions & 0 deletions .github/workflows/test12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: tests12

on:
push:
pull_request:
schedule:
- cron: '42 5 * * *'

jobs:
testsuite:
name: all tests
runs-on: ubuntu-20.04
strategy:
# This prevents cancellation of matrix job runs, if one or more already failed
# and let the remaining matrix jobs be executed anyway.
fail-fast: false
matrix:
php: [ '8.1', '8.2' ]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -s composerUpdate

- name: Composer validate
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -s composerValidate

- name: Lint PHP
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -s lint

- name: CGL
run: Build/Scripts/runTests.sh -t 12 -n -p ${{ matrix.php }} -s cgl

- name: phpstan
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -s phpstan -e "--error-format=github"

- name: Unit Tests
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -s unit

- name: Functional Tests with mariadb and mysqli
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -d mariadb -a mysqli -s functional

- name: Functional Tests with mariadb and pdo_mysql
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -d mariadb -a pdo_mysql -s functional

- name: Functional Tests with mysql and mysqli
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -d mysql -a mysqli -s functional

- name: Functional Tests with mysql and pdo_mysql
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -d mysql -a pdo_mysql -s functional

- name: Functional Tests with postgres
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -d postgres -s functional

- name: Functional Tests with sqlite
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -d sqlite -s functional
9 changes: 4 additions & 5 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@ Options:
- 8.1: use PHP 8.1
- 8.2: use PHP 8.2
-t <11i3|11i4|12>
-t <11|12>
Only with -s composerUpdate
Specifies the TYPO3 core major version to be used
- 11i3 (default): use TYPO3 core v11 with typo3/cms-composer-installers 3.x
- 11i4: use TYPO3 core v11 with typo3/cms-composer-installers 4.0-RC1
- 11 (default): use TYPO3 core v11
- 12: use TYPO3 core v12
-e "<phpunit, codeception or additional phpstan scan options>"
Expand Down Expand Up @@ -174,7 +173,7 @@ else
ROOT_DIR=`realpath ${PWD}/../../`
fi
TEST_SUITE="unit"
TYPO3_VERSION="11i3"
TYPO3_VERSION="11"
DBMS="mariadb"
PHP_VERSION="7.4"
PHP_XDEBUG_ON=0
Expand Down Expand Up @@ -220,7 +219,7 @@ while getopts ":s:a:d:p:t:e:xy:nhuv" OPT; do
;;
t)
TYPO3_VERSION=${OPTARG}
if ! [[ ${TYPO3_VERSION} =~ ^(11i3|11i4|12)$ ]]; then
if ! [[ ${TYPO3_VERSION} =~ ^(11|12)$ ]]; then
INVALID_OPTIONS+=("t ${OPTARG}")
fi
;;
Expand Down
6 changes: 6 additions & 0 deletions Build/phpstan/Core11/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$row of method TYPO3\\\\CMS\\\\Core\\\\Authentication\\\\BackendUserAuthentication\\:\\:doesUserHaveAccess\\(\\) expects array, array\\|null given\\.$#"
count: 1
path: ../../../Classes/Utility/AccessUtility.php
10 changes: 5 additions & 5 deletions Build/phpstan/phpstan.neon → Build/phpstan/Core11/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
includes:
- phpstan-baseline.neon
- ../../.Build/vendor/friendsoftypo3/phpstan-typo3/extension.neon
- ../../../.Build/vendor/friendsoftypo3/phpstan-typo3/extension.neon

parameters:
level: 8

# Use local cache dir instead of /tmp
tmpDir: ../../.Build/.cache/phpstan
tmpDir: ../../../.Build/.cache/phpstan

paths:
- ../../Classes
- ../../Tests
- ../../../Classes
- ../../../Tests

excludePaths:
# Checking acceptance Cest and Support files is cumbersome due to codeception dynamic mixin generation
- ../../Tests/Acceptance/*
- ../../../Tests/Acceptance/*
6 changes: 6 additions & 0 deletions Build/phpstan/Core12/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$row of method TYPO3\\\\CMS\\\\Core\\\\Authentication\\\\BackendUserAuthentication\\:\\:doesUserHaveAccess\\(\\) expects array, array\\|null given\\.$#"
count: 1
path: ../../../Classes/Utility/AccessUtility.php
17 changes: 17 additions & 0 deletions Build/phpstan/Core12/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
includes:
- phpstan-baseline.neon
- ../../../.Build/vendor/friendsoftypo3/phpstan-typo3/extension.neon

parameters:
level: 8

# Use local cache dir instead of /tmp
tmpDir: ../../../.Build/.cache/phpstan

paths:
- ../../../Classes
- ../../../Tests

excludePaths:
# Checking acceptance Cest and Support files is cumbersome due to codeception dynamic mixin generation
- ../../../Tests/Acceptance/*
21 changes: 0 additions & 21 deletions Build/phpstan/phpstan-baseline.neon

This file was deleted.

File renamed without changes.
61 changes: 0 additions & 61 deletions Build/phpunit/FunctionalTests-11i4.xml

This file was deleted.

File renamed without changes.
61 changes: 0 additions & 61 deletions Build/phpunit/UnitTests-11i4.xml

This file was deleted.

Loading

0 comments on commit 7a68480

Please sign in to comment.