Releases: netresearch/typo3-ci-workflows
v1.1.2
Fixes (over v1.1.1)
- Revert
stubFilestobootstrapFileswithclass_existsguard:stubFilesonly provides type info — PHPStan's attribute resolver needs the class to actually exist at runtime. Reverted tobootstrapFileswhich executes the PHP file, but added aclass_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
Superseded by v1.1.2 — v1.1.1 changed
bootstrapFilestostubFiles, butstubFilesdoesn't work for attributes (PHPStan needs the class to exist at runtime). v1.1.2 reverts tobootstrapFileswith aclass_existsguard.
Fixes (over v1.1.0)
- Remove
pathsfrom 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 ownpaths. - Use
stubFilesinstead ofbootstrapFiles:The PHPUnit 12 attribute stub was loaded viaReverted in v1.1.2 —bootstrapFileswhich executes the PHP file.stubFilesdoesn't work for attributes. - Move
phpVersion(80200)insideif ($projectRoot)block: Preserves true v1.0 backward compatibility. - Fix Rector docblock: Clarify that
paths()REPLACES (not additive likesets()/skip()).
v1.1.0
Superseded by v1.1.1 — v1.1.0 had issues: PHPStan paths merged instead of overriding (removed from shared config in v1.1.1),
bootstrapFilescaused fatal on PHPUnit 12 (changed tostubFiles),phpVersion(80200)was unconditional (moved inside$projectRootblock). Extensions MUST keep their ownpathsin phpstan.neon.
Summary
Centralize more configuration into shared configs, reducing extension boilerplate from ~150 lines to ~30 lines.
PHPStan (config/phpstan/phpstan.neon)
StandardRemoved in v1.1.1 — paths merge, not overridepaths(Classes/, Configuration/, Tests/) — extensions override if they have additional paths- Standard
excludePaths(.Build/*, ext_emconf.php) - PHPUnit 12 attribute stubs via
bootstrapFilesstubFiles(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: falsefor safety across varying extension structures
Rector (config/rector/rector.php)
- Optional
$projectRootparameter (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_BOOLEANSandUP_TO_PHP_82to shared sets
PHP-CS-Fixer (config/php-cs-fixer/config.php)
- New config factory:
$createConfig($header, $projectRoot)returns ready-to-usePhpCsFixer\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
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.