Download the PHP package infinum/eightshift-coding-standards without Composer

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

image

Latest Stable Version Release Date of the Latest Version

CI checks

Minimum PHP Version Tested on PHP 7.4 to 8.3

License: MIT Total Downloads

Eightshift Coding Standards for WordPress

This package contains Eightshift Coding Standards for WordPress for PHP_CodeSniffer. The intention of this package is to have a unified code across the WordPress projects we do at Eightshift, and to help with the code review.

Installation

Composer

Composer install is simple. Just run

composer require infinum/eightshift-coding-standards

or add to your composer.json

Copy and modify the configuration file into your project (from the project root)

Then, run the following command to run the standards checks in your project:

You can also selectively check files or directories by specifying them.

Recommendation

It's recommended that you install a Composer plugin that will handle the registration of standards with PHP_CodeSniffer.

Working in IDE

Sublime Text 3

To make the sniff work in Sublime Text 3, you need to have sublime linter set up, and add phpcs linter.

Then in your settings you need to reference the path to the coding standards. It should look something like this

The path depends on where you've installed your standards. Then in the linters user settings you'll need to add in the linters key

Or set the standard to point to the phpcs.xml.dist in your root folder (preferred method)

Note about global installation

In your wpcs folder, when adding Eightshift folder. You can clone this repository there, be sure to comment out the <config name="installed_paths" value="vendor/wp-coding-standards/wpcs"/> part, so that your sniffer won't go looking for that folder.

Visual Studio Code

To set up phpcs in your VSCode, use vscode-phpcs extension. Once installed in the user settings set

This will look in your project's vendor folder for the Eightshift's WordPress Coding Standards, and run the sniffs on every save. You can see the issues in the Problems tab at the bottom.

Atom

To set up phpcs in the Atom editor, you need to install a couple of packages. First install the base linter package for Atom: linter. Upon completion you will be prompted to install its dependency linter-ui-default. After that install linter-phpcs.

In linter-phpcs package settings you can set the path to previously installed phpcs or allow the package to search for phpcs executable inside your project. Also, you must set the name of the standard: "Eightshift" or path to the ruleset.xml of Eightshift's WordPress Coding Standards. We recommend you to disable searching for configuration files because that can cause some other standards to be used instead.

In config.cson linter-phpcs settings can look like this:

Credits

Eightshift WordPress Coding Standards are maintained and sponsored by Infinum.

License

Eightshift WordPress Coding Standards are Copyright © 2023 Infinum. This is free software, and may be redistributed under the terms specified in the LICENSE file.


All versions of eightshift-coding-standards with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
phpcompatibility/phpcompatibility-wp Version ^2.1.4
wp-coding-standards/wpcs Version dev-hotifx/escape-output-sniff
slevomat/coding-standard Version ^8.13.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 infinum/eightshift-coding-standards contains the following files

Loading the files please wait ....