Download the PHP package nowo-tech/php-quality-tools without Composer

On this page you can find all versions of the php package nowo-tech/php-quality-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-quality-tools

PHP Quality Tools

CI Packagist Version Packagist Downloads

⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.

Pre-configured quality tools for PHP projects. Includes ready-to-use configurations for:

Plus opt-in CI gates (since 1.2.0): vendor/bin/check-coverage-threshold, vendor/bin/check-module-boundaries and a PHPUnit QueryBudgetTrait (SQL query budgets / N+1 scaling checks), and a deploy guard (since 1.3.0): vendor/bin/assert-latest-tag (only the highest semver tag deploys), and ParaTest isolation helpers (since 1.5.0): the pid_path Symfony env var processor and vendor/bin/clean-stale-pid-paths, and front-end / docs gates (since 1.6.0): vendor/bin/check-no-inline-svg, vendor/bin/check-asset-budgets (Vite), vendor/bin/check-doc-links and a php-worker-reset Makefile snippet, and quiet-run helpers (since 1.8.0): vendor/bin/quiet-run (full output in a log, a short summary on screen), vendor/bin/junit-failures and vendor/bin/changed-tests.

This bundle is FrankenPHP worker mode friendly.

Features

Installation

Automatic Dependency Installation

During installation, the plugin will:

  1. ✅ Detect your framework automatically
  2. ✅ Install configuration files for your framework
  3. ✅ Check for template engine dependencies (e.g., Twig for Twig-CS-Fixer)
  4. ✅ Install template formatter configs only if dependencies are present
  5. ✅ Check for suggested dependencies (Rector, PHP-CS-Fixer, etc.)
  6. ✅ Ask if you want to install them (in interactive mode)

Example output:

Note: If Twig is not installed, you'll see:

Then you may see:

Note: The optional packages (rector-symfony, rector-doctrine, rector-phpunit) are only suggested when Rector 1.x is installed. Rector 2.x bundles the Symfony, Doctrine and PHPUnit rule sets, so they are skipped when Rector 2.x is installed and when Rector is not installed yet (a fresh composer require rector/rector gets 2.x).

If you choose yes, dependencies will be installed automatically. If no, you can install them manually later.

Manual Installation

If you prefer to install dependencies manually or in non-interactive mode:

Note: The plugin automatically detects your Rector version:

After installation, the following files are created in your project root:

File Purpose Overwritten on update?
.rector.php Rector main config ❌ Never
.rector.custom.php Your customizations ❌ Never
.php-cs-fixer.php PHP-CS-Fixer main config ❌ Never
.php-cs-fixer.custom.php Your customizations ❌ Never
.twig-cs-fixer.php Twig-CS-Fixer main config (if twig/twig installed) ❌ Never
.twig-cs-fixer.custom.php Your customizations (if twig/twig installed) ❌ Never

Template Engine Support:

Quick Start

Rector

PHP-CS-Fixer

Template Formatters

Twig-CS-Fixer (All frameworks with Twig)

Note: Twig-CS-Fixer configuration is automatically installed if twig/twig is detected in your project dependencies, regardless of framework.

Supported frameworks: Symfony (default), Laravel (optional), Yii (optional), CakePHP (optional), Laminas (optional), Slim (optional), Generic

Blade Templates (Laravel)

Laravel Blade templates (.blade.php files) are PHP files with special syntax and can be formatted using PHP-CS-Fixer. The Laravel configuration includes .blade.php files automatically.

Note: Some Blade-specific directives (like @if, @foreach, etc.) may need manual review after formatting, as PHP-CS-Fixer treats them as PHP code.

Automatic Framework Detection

The package automatically detects your framework and installs the appropriate configuration:

Framework Detection Rector PHP-CS-Fixer Template Engine Template Formatter
Symfony symfony/framework-bundle ✅ Symfony-specific ✅ Twig (default) ✅ Twig-CS-Fixer (if twig/twig installed)
Laravel laravel/framework ✅ Laravel-specific ✅ (includes Blade) Blade (default), Twig (optional) ✅ PHP-CS-Fixer for Blade
Yii yiisoft/yii2 ✅ Generic ✅ PHP native views, Twig (optional) ✅ Twig-CS-Fixer (if twig/twig installed)
CakePHP cakephp/cakephp ✅ Generic ✅ PHP native (.ctp files), Twig (optional) ✅ Twig-CS-Fixer (if twig/twig installed)
Laminas laminas/laminas-mvc ✅ Generic ✅ PHP native, Twig (optional), Smarty (optional) ✅ Twig-CS-Fixer (if twig/twig installed)
CodeIgniter codeigniter4/framework ✅ Generic ✅ PHP native views ❌ No formatter available
Slim slim/slim ✅ Generic ✅ PHP native, Twig (optional) ✅ Twig-CS-Fixer (if twig/twig installed)
Other - ✅ Generic ✅ Varies (Twig, PHP native, etc.) ✅ Twig-CS-Fixer (if twig/twig installed)

Note: Template formatter configurations are only installed if the corresponding template engine is detected in your dependencies. For example, Twig-CS-Fixer config is only installed if twig/twig is present in your composer.json.

Compatibility

Version PHP Symfony Laravel Composer
1.0.x (1.0.0 – 1.0.13) >= 8.1 6.0 - 8.1 9.0 - 11.0 >= 2.0

PHP Versions

Symfony Versions

Laravel Versions

Composer Scripts

Opt-in installation: By default, the plugin does not modify your composer.json. To have quality scripts added automatically (only missing keys; existing scripts are never overwritten), enable:

Then run composer update nowo-tech/php-quality-tools or composer install. You will see a confirmation when scripts are added.

The following scripts can be added (if they don't already exist):

All frameworks:

If Twig is installed:

Laravel only:

Note: Existing scripts in your composer.json are never overwritten. The plugin only adds missing scripts when auto_add_scripts is true.

Note: The plugin preserves your composer.json formatting (2 spaces, 4 spaces, or tabs) when adding scripts. Your original indentation style is maintained.

Note: The plugin preserves the original order of your existing scripts. New scripts are added at the beginning of the scripts section, so your preferred organization is maintained.

Manual Scripts (Optional)

If you prefer different script names or commands, you can manually add them to your composer.json:

Using the Scripts

After enabling auto_add_scripts (or adding scripts manually), you can run:

Note: Enable auto_add_scripts or add scripts manually (see sections above). If you rely on the plugin defaults, set extra.php-quality-tools.auto_add_scripts to true.

Gate Scripts and Query Budgets

Opt-in tools for CI; the Composer plugin does not call them.

See Quiet runs and focused test runs for the options, exit codes and make quiet / make test-changed recipes.

Customization

All customizations go in the *.custom.php files. These files are never overwritten.

Rector Customization

Edit .rector.custom.php:

PHP-CS-Fixer Customization

Edit .php-cs-fixer.custom.php:

Project Custom Fixers:

You can add your own project-specific custom fixers by adding them to the project_custom_fixers array:

Your project custom fixers will be automatically registered alongside PHP Quality Tools fixers. This allows you to extend functionality with project-specific code style rules.

Twig-CS-Fixer Customization

Edit .twig-cs-fixer.custom.php:

Required Dependencies

This package provides configurations and can automatically install the required tools during installation.

Automatic Installation (Recommended)

The plugin will detect missing dependencies and offer to install them automatically. Just answer yes when prompted.

Manual Installation

If you prefer to install manually or the automatic installation didn't work:

Symfony Projects

Laravel Projects

Generic PHP Projects

Makefile Integration

Add to your Makefile:

CI Integration

GitHub Actions

Updating

When you update this package:

Important: Existing files are never overwritten. The plugin only copies a template when the target file is absent. To replace a main config with a fresh template from the package, remove that file and run composer install or composer update:

For detailed upgrade instructions, breaking changes, and version-specific notes, see the UPGRADE Guide.

Template Engines by Framework

Each framework uses different template engines. Here's a complete overview:

Supported Template Formatters

Framework Default Template Engine Optional Engines Formatter Available
Symfony Twig - ✅ Twig-CS-Fixer
Laravel Blade Twig (via twigbridge) ✅ PHP-CS-Fixer (Blade), Twig-CS-Fixer (if Twig installed)
Yii PHP native views Twig ✅ Twig-CS-Fixer (if Twig installed)
CakePHP PHP native (.ctp) Twig ✅ Twig-CS-Fixer (if Twig installed)
Laminas PHP native Twig, Smarty ✅ Twig-CS-Fixer (if Twig installed)
CodeIgniter PHP native views - ❌ No formatter (PHP-CS-Fixer can format PHP code)
Slim PHP native Twig ✅ Twig-CS-Fixer (if Twig installed)

Template Engines Without Dedicated Formatters

The following template engines are used but don't have dedicated formatters yet:

Note: PHP native template files can be formatted using PHP-CS-Fixer, but template-specific directives and syntax may require manual review.

Future Template Formatter Support

The following template formatters are planned for future releases:

Contributing: If you know of formatters for these template engines or would like to contribute support, please open an issue or pull request on GitHub.

Custom Rules

PHP Quality Tools includes several custom rules for both Rector and PHP-CS-Fixer to improve code quality and formatting.

Included Custom Rules

Rector Rules:

PHP-CS-Fixer Fixers:

See docs/CUSTOM_RULES.md for details on how to use these rules and create your own.

Note: Custom Rector rules require an additional dependency: symplify/rule-doc-generator-contracts. Install it with:

If you use the custom rules without this dependency, you'll see an informative message indicating what's missing.

Upgrade Guide

For upgrade instructions, breaking changes, and troubleshooting, see docs/UPGRADING.md.

Development

Using Docker (Recommended)

Without Docker

Documentation

Tests and coverage

Justified exclusions (REQ-TEST-003): the @codeCoverageIgnore blocks in src/ only wrap branches the test environment cannot reach — filesystem / file_get_contents failures in the Composer plugin (Plugin), defensive returns in Rector / PHP-CS-Fixer rules for AST shapes the engines never hand over, and config value objects' fallbacks for invalid YAML already rejected upstream. New markers need the same justification in review.

License

The MIT License (MIT). Please see LICENSE for more information.

Contributing

Please see docs/CONTRIBUTING.md for details.

For branching strategy, see docs/BRANCHING.md.

Changelog

Please see docs/CHANGELOG.md for version history and compatibility information.

Author

Created by Héctor Franco Aceituno at Nowo.tech


All versions of php-quality-tools with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2 <8.6
composer-plugin-api Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nowo-tech/php-quality-tools contains the following files

Loading the files please wait ...