Download the PHP package silverorange/coding-standard without Composer

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

silverorange Coding Standards

Build Status

Coding standards for silverorange PHP projects. These are standards to be used with the PHPCS tool.

Per-Project Usage

per-project configuration is preferred over global configuration but does require support to be added to the project. To use these rules for a project:

1. install as a require-dev dependency using composer

2. add a post-install-cmd and post-update-cmd to register the coding standard with phpcs

Post install and post update are both required because composer install without a lock file will not execute the post-install-cmd script.

3. create a phpcs.xml

4. create a composer script to lint the project

5. add a Jenkins pipeline stage to automatically lint files

The code lint pipeline stage should be added before other pipeline stages so they do not run if the code lint fails. See the Jenkins Pipeline Manual for help with adding a stage to an existing pipeline, or for help creating a new pipeline.

For new packages:

For legacy packages:

Global Usage

The SilverorangeLegacy standard can be set to be used by default if no per-project configuration is available.

1. Install standard globally

2. Register the standard with PHP Code Sniffer

You can use commas to delineate multiple paths.

3. Set the global phpcs standard

Now calling phpcs with no additional arguments will use the SilverorangeLegacy standard.

Standards

Several standards are provided:

SilverorangeLegacy

Intended for linting the entire project for a legacy package. This omits some rules we'd like to use for new code written for legacy packages in order to run without error. It is not recommended to use this standard for new projects.

Documentation exists for the legacy standard.

SilverorangeTransitional

Intended for use as a post-commit hook or CI test. This ensures all new code added to legacy packages follows best practices within the legacy guidelines. This includes rules that will not pass for the entire project, but should pass for all modified files in a new pull request.

SilverorangeTransitionalPrettier

Based on PSR-2 standard but updated to support Prettier code auto-formatting. The PSR-4 autoloading rules of PSR-2 are relaxed to allow our legacy code to comply with the ruleset. This standard should be used for all legacy silverorange PHP packages.

Silverorange

Based on PSR-2. PSR-2 builds on, and includes all rules from PSR-1, The Silverorange standard extends PSR-2 to add forbidden functions.

For autoloading classes, projects must follow PSR-4. This allows efficient auto-loading and promotes organizing code using namespaces.

SilverorangePrettier

Based on Silverorange standard but updated to support Prettier code auto-formatting. In addition to PSR-2 rules, additional checks are included to promote code quality and consistency. This standard should be used for all new silverorange PHP packages.

SilverorangePEAR

Based on PEAR standard but updated to not require method and class documentation. This should not be used for new packages.

Sublime Setup

If you are using Sublime Text:

  1. Set up Sublime Linter with PHPCS as described here.
  2. In the Sublime Linter settings, make sure you have the following settings (do not remove the other settings):

  3. Create a Sublime project in the project root.
  4. Add the following to the Sublime project settings:

This will allow you to use different rulesets with different projects.

Atom Setup

If you are using Atom:

  1. Set up linter-phpcs as described here.
  2. Open the package settings for linter-phpcs and set Coding Standard Or Config File to SilverorangeLegacy or whichever current coding standard you are using. Also set the Tab Width field to 4.

All versions of coding-standard with dependencies

PHP Build Version
Package Version
Requires squizlabs/php_codesniffer Version ^3.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 silverorange/coding-standard contains the following files

Loading the files please wait ....