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

Typo3 12 compatibility #9

Merged
merged 11 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/.github/ export-ignore
/Build/ export-ignore
/Resources/Private/Php/ export-ignore
/Tests/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.editorconfig export-ignore
/.crowdin.yml export-ignore
56 changes: 12 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,22 @@
# Adapted from https://github.com/TYPO3GmbH/blog/blob/master/.github/workflows/ci.yml
name: CI
name: Tests

on: [pull_request]
on: pull_request

jobs:
build:
runs-on: ubuntu-latest
CGL:
name: Coding Style Check (TYPO3 Community CGL)

strategy:
fail-fast: false
matrix:
typo3: [^10.4, ^11.5]
php: ['7.4']
include:
- typo3: ^11.5
php: '8.0'
- typo3: ^11.5
php: '8.1'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP ${{ matrix.php }}, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, dom, zip

- name: Validate composer.json and composer.lock
run: composer validate
uses: actions/checkout@v4

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies with typo3/cms-core:${{ matrix.typo3 }}
run: |
composer require typo3/cms-core:${{ matrix.typo3 }} --no-progress
git checkout composer.json

- name: php-cs-fixer
run: composer ci:php:fixer
- name: Composer
run: Build/Scripts/runTests.sh -p 8.1 -s composerUpdate

- name: Lint PHP
run: composer ci:php:lint
run: Build/Scripts/runTests.sh -p 8.1 -s lint

- name: Validate code against CGL
run: Build/Scripts/runTests.sh -p 8.1 -s cgl -n
47 changes: 39 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,48 @@
# Git global ignore file
# for local exclude patterns please edit .git/info/exclude
# Example file see https://github.com/TYPO3-Documentation/T3DocTeam/blob/master/.gitignore
########################
# plesk-widget
# global ignore file
########################

# ignore generated documentation
# Ignore files generated by docs rendering
*GENERATED*
docker-compose.yaml
docker-compose.yml

# ignore typical clutter of IDEs and editors (this could be added in .git/info/exclude,
# but we add it here for convenience)
# Ignore environment files
.env

# Ignore temporary files (left by editors and OS)
*~
*.bak
*.swp
.DS_Store

# Ignore by common IDEs used directories/files
nbproject
*.idea
*.project
*.swp
.project
.buildpath
.settings
.TemporaryItems
.webprj
.fleet

# Temporary files and folders
/.cache
.php_cs.cache
.php-cs-fixer.cache
.sass-cache
.session
*.log

# Ignore composer stuff
bin/*
vendor/*
.build
.php_cs.cache
composer.lock

# Ignore testing stuff
/.Build
/composer.json.orig
/composer.json.testing
28 changes: 28 additions & 0 deletions Build/FunctionalTests.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="true"
bootstrap="FunctionalTestsBootstrap.php"
cacheResult="false"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="false"
failOnWarning="true"
>
<testsuites>
<testsuite name="Functional tests">
<directory>../Tests/Functional/</directory>
</testsuite>
</testsuites>
<php>
<ini name="display_errors" value="1" />
<env name="TYPO3_CONTEXT" value="Testing" />
</php>
</phpunit>
17 changes: 17 additions & 0 deletions Build/FunctionalTestsBootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/*
* This file is part of the package stefanfroemken/plesk-widget.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/

use TYPO3\TestingFramework\Core\Testbase;

call_user_func(function () {
$testbase = new Testbase();
$testbase->defineOriginalRootPath();
$testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/tests');
$testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/transient');
});
Loading
Loading