Skip to content

Commit ed160cd

Browse files
committed
[TASK] TYPO3 11 LTS and PHP 8.1 compatibility
1 parent eaad00e commit ed160cd

File tree

61 files changed

+1421
-1078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1421
-1078
lines changed

.editorconfig

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# EditorConfig is awesome: http://EditorConfig.org
2-
# TYPO3 Standard: https://github.com/TYPO3/TYPO3.CMS/blob/master/.editorconfig
2+
# TYPO3 Standard: https://github.com/TYPO3/coding-standards
33

44
# top-most EditorConfig file
55
root = true
66

7+
# Unix-style newlines with a newline ending every file
78
[*]
89
charset = utf-8
910
end_of_line = lf
@@ -12,15 +13,50 @@ indent_size = 4
1213
insert_final_newline = true
1314
trim_trailing_whitespace = true
1415

16+
# TS/JS-Files
17+
[*.{ts,js}]
18+
indent_size = 2
19+
20+
# JSON-Files
21+
[*.json]
22+
indent_style = tab
23+
1524
# ReST-Files
1625
[*.rst]
17-
indent_size = 3
26+
indent_size = 4
1827
max_line_length = 80
1928

2029
# YAML-Files
2130
[*.{yaml,yml}]
2231
indent_size = 2
2332

33+
# NEON-Files
34+
[*.neon]
35+
indent_size = 2
36+
indent_style = tab
37+
38+
# package.json
39+
[package.json]
40+
indent_size = 2
41+
42+
# TypoScript
43+
[*.{typoscript,tsconfig}]
44+
indent_size = 2
45+
2446
# XLF/XML-Files
2547
[*.{xlf,xml}]
2648
indent_style = tab
49+
50+
# SQL-Files
51+
[*.sql]
52+
indent_style = tab
53+
indent_size = 2
54+
55+
# .htaccess
56+
[{_.htaccess,.htaccess}]
57+
indent_style = tab
58+
59+
# Bash scripts
60+
[*.sh]
61+
indent_style = space
62+
indent_size = 2

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ A clear and concise description of what you expected to happen.
2828
If applicable, add screenshots to help explain your problem.
2929

3030
**Used versions (please complete the following information):**
31-
- TYPO3 Version: [e.g. 10.4.20]
31+
- TYPO3 Version: [e.g. 11.5.6]
3232
- Browser: [e.g. chrome, safari]
33-
- EXT:solr Version: [e.g. 11.1.1]
34-
- EXT:tika Version: [e.g. 10.0.0]
35-
- Used Apache Solr Version: [e.g. 8.9.0]
33+
- EXT:solr Version: [e.g. 11.5.1]
34+
- EXT:tika Version: [e.g. 11.0.0]
35+
- Used Apache Solr Version: [e.g. 8.11.1]
3636
- PHP Version: [e.g. 7.4.0]
3737
- MySQL Version: [e.g. 8.0.0]
3838

.github/workflows/ci.yml

Lines changed: 72 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2,110 +2,108 @@ name: build
22

33
on:
44
push:
5-
branches: [ main, release-10.0.x, release-6.0.x ]
5+
branches: [ 'main', 'release-11.0.x', 'release-10.0.x' ]
66
tags:
77
- "**"
88
pull_request:
9-
branches: [ main, release-10.0.x, release-6.0.x ]
9+
branches: [ 'main', 'release-11.0.x', 'release-10.0.x' ]
1010

1111
env:
12+
CI_BUILD_DIRECTORY: '/home/runner/work/ext-tika/ext-tika/.Build'
1213
TIKA_VERSION: '1.24.1'
13-
TIKA_PATH: /ramfs/data-tika-binaries
14+
TIKA_PATH: '/home/runner/work/ext-tika/ext-tika/.Build/data-tika-binaries'
1415
EXT_SOLR_VERSION: 'dev-release-11.5.x'
15-
TYPO3_DATABASE_NAME: 'typo3_ci'
16-
TYPO3_DATABASE_HOST: '127.0.0.1'
17-
TYPO3_DATABASE_USERNAME: 'root'
18-
TYPO3_DATABASE_PASSWORD: 'root'
19-
PHP_CS_FIXER_VERSION: '^3.0.2'
2016

21-
LOCAL_IMAGE_NAME: 'solrci-image:latest'
22-
LOCAL_CONTAINER_NAME: 'solrci-container'
17+
SOLR_IMAGE_TAG: 'release-11.5.x'
18+
SOLR_CONTAINER_NAME: 'solrci-container'
2319
TESTING_SOLR_PORT: 8983
24-
LOCAL_SOLR_VOLUME_NAME: 'solrci-volume'
25-
LOCAL_SOLR_VOLUME_PATH: '/ramfs/data-solr'
20+
SOLR_VOLUME_NAME: 'solrci-volume'
21+
SOLR_VOLUME_PATH: '/home/runner/work/ext-tika/ext-tika/.Build/data-solr'
2622

27-
CI_BUILD_DIRECTORY: '/ramfs/data-build'
2823
jobs:
2924
tests:
3025
runs-on: ubuntu-latest
3126
strategy:
3227
matrix:
33-
PHP: [ '7.4' ]
34-
TYPO3: [ '^11.5']
28+
PHP: [ '7.4', '8.0', '8.1' ]
29+
TYPO3: [ '^11.5', '11.5.x-dev' ]
3530
env:
31+
TYPO3_DATABASE_NAME: 'typo3_ci'
32+
TYPO3_DATABASE_HOST: '127.0.0.1'
33+
TYPO3_DATABASE_USERNAME: 'root'
34+
TYPO3_DATABASE_PASSWORD: 'root'
3635
TYPO3_VERSION: ${{ matrix.TYPO3 }}
3736

3837
name: TYPO3 ${{ matrix.TYPO3 }} on PHP ${{ matrix.PHP }}
3938
steps:
4039
# Workaround for issue with actions/checkout@v2 wrong PR commit checkout: See https://github.com/actions/checkout/issues/299#issuecomment-677674415
41-
- name: Checkout current state of Pull Request
40+
-
41+
name: Checkout current state of Pull Request
4242
if: github.event_name == 'pull_request'
4343
uses: actions/checkout@v2
4444
with:
45+
fetch-depth: 2
4546
ref: ${{ github.event.pull_request.head.sha }}
46-
- name: Checkout current state of Branch
47+
-
48+
name: Checkout current state of Branch
4749
if: github.event_name == 'push'
4850
uses: actions/checkout@v2
49-
50-
- name: Cache Apache Tika Binaries
51+
with:
52+
fetch-depth: 2
53+
# End: Workaround for issue with actions/checkout@v2 wrong PR commit checkout
54+
-
55+
name: Cache Apache Tika Binaries
5156
id: tika-bineries
5257
uses: actions/cache@v2
5358
with:
5459
path: $TIKA_PATH
5560
key: tika-bineries
5661

57-
- name: Mount RAMFS
62+
-
63+
name: Mount RAMFS
5864
run: |
59-
id
60-
sudo mkdir /ramfs
61-
sudo mount -t tmpfs -o size=2048m none /ramfs
62-
sudo mkdir -p /ramfs/data-{solr,mysql,build} && sudo chown $USER /ramfs/data-* && sudo chown 8983:8983 /ramfs/data-solr
63-
64-
- name: Setup PHP
65+
sudo mkdir -p ${{ env.CI_BUILD_DIRECTORY }}
66+
sudo mount -t tmpfs -o size=2048m none ${{ env.CI_BUILD_DIRECTORY }}
67+
sudo mkdir -p ${{ env.CI_BUILD_DIRECTORY }}/data-{solr,mysql,tika-binaries} \
68+
&& sudo chown $USER ${{ env.CI_BUILD_DIRECTORY }}/data-{mysql,tika-binaries} \
69+
&& sudo chown 8983:8983 ${{ env.CI_BUILD_DIRECTORY }}/data-solr
70+
-
71+
name: 'Start Docker: Solr, Tika, MySQL'
72+
run: |
73+
docker run --name "MySQL-CI" -v ${{ env.CI_BUILD_DIRECTORY }}/data-mysql:/var/lib/mysql -p 3306:3306 \
74+
-e MYSQL_DATABASE=$TYPO3_DATABASE_NAME \
75+
-e MYSQL_ROOT_PASSWORD=$TYPO3_DATABASE_PASSWORD \
76+
-d mysql:8.0 mysqld --default-authentication-plugin=mysql_native_password
77+
sudo chmod g+w "$SOLR_VOLUME_PATH"
78+
docker volume create --name "$LOCAL_VOLUME_NAME" --opt type=none --opt device="$SOLR_VOLUME_PATH" --opt o=bind
79+
docker run --rm --name="$SOLR_CONTAINER_NAME" -d -p 127.0.0.1:8983:8983 -v "$LOCAL_VOLUME_NAME":"/var/solr" "typo3solr/ext-solr:$SOLR_IMAGE_TAG"
80+
docker run -d -p 9998:9998 apache/tika:$TIKA_VERSION"-full"
81+
docker ps
82+
-
83+
name: Setup PHP
6584
uses: shivammathur/setup-php@v2
6685
with:
6786
php-version: ${{ matrix.PHP }}
6887
coverage: xdebug
6988
tools: composer:v2
70-
71-
- name: CI-Bootstrap
89+
-
90+
name: CI-Bootstrap
7291
run: |
73-
echo "CI_BUILD_DIRECTORY=$CI_BUILD_DIRECTORY/"
74-
cp -r ../ext-tika $CI_BUILD_DIRECTORY/.
75-
cd $CI_BUILD_DIRECTORY/ext-tika
7692
./Build/Test/bootstrap.sh --skip-solr-install --skip-tika-server-install
77-
echo "Current Size of EXT:tika build Artefacts: " && du -sh $CI_BUILD_DIRECTORY/ext-tika
78-
79-
- name: Build ext-solr docker image
80-
run: |
81-
cd $CI_BUILD_DIRECTORY/ext-tika
82-
docker build -t $LOCAL_IMAGE_NAME -f .Build/Web/typo3conf/ext/solr/Docker/SolrServer/Dockerfile .Build/Web/typo3conf/ext/solr/
83-
84-
- name: 'Start Docker: Solr, Tika, MySQL'
93+
echo "Current Size of EXT:tika build Artefacts: " \
94+
&& sudo du -sh "${{ env.CI_BUILD_DIRECTORY }}"
95+
-
96+
name: CI-Build
8597
run: |
86-
docker run --name "MySQL-CI" -v /ramfs/data-mysql:/var/lib/mysql -p 3306:3306 \
87-
-e MYSQL_DATABASE=$TYPO3_DATABASE_NAME \
88-
-e MYSQL_ROOT_PASSWORD=$TYPO3_DATABASE_PASSWORD \
89-
-d mysql:8.0 mysqld --default-authentication-plugin=mysql_native_password
90-
sudo chmod g+w "$LOCAL_SOLR_VOLUME_PATH"
91-
docker volume create --name "$LOCAL_VOLUME_NAME" --opt type=none --opt device="$LOCAL_SOLR_VOLUME_PATH" --opt o=bind
92-
docker run --rm --name="$LOCAL_CONTAINER_NAME" -d -p 127.0.0.1:8983:8983 -v "$LOCAL_VOLUME_NAME":"/var/solr" "$LOCAL_IMAGE_NAME"
93-
docker run -d -p 9998:9998 apache/tika:$TIKA_VERSION"-full"
94-
docker ps
95-
96-
- name: CI-Build
97-
run: |
98-
cd $CI_BUILD_DIRECTORY/ext-tika
9998
./Build/Test/cibuild.sh
100-
echo "Current Size of EXT:tika build Artefacts: " && du -sh $CI_BUILD_DIRECTORY/ && du -sh $CI_BUILD_DIRECTORY/ext-tika/.Build/*
101-
102-
- name: Upload code coverage to Scrutinizer
99+
echo "Current Size of EXT:tika build Artefacts: " \
100+
&& sudo du -sh $CI_BUILD_DIRECTORY/ \
101+
&& sudo du -sh $CI_BUILD_DIRECTORY/*
102+
-
103+
name: Upload code coverage to Scrutinizer
103104
run: |
104-
cd $CI_BUILD_DIRECTORY/ext-tika
105-
mkdir -p $GITHUB_WORKSPACE/bin
106-
wget https://scrutinizer-ci.com/ocular.phar -O $GITHUB_WORKSPACE/bin/ocular && chmod +x $GITHUB_WORKSPACE/bin/ocular
107-
php $GITHUB_WORKSPACE/bin/ocular code-coverage:upload --format=php-clover coverage.unit.clover
108-
php $GITHUB_WORKSPACE/bin/ocular code-coverage:upload --format=php-clover coverage.integration.clover
105+
ocular code-coverage:upload --format=php-clover coverage.unit.clover
106+
ocular code-coverage:upload --format=php-clover coverage.integration.clover
109107
110108
publish:
111109
name: Publish new version to TER
@@ -116,21 +114,23 @@ jobs:
116114
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
117115

118116
steps:
119-
- name: Checkout repository
117+
-
118+
name: Checkout repository
120119
uses: actions/checkout@v2
121120
with:
122121
ref: ${{ github.event.pull_request.head.sha }}
123-
124-
- name: Check tag
122+
-
123+
name: Check tag
125124
run: |
126125
if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
127126
exit 1
128127
fi
129-
- name: Get version
128+
-
129+
name: Get version
130130
id: get-version
131131
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
132-
133-
- name: Get comment
132+
-
133+
name: Get comment
134134
id: get-comment
135135
run: |
136136
readonly local comment=$(git tag -n99 -l ${{ steps.get-version.outputs.version }} | sed "s/^[0-9.]*[ ]*//g")
@@ -139,17 +139,18 @@ jobs:
139139
else
140140
echo ::set-output name=comment::$comment
141141
fi
142-
- name: Setup PHP
142+
-
143+
name: Setup PHP
143144
uses: shivammathur/setup-php@v2
144145
with:
145146
php-version: 7.4
146147
extensions: intl, mbstring, json, zip, curl
147148
tools: composer:v2
148-
149-
- name: Install tailor
149+
-
150+
name: Install tailor
150151
run: composer global require typo3/tailor --prefer-dist --no-progress
151-
152-
- name: Publish EXT:tika to TER
152+
-
153+
name: Publish EXT:tika to TER
153154
run: php ~/.composer/vendor/bin/tailor ter:publish --comment "${{ steps.get-comment.outputs.comment }}" ${{ steps.get-version.outputs.version }}
154155

155156

.php-cs-fixer.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$config = \TYPO3\CodingStandards\CsFixerConfig::create();
6+
$config->getFinder()
7+
->exclude([
8+
'.Build'
9+
])
10+
->in(__DIR__);
11+
return $config;

.scrutinizer.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ tools:
1212
php_cpd:
1313
enabled: true
1414

15+
# we do this on GitHub-Actions via typo3/coding-standards
1516
php_code_sniffer:
16-
enabled: true
17-
config:
18-
standard: TYPO3CMS
19-
20-
# we do this on travis
17+
enabled: false
18+
# we do this on GitHub-Actions via typo3/coding-standards
2119
php_cs_fixer:
2220
enabled: false
2321

@@ -38,25 +36,25 @@ tools:
3836
timeout: 2400
3937

4038
checks:
41-
php:
42-
excluded_dependencies:
43-
- typo3/cms-install
44-
avoid_superglobals: false
39+
php:
40+
excluded_dependencies:
41+
- typo3/cms-install
42+
avoid_superglobals: false
43+
44+
build_failure_conditions:
45+
- 'patches.label("Doc Comments").count > 10'
46+
- 'patches.label("Spacing").count > 15'
47+
- 'issues.label("coding-style").count > 10'
48+
- 'issues.severity(>= MAJOR).count > 60'
49+
- 'project.metric("scrutinizer.quality", < 8)'
50+
- 'project.metric_change("scrutinizer.test_coverage", < -0.10)'
4551

4652
build:
4753
environment:
4854
# We want to test with the smallest supported by TYPO3 PHP version
49-
php: 7.2
50-
dependencies:
51-
override:
52-
- composer install --dev --no-interaction --no-scripts
55+
php: 7.4
5356
nodes:
5457
analysis:
55-
dependencies:
56-
after:
57-
- composer require --dev squizlabs/php_codesniffer:^3.6
58-
# tests:
59-
# override:
60-
# - php-scrutinizer-run
61-
# - command: phpcs-run
62-
# use_website_config: false
58+
tests:
59+
override:
60+
- php-scrutinizer-run

Build/Release/pre_upload_check.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)