Download the PHP package fernleafsystems/qa without Composer

On this page you can find all versions of the php package fernleafsystems/qa. 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 qa

FernleafSystems QA

Shared PHP code quality configuration for all FernleafSystems projects. One package gives you consistent code style, static analysis, and pre-commit hooks across all your repositories.

Installation

Quick Start

Step 1: Run the setup wizard to generate configuration files:

Step 2: Install the git hooks:

Both steps are required. The wizard generates config files including captainhook.json. The composer install reads that file and installs the actual git hooks.

The wizard will ask you:

What Gets Generated

File Purpose
.php-cs-fixer.php Code style rules (non-WordPress projects)
.phpcs.xml.dist WordPress Coding Standards (WordPress projects)
rector.php Automated refactoring rules
phpstan.neon Static analysis configuration
captainhook.json Pre-commit hook configuration
.gitattributes Line endings, diff settings, export-ignore rules

Running the Tools

After setup, run the tools directly via vendor/bin/:

Optional: Add Composer Scripts

For convenience, add these to your project's composer.json:

Then run: composer cs, composer rector, etc.

Pre-Commit Hooks

Important: Git hooks require TWO steps to install:

  1. Run vendor/bin/qa-setup - this generates captainhook.json
  2. Run composer install - this triggers CaptainHook to install the git hooks

Without both steps, hooks will NOT be installed.

Once installed, on every commit:

  1. Rector runs on staged PHP files (with parallel mode disabled)
  2. PHP CS Fixer runs on staged PHP files
  3. If files were modified, the commit is blocked with a message to re-stage

This ensures all committed code meets quality standards.

Manual Usage (Without Setup Wizard)

If you prefer to create configs manually, here's a minimal .php-cs-fixer.php:

Available rulesets: Php83, Php84, Php85

Customizing Rules

Adding Custom CS Fixer Rules

Excluding Paths

Edit the generated config files directly. For example, in rector.php:

Adjusting PHPStan Level

Edit phpstan.neon:

CI Integration

Example GitHub Actions workflow:

Supported PHP Versions

Requires PHP 8.3+

Coding Standards

This package enforces FernleafSystems coding standards:

Troubleshooting

Git hooks not running

You must complete BOTH steps:

  1. vendor/bin/qa-setup - generates captainhook.json
  2. composer install - installs the git hooks

Check that captainhook.json exists in your project root. If not, run vendor/bin/qa-setup.

Pre-commit hook blocks my commit

The hook detected that Rector or CS Fixer modified your files. Run:

Tools not found after install

Run composer install again to trigger the CaptainHook installer.

Skip pre-commit hooks (emergency only)


All versions of qa with dependencies

PHP Build Version
Package Version
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 fernleafsystems/qa contains the following files

Loading the files please wait ...