Skip to content

Commit c2aa0f9

Browse files
authored
Merge pull request hoogi91#298 from hoogi91/develop
Major Release 4.0.0
2 parents 6cb228c + d7fa20b commit c2aa0f9

89 files changed

Lines changed: 11575 additions & 5314 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "typo3-spreadsheets",
3+
"image": "ghcr.io/hoogi91/typo3/php:8.2",
4+
"runArgs": [
5+
"--name",
6+
"typo3-spreadsheets"
7+
],
8+
"features": {
9+
"ghcr.io/devcontainers/features/node:1": {
10+
"version": "18"
11+
}
12+
},
13+
"customizations": {
14+
"vscode": {
15+
"settings": {
16+
"php.executablePath": "/usr/local/bin/php",
17+
"php.executables": {
18+
"8.2": "/usr/local/bin/php"
19+
}
20+
},
21+
"extensions": [
22+
"EditorConfig.EditorConfig",
23+
"xdebug.php-debug",
24+
"bmewburn.vscode-intelephense-client",
25+
"DEVSENSE.phptools-vscode",
26+
"DEVSENSE.composer-php-vscode",
27+
"MehediDracula.php-namespace-resolver",
28+
"benjaminkott.typo3-typoscript",
29+
"kamediendesign.typo3-fluid",
30+
"christian-kohler.npm-intellisense",
31+
"trabpukcip.vscode-npm-scripts"
32+
],
33+
}
34+
},
35+
"postStartCommand": "apache2ctl start",
36+
"postCreateCommand": ".devcontainer/postCreate.sh",
37+
"otherPortsAttributes": {
38+
"onAutoForward": "ignore"
39+
}
40+
}

.devcontainer/postCreate.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
set -x
3+
4+
composer install
5+
.Build/bin/typo3 install:setup -f -n \
6+
--database-driver=pdo_sqlite \
7+
--admin-user-name=admin \
8+
--admin-password=\$Password2 \
9+
--site-name="TYPO3 Devcontainer" \
10+
--site-setup-type=site \
11+
--web-server-config=apache
12+
13+
.Build/bin/typo3 configuration:set SYS/trustedHostsPattern '.*'
14+
.Build/bin/typo3 configuration:set SYS/features/security.backend.enforceReferrer false --json
15+
16+
sudo chmod a+x "$(pwd)"
17+
sudo rm -rf /var/www/html
18+
sudo ln -s "$(pwd)/.Build/web/" /var/www/html

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ ij_formatter_tags_enabled = false
1313
ij_smart_tabs = false
1414
ij_wrap_on_typing = false
1515

16+
[*.txt]
17+
insert_final_newline = false
18+
1619
[*.blade.php]
1720
ij_blade_keep_indents_on_empty_lines = false
1821

.eslintrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ module.exports = {
55
node: true,
66
es6: true
77
},
8-
parser: "babel-eslint",
8+
parser: "@babel/eslint-parser",
99
parserOptions: {
10-
sourceType: "module",
11-
parser: "babel-eslint"
10+
sourceType: "module"
1211
},
1312
extends: [
1413
"eslint:recommended"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Install php and composer dependencies'
2+
description: 'This action sets up PHP and installs deps using composer.'
3+
inputs:
4+
php-version:
5+
required: true
6+
description: 'PHP Version to use'
7+
extensions:
8+
required: false
9+
description: 'PHP extensions to install'
10+
default: ''
11+
dependencies:
12+
required: false
13+
description: 'Instruction which composer dependencies to install - one of "highest", "lowest", defaults to "locked"'
14+
default: 'locked'
15+
runs:
16+
using: 'composite'
17+
steps:
18+
- name: "Install PHP"
19+
uses: "shivammathur/setup-php@v2"
20+
with:
21+
coverage: "pcov"
22+
php-version: "${{ inputs.php-version }}"
23+
ini-values: memory_limit=-1
24+
tools: composer:v2, cs2pr
25+
extensions: "${{ inputs.extensions }}"
26+
27+
- name: "Cache dependencies"
28+
uses: "actions/cache@v2"
29+
with:
30+
path: |
31+
~/.composer/cache
32+
vendor
33+
key: "php-${{ inputs.php-version }}-${{ inputs.dependencies }}"
34+
restore-keys: "php-${{ inputs.php-version }}-${{ inputs.dependencies }}"
35+
36+
- name: "Install lowest dependencies"
37+
if: ${{ inputs.dependencies == 'lowest' }}
38+
shell: bash
39+
run: "composer update --prefer-lowest --no-interaction --no-progress"
40+
41+
- name: "Install highest dependencies"
42+
if: ${{ inputs.dependencies == 'highest' }}
43+
shell: bash
44+
run: "composer update --no-interaction --no-progress"
45+
46+
- name: "Install locked dependencies"
47+
if: ${{ inputs.dependencies == 'locked' }}
48+
shell: bash
49+
run: "composer install --no-interaction --no-progress"

.github/actions/npm/action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Install npm dependencies'
2+
description: 'This action sets up Nodejs and installs deps using npm.'
3+
inputs:
4+
node-version:
5+
required: true
6+
description: 'Node Version to use'
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: "Setup Node.js"
11+
uses: "actions/setup-node@v2"
12+
with:
13+
node-version: "${{ inputs.node-version }}"
14+
15+
- name: "Cache dependencies"
16+
uses: "actions/cache@v2"
17+
with:
18+
path: ~/.npm
19+
key: "npm-${{ inputs.node-version }}-${{ hashFiles('package-lock.json') }}"
20+
restore-keys: "npm-${{ inputs.node-version }}"
21+
22+
- name: "Install dependencies"
23+
shell: bash
24+
run: "npm ci --ignore-scripts"

.github/actions/phpunit/action.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Execute phpunit tests'
2+
description: 'This action executes phpunit tests with support for coverage generation.'
3+
inputs:
4+
coverage:
5+
required: false
6+
description: 'Enable coverage'
7+
default: 'false'
8+
coverage-folder:
9+
required: false
10+
description: 'Folder to save coverage reports into'
11+
default: './coverage/'
12+
whitelist:
13+
required: false
14+
description: 'PHPUnit whitelist'
15+
default: './Classes/'
16+
runs:
17+
using: 'composite'
18+
steps:
19+
- name: Unit tests
20+
if: inputs.coverage == 'false'
21+
shell: bash
22+
run: |
23+
if [ -d "Tests/Unit" ]; then
24+
.Build/bin/phpunit --bootstrap Tests/bootstrap.php Tests/Unit/
25+
fi
26+
27+
- name: Functional tests
28+
if: inputs.coverage == 'false'
29+
shell: bash
30+
run: |
31+
if [ -d "Tests/Functional" ]; then
32+
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Functional test suite {}"; .Build/bin/phpunit --bootstrap .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php {}'
33+
fi
34+
35+
- name: Unit tests with coverage
36+
if: inputs.coverage != 'false'
37+
shell: bash
38+
run: |
39+
if [ -d "Tests/Unit" ]; then
40+
.Build/bin/phpunit --bootstrap Tests/bootstrap.php Tests/Unit/ --coverage-clover=${{ inputs.coverage-folder }}unit/clover.xml --coverage-filter=${{ inputs.whitelist }}
41+
fi
42+
43+
- name: Functional tests with coverage
44+
if: inputs.coverage != 'false'
45+
shell: bash
46+
run: |
47+
if [ -d "Tests/Functional" ]; then
48+
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Functional test suite {}"; .Build//bin/phpunit --bootstrap .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php {} --coverage-clover=${{ inputs.coverage-folder }}functional/{}/clover.xml --coverage-filter=${{ inputs.whitelist }}'
49+
fi

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "composer"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
versioning-strategy: widen
9+
10+
- package-ecosystem: "npm"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"
14+
15+
- package-ecosystem: "github-actions"
16+
# Workflow files stored in the
17+
# default location of `.github/workflows`
18+
directory: "/"
19+
schedule:
20+
interval: "monthly"

.github/workflows/auto-approve.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Dependabot Pull Request Approve and Merge"
2+
3+
on: pull_request_target
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
dependabot:
11+
name: "Dependabot auto-approve"
12+
runs-on: ubuntu-latest
13+
if: ${{ github.actor == 'dependabot[bot]' }}
14+
15+
steps:
16+
- name: Approve Dependabot PRs
17+
run: gh pr review --approve "$PR_URL"
18+
env:
19+
PR_URL: ${{ github.event.pull_request.html_url }}
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Enable auto-merge for Dependabot PRs
23+
run: gh pr merge --auto --merge "$PR_URL"
24+
env:
25+
PR_URL: ${{ github.event.pull_request.html_url }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)