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

0.1.0 2025-12-18 17:51 UTC

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 /packages directory 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 (--config option)
  • Flexible Target Specification: Specify custom paths for analysis (--path option)
  • Comprehensive Error Handling: Proper exit codes and detailed error messages

Advanced Features

  • Optimization Diagnostics: View project analysis and optimization decisions with --show-optimization flag
  • Manual Override Options: Disable optimization with --no-optimization for 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