Download the PHP package zooroyal/coding-standard-source without Composer

On this page you can find all versions of the php package zooroyal/coding-standard-source. 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 coding-standard-source

CI Docker Build Packagist Release

ZooRoyal Coding Standard Source


This repository holds the necessary sources to use and build the ZooRoyal Coding Standard.

It incorporates

In addition, there is a PHP script in src/bin to be used by a continuous integration tool of your choice. It searches your source code to find files to check with its static code analysis tools. Information about its usage can be found by calling it with -h option.

Installation (as intended)

Docker

The ZooRoyal Coding Standard is designed to be used as a docker isolated application. Therefore, no installation is needed if you have a docker daemon available on your system.

Composer

If ...

... you find a ready-made composer package at https://github.com/ZooRoyal/coding-standard

It will still require you to have a docker daemon available on your system.

The ZooRoyal Coding Standard application will be available under vendor/bin/coding-standard.

Install from source (not recommended)

If all else fails, you can install the ZooRoyal Coding Standard from this source package. Please be aware that this is not recommended. There will be tons of dependencies the rest of your project will have to comply with. They will be very specific and change as we see fit.

Standalone

If you want to use the ZooRoyal Coding Standard as a standalone application, you can use the following commands:

The ZooRoyal Coding Standard application will be available under src/bin/coding-standard.

As composer dependency

To use the ZooRoyal Coding Standard as a composer dependency, you can require it via composer but this alone won't be enough. You will have to install the necessary tools as well. For this to happen, you can use the following process:

Now you need to add the following lines to your composer.json:

The final step is to install the necessary tools. This can be done by running the following command:

This will install the following tools in several directories under vendor-bin:

This tools will be installed in node_modules:

The ZooRoyal Coding Standard application will be available under vendor/bin/coding-standard.

Usage ZooRoyal Coding Standard

Please keep in mind, that ZooRoyal Coding Standard can only check source code which is a git repository as well as a composer project

Using the docker image directly

If you want to use the docker image directly, you can use the following command:

This will mount your current working directory as the root directory of the source code you want to check.

For your convenience, you can create an alias for this command:

To use a certain version of the coding-standard, just add the version tag to the image name:

Using one of the composer packages

The composer package will install a script in your vendor/bin folder of your composer project or src/bin of the standalone installation folder. Use them to run the ZooRoyal Coding Standard.

The ZooRoyal Coding Standard application must be executed from the root of your project.

Using the ZooRoyal Coding Standard

Run the command to get usage instructions.

Example sca:all

The all command forwards all applicable parameters to all implemented static code analysis tools.

This command for example tries to find the parent branch by automagic (-a) and tells all static code analysis tools to fix found violations if they are able to.

This command computes the diff to the branch origin/master and searches for all violations in this files.

For examples just have a look an the .travis.yml

Extend the Coding Standard

If you want to extend the ZooRoyal Coding Standard with your own tools there are two tutorials available:

Integrating the Coding Standard into PHPStorm

If you want to integrate the ZooRoyal Coding Standard into PHPStorm, have a look at the guides in the doc/ideConfig folder.


All versions of coding-standard-source with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4.0
ext-json Version *
ext-xml Version *
composer-runtime-api Version ^2.0
bamarni/composer-bin-plugin Version ^1.8.2
composer/semver Version ^3.4.3
dealerdirect/phpcodesniffer-composer-installer Version ^1.0.0
nette/neon Version ^3.4.4
nette/utils Version ^4.0.5
nikic/php-parser Version ^5.4.0
php-di/php-di Version ^7.0.1
slevomat/coding-standard Version ^8.16.1
squizlabs/php_codesniffer Version ^3.12.0
symfony/console Version ^7.2.1
symfony/event-dispatcher Version ^7.2.0
symfony/filesystem Version ^7.2.0
symfony/process Version ^7.2.4
thecodingmachine/safe Version ^3.0.2
webmozart/path-util Version ^2.3
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 zooroyal/coding-standard-source contains the following files

Loading the files please wait ...