Download the PHP package spryker/code-sniffer without Composer

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

Spryker Code Sniffer

CI Latest Stable Version Minimum PHP Version PHPStan License Total Downloads

This sniffer package follows PSR-2 completely and ships with a lot of additional fixers on top (incl. PSR-12). Please see the Spryker Coding conventions for details.

List of included sniffs.

Documentation

See docs.

Upstream docs: squizlabs/PHP_CodeSniffer/wiki

Usage

How to use in Spryker projects

Make sure you include the sniffer as require-dev dependency:

The Development module provides a convenience command:

(or console c:s:s as shortcut)

To automatically fix fixable errors, use

-v is useful for more info output. To run only a specific sniff, use the -s option. See -h for help.

You can also sniff a specific project level module or path:

How to use in any project

You can also manually invoke the phpcs/phpcbf commands:

The command phpcs just sniffs, phpcbf fixes.

You probably want to ignore some folders, e.g. --ignore=vendor/ or some of your test fixture folders.

Standards

You can always switch the standard to the stricter one named SprykerStrict. It is an extension of the Spryker standard with its own (strict) sniffs added on top.

How to include in your IDE

E.g. for PHPStorm:

You can also set up file watchers, but here you should better only whitelist certain sniffs that only add things and don't remove anything.

How to configure the default rule set

In order to simplify command line interface, phpcs allows to specify default rule set in and standards path the following way.

Assuming the following directory structure:

The base directory and rule set can be used in configuration now.

You might need to specify full directory path. Now the tools can be used without --standard switch.

Using own project standard

You can exchange or extend the Spryker coding standard by providing your own ruleset.xml. This can be configured in the Development module config:

If you use it for custom projects, just use --standard to point to your ruleset file.

Make sure that you include the Spryker core standard ruleset in your custom one, e.g.:

If you want to use the SprykerStrict standard in your project, you should replace the string:

with this one:


All versions of code-sniffer with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
slevomat/coding-standard Version ^7.2.0 || ^8.0.1
squizlabs/php_codesniffer Version ^3.6.2
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 spryker/code-sniffer contains the following files

Loading the files please wait ....