Skip to content

Releases: netresearch/typo3-ci-workflows

v1.1.2

02 Mar 13:31
v1.1.2
70bf601

Choose a tag to compare

Fixes (over v1.1.1)

  • Revert stubFiles to bootstrapFiles with class_exists guard: stubFiles only provides type info — PHPStan's attribute resolver needs the class to actually exist at runtime. Reverted to bootstrapFiles which executes the PHP file, but added a class_exists(::class, false) guard to prevent "Cannot redeclare class" fatal on PHPUnit 12+ where the real class is provided by phpunit/phpunit. This was causing PHPStan failures on PHP 8.2 with TYPO3 ^13.4.21 in CI.

v1.1.1

02 Mar 13:18
v1.1.1
1bdd753

Choose a tag to compare

Superseded by v1.1.2 — v1.1.1 changed bootstrapFiles to stubFiles, but stubFiles doesn't work for attributes (PHPStan needs the class to exist at runtime). v1.1.2 reverts to bootstrapFiles with a class_exists guard.

Fixes (over v1.1.0)

  • Remove paths from shared PHPStan config: PHPStan NEON includes MERGE indexed arrays — having default paths would force all extensions to analyze Classes/, Configuration/, Tests/ even if they define their own (the lists concatenate, not replace). Each extension must define its own paths.
  • Use stubFiles instead of bootstrapFiles: The PHPUnit 12 attribute stub was loaded via bootstrapFiles which executes the PHP file. Reverted in v1.1.2stubFiles doesn't work for attributes.
  • Move phpVersion(80200) inside if ($projectRoot) block: Preserves true v1.0 backward compatibility.
  • Fix Rector docblock: Clarify that paths() REPLACES (not additive like sets()/skip()).

v1.1.0

02 Mar 12:18
v1.1.0
e18a374

Choose a tag to compare

Superseded by v1.1.1 — v1.1.0 had issues: PHPStan paths merged instead of overriding (removed from shared config in v1.1.1), bootstrapFiles caused fatal on PHPUnit 12 (changed to stubFiles), phpVersion(80200) was unconditional (moved inside $projectRoot block). Extensions MUST keep their own paths in phpstan.neon.


Summary

Centralize more configuration into shared configs, reducing extension boilerplate from ~150 lines to ~30 lines.

PHPStan (config/phpstan/phpstan.neon)

  • Standard paths (Classes/, Configuration/, Tests/) — extensions override if they have additional paths Removed in v1.1.1 — paths merge, not override
  • Standard excludePaths (.Build/*, ext_emconf.php)
  • PHPUnit 12 attribute stubs via bootstrapFiles stubFiles (fixed in v1.1.1)
  • Test-infrastructure ignoreErrors (Unit: offsetAccess, argument.type; Functional: cast.int, mixed types)
  • TYPO3 upgrade wizard deprecation ignoreErrors (attribute.deprecated, implementsDeprecatedInterface, classConstant.deprecatedClass)
  • All shared ignoreErrors use reportUnmatched: false for safety across varying extension structures

Rector (config/rector/rector.php)

  • Optional $projectRoot parameter (backward compatible — default '' preserves v1.0 behavior)
  • When provided: auto-configures paths (Classes/, Configuration/, Resources/ if exists, ext_*.php via glob), skip (ext_emconf.php), phpstanConfig, phpVersion
  • Added STRICT_BOOLEANS and UP_TO_PHP_82 to shared sets

PHP-CS-Fixer (config/php-cs-fixer/config.php)

  • New config factory: $createConfig($header, $projectRoot) returns ready-to-use PhpCsFixer\Config
  • Encapsulates standard Finder, rules merge, header_comment, and unsupported PHP version handling
  • Extensions reduce from ~50 lines to ~10 lines

Migration from v1.0

See v1.1.1 release notes for corrected migration guidance.

v1.0.0

02 Mar 08:36
v1.0.0
08cf66c

Choose a tag to compare

Centralized Dev-Dependencies Package

Adds a Composer library package (netresearch/typo3-ci-workflows) providing shared dev-dependencies and configs for Netresearch TYPO3 extensions.

What's included

File Purpose
composer.json 17 shared dev-dependencies (PHPStan, PHP-CS-Fixer, Rector, testing-framework, CaptainHook, etc.)
config/phpstan/phpstan.neon Shared PHPStan parameters (level 10, strict)
config/php-cs-fixer/rules.php Shared ruleset (@symfony + @PER-CS3x0 + @PHP8x2Migration)
config/rector/rector.php Shared Rector base config (code-quality, dead-code, etc.)
config/captainhook/captainhook.json Pre-commit hooks (lint, CGL, PHPStan)
Makefile.include Standard Make targets (quality, test, ci, clean)

Usage

{
    "require-dev": {
        "netresearch/typo3-ci-workflows": "^1.0"
    }
}

Extensions can then reference shared configs and override as needed. See PR #2 for full details.