Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINTENANCE] Run tests for all supported PHP versions and update dependencies #1455

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -5,14 +5,15 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
test:
name: TYPO3
runs-on: ubuntu-latest
strategy:
matrix:
variants: [ {typo3: 11.5, php: 8.1}, {typo3: 12.4, php: 8.1} ]
variants: [ {typo3: 11.5, php: 8.1}, {typo3: 12.4, php: 8.1}, {typo3: 12.4, php: 8.4} ]
steps:
- name: Checkout code
uses: actions/checkout@v4
5 changes: 3 additions & 2 deletions Build/Test/runTests.sh
Original file line number Diff line number Diff line change
@@ -113,11 +113,12 @@ Options:
- 5.7
- 8.0 (default)

-p <8.1|8.2|8.3>
-p <8.1|8.2|8.3|8.4>
Specifies the PHP minor version to be used
- 8.1: use PHP 8.1 (default)
- 8.2: use PHP 8.2
- 8.3: use PHP 8.3
- 8.4: use PHP 8.4

-e "<phpunit options>"
Only with -s functional|functionalDeprecated|unit|unitDeprecated|unitRandom|acceptance
@@ -218,7 +219,7 @@ while getopts ":a:s:t:d:i:j:p:e:xy:whuv" OPT; do
;;
p)
PHP_VERSION=${OPTARG}
if ! [[ ${PHP_VERSION} =~ ^(8.1|8.2|8.3)$ ]]; then
if ! [[ ${PHP_VERSION} =~ ^(8.1|8.2|8.3|8.4)$ ]]; then
INVALID_OPTIONS+=("${OPTARG}")
fi
;;
6 changes: 3 additions & 3 deletions Classes/Controller/PageViewController.php
Original file line number Diff line number Diff line change
@@ -312,7 +312,7 @@ public function addDocumentAction(FormAddDocument $formAddDocument): ResponseInt
* @param int|null $docNumber
* @return array
*/
protected function getMeasures(int $page, MetsDocument $specificDoc = null, $docNumber = null): array
protected function getMeasures(int $page, ?MetsDocument $specificDoc = null, $docNumber = null): array
{
if ($specificDoc) {
$doc = $specificDoc;
@@ -380,7 +380,7 @@ protected function getMeasures(int $page, MetsDocument $specificDoc = null, $doc
*
* @return array URL and MIME type of fulltext file
*/
protected function getScore(int $page, MetsDocument $specificDoc = null)
protected function getScore(int $page, ?MetsDocument $specificDoc = null)
{
$score = [];
$loc = '';
@@ -638,7 +638,7 @@ protected function getAnnotationContainers(int $page): array
*
* @return array URL and MIME type of image file
*/
protected function getImage(int $page, MetsDocument $specificDoc = null): array
protected function getImage(int $page, ?MetsDocument $specificDoc = null): array
{
$image = [];
// Get @USE value of METS fileGrp.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
"docs": "https://docs.typo3.org/p/kitodo/presentation/main/en-us/"
},
"require": {
"php": "8.1 - 8.3",
"php": "8.1 - 8.4",
"ext-curl": "*",
"ext-dom": "*",
"ext-json": "*",
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
'category' => 'misc',
'constraints' => [
'depends' => [
'php' => '8.1.0-8.3.99',
'php' => '8.1.0-8.4.99',
'typo3' => '11.5.0-12.4.99'
],
'conflicts' => [],
Loading