Download the PHP package oxid-esales/coding-standards without Composer

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

OXID Coding Standards

This repository includes OXID eShop coding standards definition for PHP Codesniffer along with a PHPStorm autoformat config file. The PHP_CodeSniffer standard will never be 100% accurate, but should be viewed as a strong set of guidelines while contributing to OXID eShop.

See OXID eShop coding standards documentation at https://oxidforge.org/en/coding-standards.html

Requirements

Installation

Coding Standards setup uses composer to get required packages, so make sure to have composer installed and accessible. You can find composer installation guide here.

Selecting where to install coding standards

Coding Standards can be installed directly within shop or to any other directory. However, installation varies slightly depending on selected location. We advise to install it using shop directory.

Option 1: Selecting shop directory for installation (preferred way)

To install Coding Standards within shop directory, update/create composer.json with following values:

Installing this way, you can use phpcsoxid binary to check your shop directory for standards errors by shop/path/vendor/bin/phpcsoxid. Latest development shop version already includes composer.json file in its source, so no changes needs to be made.

Option 2: Selecting any directory for installation (alternative way)

To install Coding Standards to any directory, you need to checkout Coding Standards from Github into desired directory (git clone https://github.com/OXID-eSales/coding_standards.git). Installing this way, binaries will be accessible from coding_standards/bin. You must manually set what directory you want to check for conding standards errors by giving directory path as argument for oxid phpcs binary, like: phpcsoxid /path/to/my/shop/.

Installing Coding Standards

After you selected where you want to install the Coding Standards, follow these steps:

  1. Navigate to the directory that you picked for installation.
  2. Use composer to setup Coding Standards components (composer install). Ensure you do this from within the directory where composer.json is located.

Running Coding Standards checks

To run coding standards checkings, use phpcsoxid binary by:
phpcsoxid - run phpcs with preconfigured Oxid standard, and show list of errors.
phpcsoxid /some/other/path - run phpcs with preconfigured Oxid standard on some specific directory
(You must always provide directory for checking if coding standards was not installed by "Option 1" installation method.)

It is possible to use standard codesniffer(phpcs) options too, like:
phpcsoxid --report=summary

Alternatively, it is possible to use original phpcs, but you must configure it by yourself. As example:
phpcs --standard=/path/to/Standard/directory/Oxid/ /path/to/directory/for/checking/standards


All versions of coding-standards with dependencies

PHP Build Version
Package Version
Requires squizlabs/php_codesniffer Version ^2.3.1
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 oxid-esales/coding-standards contains the following files

Loading the files please wait ....