From 006aa298d753847aa4bef3af94d7179291d72a67 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Thu, 12 Nov 2026 02:06:19 +0100 Subject: [PATCH 1/3] [TASK] Remove unmaintained GitLab CI configuration The tests run via GitHub Actions, the GitLab CI configuration is not maintained any more. Remove its export-ignore entry from .gitattributes as well. Co-Authored-By: Claude Opus 5.5 --- .gitattributes | 1 - .gitlab-ci.yml | 154 ------------------------------------------------- 2 files changed, 155 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitattributes b/.gitattributes index 3027163b..ae080b9a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,7 +3,6 @@ /Tests/ export-ignore /.editorconfig export-ignore /.gitattributes export-ignore -/.gitlab-ci.yml export-ignore /codeception.dist.yml export-ignore /crowdin.yml export-ignore /rector.php export-ignore diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index e4864d52..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,154 +0,0 @@ -cache: - key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME" - paths: - - .composer/ - - .php_cs.cache - -variables: - TYPO3_VERSION: ^13.4 - -before_script: - - apk add git --update - -stages: - - lint - - test - - documentation - -lint:cgl: - image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main - stage: lint - before_script: - - composer remove typo3/cms-* --no-update - - composer install --no-progress --no-ansi --no-interaction - script: - - vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./ - - vendor/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration - -lint:yaml: - stage: lint - image: python:alpine3.7 - before_script: - - pip install yamllint==1.10.0 - script: - - yamllint -c Build/yamllint.yaml Configuration/ Resources/ - -.lint_php: &lint_php - stage: lint - image: $CONTAINER_IMAGE - script: - - find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l - -lint:php82: - <<: *lint_php - variables: - CONTAINER_IMAGE: php:8.2-alpine - -lint:php83: - <<: *lint_php - variables: - CONTAINER_IMAGE: php:8.3-alpine - -lint:php84: - <<: *lint_php - variables: - CONTAINER_IMAGE: php:8.4-alpine - -phpstan:analyse: - image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main - stage: lint - before_script: - - sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json - - composer config platform.php 8.2 - - composer install --no-progress --no-ansi --no-interaction - script: - - vendor/bin/codecept build - - vendor/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M - -.test_php: &test_php - stage: test - services: - - mysql:5 - image: $CONTAINER_IMAGE - only: - - branches - before_script: - - composer config --no-plugins allow-plugins.typo3/cms-composer-installers true - - composer config --no-plugins allow-plugins.typo3/class-alias-loader true - - composer require typo3/cms-core="${TYPO3_VERSION}" - script: - - vendor/bin/phpunit -c Build/UnitTests.xml - - typo3DatabaseDriver=pdo_sqlite vendor/bin/phpunit -d memory_limit=256M -c Build/FunctionalTests.xml - -test:php82: - <<: *test_php - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.2:main - -test:php83: - <<: *test_php - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.3:main - -test:php84: - <<: *test_php - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.4:main - -.test_codeception: &test_codeception - stage: test - image: $CONTAINER_IMAGE - only: - - branches - before_script: - - sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json - - composer config --no-plugins allow-plugins.typo3/cms-composer-installers true - - composer config --no-plugins allow-plugins.typo3/class-alias-loader true - - composer require typo3/cms-core="${TYPO3_VERSION}" - script: - - mkdir -p .build/public/typo3temp/var/tests/acceptance-sqlite-dbs - - export typo3DatabaseDriver=pdo_sqlite - - export PROJECT_ROOT="$(pwd)" - - export INSTANCE_PATH="$(pwd)/.build/web/typo3temp/var/tests/acceptance" - - mkdir -p "$INSTANCE_PATH" - - mkdir -p "$PROJECT_ROOT/.build/web/typo3temp/var/tests/acceptance-logs/" - - vendor/bin/codecept run - artifacts: - paths: - - .build - expire_in: 1 day - when: always - -codeception:php82: - <<: *test_codeception - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.2:main - -codeception:php83: - <<: *test_codeception - needs: - - codeception:php82 - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.3:main - -codeception:php84: - <<: *test_codeception - needs: - - codeception:php83 - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.4:main - -documentation: - stage: documentation - image: - name: ghcr.io/typo3-documentation/render-guides:latest - entrypoint: [ "" ] - script: - - mkdir -p Documentation-GENERATED-temp - - /opt/guides/entrypoint.sh --config=Documentation --no-progress --fail-on-log - before_script: [] - artifacts: - paths: - - Documentation-GENERATED-temp/ - expire_in: 1 day - when: always From 165fe1b6e1f27fa7aaebcbf61848b00b0b850d19 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Thu, 12 Nov 2026 02:15:50 +0100 Subject: [PATCH 2/3] [TASK] Add missing export-ignore entries to .gitattributes Exclude all files that are only needed for development from the distribution archive, so they do not end up in the vendor directory of projects installing the extension. Co-Authored-By: Claude Opus 5.5 --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index ae080b9a..71f27a5f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,7 @@ /Tests/ export-ignore /.editorconfig export-ignore /.gitattributes export-ignore +/.gitignore export-ignore /codeception.dist.yml export-ignore /crowdin.yml export-ignore /rector.php export-ignore From 9b1a359c4801a4fa5d25796016486a60260d7152 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Thu, 12 Nov 2026 01:58:13 +0100 Subject: [PATCH 3/3] [TASK] Use same build directory for all cart extensions Move the vendor, bin and web directory to .Build/vendor, .Build/bin and .Build/public, as done by the TYPO3BestPractices/tea extension and most of the widely used TYPO3 extensions. All references in composer.json, CI configuration, test configuration, scripts and shell.nix are adjusted accordingly. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yaml | 2 +- .gitignore | 3 +-- Build/phpunit.xml.dist | 2 +- codeception.dist.yml | 6 +++--- composer.json | 24 ++++++++++++------------ shell.nix | 16 ++++++++-------- 6 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c0eb173d..f82fad75 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,7 +90,7 @@ jobs: && composer install --no-progress --no-ansi --no-interaction - name: Build codeception tester - run: .build/bin/codecept build + run: .Build/bin/codecept build - name: Code Quality (by PHPStan) run: composer project:phpstan diff --git a/.gitignore b/.gitignore index f312b22f..4d12c2a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.build +.Build composer.lock .php-cs-fixer.cache @@ -9,6 +9,5 @@ Build/.phpunit.cache .idea var/ -vendor/ coverage_result/ diff --git a/Build/phpunit.xml.dist b/Build/phpunit.xml.dist index 635a118a..e7159b54 100644 --- a/Build/phpunit.xml.dist +++ b/Build/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/codeception.dist.yml b/codeception.dist.yml index 2e7c30cd..1cdc7a98 100644 --- a/codeception.dist.yml +++ b/codeception.dist.yml @@ -3,7 +3,7 @@ namespace: 'Extcode\CartEvents\Tests\Acceptance\Support' paths: tests: 'Tests/Acceptance' data: 'Tests/Acceptance/Data' - output: '.build/public/typo3temp/var/tests/acceptance-reports' + output: '.Build/public/typo3temp/var/tests/acceptance-reports' support: 'Tests/Acceptance/Support' settings: @@ -13,8 +13,8 @@ extensions: enabled: - 'Codeception\Extension\RunProcess': - - 'geckodriver > .build/public/typo3temp/var/tests/acceptance-logs/geckodriver.log 2>&1' - - 'TYPO3_PATH_APP="$INSTANCE_PATH" TYPO3_PATH_ROOT="$INSTANCE_PATH" php -S 127.0.0.1:8080 -t "$INSTANCE_PATH" > .build/public/typo3temp/var/tests/acceptance-logs/php.log 2>&1' + - 'geckodriver > .Build/public/typo3temp/var/tests/acceptance-logs/geckodriver.log 2>&1' + - 'TYPO3_PATH_APP="$INSTANCE_PATH" TYPO3_PATH_ROOT="$INSTANCE_PATH" php -S 127.0.0.1:8080 -t "$INSTANCE_PATH" > .Build/public/typo3temp/var/tests/acceptance-logs/php.log 2>&1' - 'Codeception\Extension\Recorder' - diff --git a/composer.json b/composer.json index bcb95034..e8336761 100644 --- a/composer.json +++ b/composer.json @@ -33,8 +33,8 @@ } }, "config": { - "bin-dir": ".build/bin", - "vendor-dir": ".build/vendor", + "bin-dir": ".Build/bin", + "vendor-dir": ".Build/vendor", "allow-plugins": { "typo3/cms-composer-installers": true, "typo3/class-alias-loader": true, @@ -46,7 +46,7 @@ "extra": { "typo3/cms": { "extension-key": "cart_events", - "web-dir": ".build/public" + "web-dir": ".Build/public" } }, "require": { @@ -78,35 +78,35 @@ }, "scripts": { "project:reinstall": [ - "rm -rf .build/ composer.lock", + "rm -rf .Build/ composer.lock", "composer update --prefer-dist --no-progress --working-dir=\"$PROJECT_ROOT\"" ], "project:cgl": [ - ".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no --dry-run --diff" + ".Build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no --dry-run --diff" ], "project:cgl-fix": [ - ".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no" + ".Build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no" ], "project:lint:php": [ "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l" ], "project:phpstan": [ - ".build/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M" + ".Build/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M" ], "project:test:unit": [ - ".build/bin/phpunit -c Build/phpunit.xml.dist --testsuite unit --display-warnings --display-deprecations --display-errors" + ".Build/bin/phpunit -c Build/phpunit.xml.dist --testsuite unit --display-warnings --display-deprecations --display-errors" ], "project:test:functional": [ - ".build/bin/phpunit -c Build/phpunit.xml.dist --testsuite functional --display-warnings --display-deprecations --display-errors" + ".Build/bin/phpunit -c Build/phpunit.xml.dist --testsuite functional --display-warnings --display-deprecations --display-errors" ], "test:rector:process": [ - "vendor/bin/rector process" + ".Build/bin/rector process" ], "test:rector:process:dry-run": [ - "vendor/bin/rector process --dry-run" + ".Build/bin/rector process --dry-run" ], "test:typoscript:lint": [ - "vendor/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration" + ".Build/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration" ], "test:php": [ "@test:php:lint", diff --git a/shell.nix b/shell.nix index b12dea01..5780c4c8 100644 --- a/shell.nix +++ b/shell.nix @@ -28,7 +28,7 @@ let php ]; text = '' - rm -rf .build/ composer.lock, + rm -rf .Build/ composer.lock, composer update --prefer-dist --no-progress ''; }; @@ -119,7 +119,7 @@ let ]; text = '' project-install - XDEBUG_MODE=coverage .build/bin/phpunit -c Build/phpunit.xml.dist --coverage-html=coverage_result + XDEBUG_MODE=coverage .Build/bin/phpunit -c Build/phpunit.xml.dist --coverage-html=coverage_result ''; }; @@ -136,14 +136,14 @@ let text = '' project-install - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance" - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance-logs" - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance-reports" - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance-sqlite-dbs" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance-logs" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance-reports" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance-sqlite-dbs" - export INSTANCE_PATH="$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance" + export INSTANCE_PATH="$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance" - .build/bin/codecept run + .Build/bin/codecept run pgrep -f "php -S" | xargs -r kill pgrep -f "geckodriver" | xargs -r kill