cpsit / quality-tools
A collection of tools for quality assurance in TYPO3 projects.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/cpsit/quality-tools
Requires
- a9f/typo3-fractor: ~0.5.1
- armin/editorconfig-cli: ^2.0
- ergebnis/composer-normalize: ^2.45
- helmich/typo3-typoscript-lint: ^3.3
- phpstan/phpstan: ^2.1
- phpunit/php-code-coverage: ^11.0
- ssch/typo3-rector: ^3.5
- symfony/console: ^6.0 || ^7.0
- symfony/process: ^6.0 || ^7.0
- typo3/coding-standards: ^0.8.0
Requires (Dev)
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2025-12-19 13:51:55 UTC
README
A complete command-line interface for TYPO3 quality assurance tools. This package provides both preconfigured tool access via direct commands and a unified CLI with simple shortcuts for common quality assurance tasks.
Status: MVP Complete with Dynamic Optimization
Version: 1.0.0-dev Test Coverage: 97.9% (283 tests, 810 assertions) All 10 tool commands fully implemented and tested Dynamic Resource Optimization: ACTIVE - Automatic memory and performance optimization for all tools
Installation
composer require --dev cpsit/quality-tools
Included Quality Tools
| Tool | Description |
|---|---|
| a9f/typo3-fractor | TYPO3-specific code modernization and refactoring tool |
| armin/editorconfig-cli | Command line tool for EditorConfig validation |
| ergebnis/composer-normalize | Composer plugin to normalize composer.json files |
| helmich/typo3-typoscript-lint | Linter for TYPO3 TypoScript files |
| phpstan/phpstan | Static analysis tool for PHP |
| phpunit/php-code-coverage | Code coverage information for PHP |
| ssch/typo3-rector | TYPO3-specific automated code upgrades and refactoring |
| typo3/coding-standards | TYPO3 coding standards and code style tools |
Quick Start
CLI Commands (Recommended)
After installation, use the simple qt command shortcuts with automatic optimization:
# Lint commands (analysis only) vendor/bin/qt lint:rector # Rector dry-run analysis vendor/bin/qt lint:phpstan # PHPStan static analysis vendor/bin/qt lint:php-cs-fixer # PHP CS Fixer analysis vendor/bin/qt lint:fractor # Fractor TypoScript analysis vendor/bin/qt lint:typoscript # TypoScript Lint validation vendor/bin/qt lint:composer # Composer.json validation # Fix commands (apply changes) vendor/bin/qt fix:rector # Apply Rector fixes vendor/bin/qt fix:php-cs-fixer # Apply PHP CS Fixer fixes vendor/bin/qt fix:fractor # Apply Fractor fixes vendor/bin/qt fix:composer # Normalize composer.json # All commands support --help for options vendor/bin/qt lint:phpstan --help
Automatic Optimization in Action
Every command automatically optimizes for your project size:
$ vendor/bin/qt lint:phpstan Project Analysis: Analyzing TYPO3 project structure... Project Analysis: Found 1,001 files (174 PHP files) in /packages Optimization: Setting PHPStan memory limit to 552M for medium project Optimization: Enabling parallel processing for improved performance [PHPStan output follows...]
Direct Tool Access (Alternative)
You can also run tools directly with full configuration paths:
# Rector example app/vendor/bin/rector -c app/vendor/cpsit/quality-tools/config/rector.php --dry-run # PHPStan example app/vendor/bin/phpstan analyse -c app/vendor/cpsit/quality-tools/config/phpstan.neon
All Available Commands
Lint Commands (Analysis Only)
| Command | Tool | Description |
|---|---|---|
qt lint:rector |
Rector | Analyze code for modernization opportunities |
qt lint:phpstan |
PHPStan | Static analysis with configurable levels (--level, --memory-limit) |
qt lint:php-cs-fixer |
PHP CS Fixer | Check coding standards compliance |
qt lint:fractor |
Fractor | Analyze TypoScript for modernization |
qt lint:typoscript |
TypoScript Lint | Validate TypoScript syntax and structure |
qt lint:composer |
Composer | Validate composer.json structure |
Fix Commands (Apply Changes)
| Command | Tool | Description |
|---|---|---|
qt fix:rector |
Rector | Apply automated code modernization |
qt fix:php-cs-fixer |
PHP CS Fixer | Fix coding standards violations |
qt fix:fractor |
Fractor | Apply TypoScript modernization |
qt fix:composer |
Composer | Normalize composer.json formatting |
Key Features
Dynamic Resource Optimization (Zero Configuration)
- Automatic Project Analysis: Analyzes your project size, complexity, and file types to determine optimal settings
- Smart Memory Management: Dynamically calculates memory limits (552M for PHPStan, 460M for PHP CS Fixer, 690M for Rector)
- Performance Optimization: 50%+ performance improvement through automatic parallel processing and caching
- Smart Path Scoping: Defaults to
/packagesdirectory for TYPO3 projects (analyzing 1,001 files vs 48K+ files) - Zero Configuration: All optimization happens automatically without user input or configuration files
Project Integration
- Automatic TYPO3 Project Detection: Traverses up to 10 directory levels to find your TYPO3 project root
- Configuration Path Resolution: Automatically locates preconfigured tool configurations with custom override support (
--configoption) - Flexible Target Specification: Specify custom paths for analysis (
--pathoption) - Comprehensive Error Handling: Proper exit codes and detailed error messages
Advanced Features
- Optimization Diagnostics: View project analysis and optimization decisions with
--show-optimizationflag - Manual Override Options: Disable optimization with
--no-optimizationfor edge cases - Extensive Testing: 97.9% line coverage with 283 tests and 810 assertions
- Performance Monitoring: Built-in metrics show optimization effectiveness
Optimization Examples
Small Project (< 100 files):
Project Analysis: Found 45 files (12 PHP files) in /packages
Optimization: Setting PHPStan memory limit to 256M for small project
Optimization: Standard processing mode selected
Large Project (1000+ files):
Project Analysis: Found 2,847 files (423 PHP files) in /packages
Optimization: Setting Rector memory limit to 1200M for large project
Optimization: Enabling parallel processing and caching for performance
Override Options for Advanced Users:
# Disable automatic optimization vendor/bin/qt lint:phpstan --no-optimization # View optimization decisions vendor/bin/qt lint:phpstan --show-optimization # Manual memory limit (overrides automatic calculation) vendor/bin/qt lint:phpstan --memory-limit=1024M
Table of Contents
User Guide
- User Guide - Complete guide for installing and using the CLI tool
- Project Planning - Complete planning documentation and known issues
Tool Configuration
- Dynamic Resource Optimization - How automatic optimization works
- Fractor - TYPO3 Fractor configuration and usage
- PHP CS Fixer - PHP coding standards fixer configuration
- PHPStan - Static analysis tool configuration
- Rector - TYPO3 Rector configuration and usage
- TypoScript Lint - TypoScript linting configuration