Download the PHP package phpcsstandards/phpcsdevtools without Composer

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

PHPCSDevTools for developers of PHP_CodeSniffer sniffs

This is a set of tools to assist developers of sniffs for PHP CodeSniffer.

Installation

Composer Project-based Installation

Run the following from the root of your project:

Composer Global Installation

If you work on several different sniff repos, you may want to install this toolset globally:

Composer will automatically install dependencies and register the PHPCSDebug standard with PHP_CodeSniffer using the Composer PHPCS plugin.

Stand-alone Installation

Features

Checking whether all sniffs in a PHPCS standard are feature complete

You can now check whether each and every sniff in your standard is accompanied by a documentation XML file (warning) as well as unit test files (error). The tool will also verify that there are no documentation or test files in your standard which are not associated with a sniff ("orphaned" files).

To use the tool, run it from the root of your standards repo like so:

If all is good, you will see the following messages:

If there are files missing, you will see errors/warnings for each missing file, like so:

If orphaned files are found you will receive a warning for each orphaned file found, like so:

For the fastest results, it is recommended to pass the name of the subdirectory where your standard is located to the script, like so:

Options

Sniff Debugging

Once this project is installed, you will see a new PHPCSDebug ruleset in the list of installed standards when you run phpcs -i.

For now, this standard only contains one sniff: PHPCSDebug.Debug.TokenList. This sniff will display compact, but detailed information about the tokens found in a (test case) file.

This sniff is compatible with PHPCS 3.1.0+.

Typical usage:

The output will look something along the lines of:

PHPCS itself can also display similar information using the -vv or -vvv verbosity flags, however, when using those, you will receive a lot more information than just the token list and, while useful for debugging PHPCS itself, the additional information is mostly just noise when developing a sniff.

Documentation XSD Validation

This project contains an XML Schema Definition (XSD) to allow for validation PHPCS documentation XML files. Following the XSD will make sure your documentation can be correctly displayed when using the PHPCS --generator option.

In order to use it, you'll need to add the schema related attributes to the documentation element of the sniff documentation file, like so:

If your IDE or editor supports automatic validation of XML files, you will be notified if your documentation XML file has the correct number of elements, correct type and number of certain attributes, and title length among other things.

Validating your docs against the XSD

You can validate your PHPCS XML documentation against the XSD file using xmllint. This validation can be run locally if you have xmllint installed, as well as in CI (continuous integration).

An example of a workflow job for GitHub Actions CI looks like this:

:point_right: You'll need to replace the YourRuleset within the command with the name of your ruleset (of course).

Contributing

Contributions to this project are welcome. Clone this repository, branch off from develop, make your changes, commit them and send in a pull request.

If unsure whether the changes you are proposing would be welcome, open an issue first to discuss your proposal.

License

This code is released under the GNU Lesser General Public License (LGPLv3).


All versions of phpcsdevtools with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
squizlabs/php_codesniffer Version ^3.1.0
dealerdirect/phpcodesniffer-composer-installer Version ^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.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 phpcsstandards/phpcsdevtools contains the following files

Loading the files please wait ....