{"id":15065441,"url":"https://github.com/infinum/eightshift-coding-standards","last_synced_at":"2025-09-02T02:37:39.019Z","repository":{"id":40408878,"uuid":"96307889","full_name":"infinum/eightshift-coding-standards","owner":"infinum","description":"Eightshift coding standards for WordPress","archived":false,"fork":false,"pushed_at":"2024-05-20T07:32:05.000Z","size":387,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-28T16:53:19.994Z","etag":null,"topics":["eightshift","open-source","phpcs-linter","wordpress"],"latest_commit_sha":null,"homepage":"https://eightshift.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infinum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-05T10:33:29.000Z","updated_at":"2025-06-12T05:21:50.000Z","dependencies_parsed_at":"2024-06-19T09:58:13.258Z","dependency_job_id":"b1659fb6-2b56-4f01-846a-499c64c4b86e","html_url":"https://github.com/infinum/eightshift-coding-standards","commit_stats":{"total_commits":206,"total_committers":5,"mean_commits":41.2,"dds":"0.11650485436893199","last_synced_commit":"c9c6f99a7df8b69f39cd0aadbb4aa047cb56f6fc"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/infinum/eightshift-coding-standards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Feightshift-coding-standards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Feightshift-coding-standards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Feightshift-coding-standards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Feightshift-coding-standards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinum","download_url":"https://codeload.github.com/infinum/eightshift-coding-standards/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinum%2Feightshift-coding-standards/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273221374,"owners_count":25066586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eightshift","open-source","phpcs-linter","wordpress"],"created_at":"2024-09-25T00:38:31.584Z","updated_at":"2025-09-02T02:37:38.996Z","avatar_url":"https://github.com/infinum.png","language":"PHP","readme":"![image](https://repository-images.githubusercontent.com/96307889/1ff5645a-63b3-476f-925a-5f37c2599f6e)\n\n[![Latest Stable Version](https://poser.pugx.org/infinum/eightshift-coding-standards/v/stable)](https://packagist.org/packages/infinum/eightshift-coding-standards)\n[![Release Date of the Latest Version](https://img.shields.io/github/release-date/infinum/eightshift-coding-standards.svg?maxAge=1800)](https://github.com/infinum/eightshift-coding-standards/releases)\n\n[![CI checks](https://github.com/infinum/eightshift-coding-standards/actions/workflows/ci.yml/badge.svg)](https://github.com/infinum/eightshift-coding-standards/actions/workflows/ci.yml)\n\n[![Minimum PHP Version](https://img.shields.io/packagist/php-v/infinum/eightshift-coding-standards.svg?maxAge=3600)](https://packagist.org/packages/infinum/eightshift-coding-standards)\n[![Tested on PHP 7.4 to 8.3](https://img.shields.io/badge/tested%20on-%207.4%20|%208.0%20|%208.1%20|%208.2%20|%208.3-green.svg?maxAge=2419200)](https://github.com/infinum/eightshift-coding-standards/actions/workflows/ci.yml)\n\n[![License: MIT](https://poser.pugx.org/infinum/eightshift-coding-standards/license)](https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/LICENSE)\n[![Total Downloads](https://poser.pugx.org/infinum/eightshift-coding-standards/downloads)](https://packagist.org/packages/infinum/eightshift-coding-standards/stats)\n\n# Eightshift Coding Standards for WordPress\n\nThis package contains [Eightshift Coding Standards for WordPress](https://handbook.infinum.co/books/wordpress) for\n [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/). The intention of this package is to have a unified\n  code across the WordPress projects we do at Eightshift, and to help with the code review.\n\n## Installation\n\n### Composer\n\nComposer install is simple. Just run\n\n`composer require infinum/eightshift-coding-standards`\n\nor add to your `composer.json`\n\n```json\n\"require-dev\": {\n  \"infinum/eightshift-coding-standards\": \"^2.0\"\n}\n```\n\nCopy and modify the configuration file into your project (from the project root)\n\n```bash\ncp vendor/infinum/eightshift-coding-standards/phpcs.xml.dist.sample phpcs.xml.dist \n``` \n\nThen, run the following command to run the standards checks in your project:\n\n```bash\nvendor/squizlabs/php_codesniffer/bin/phpcs\n```\n\nYou can also selectively check files or directories by specifying them.\n\n### Recommendation\n\nIt's recommended that you install a Composer plugin that will handle the registration of standards with PHP_CodeSniffer.\n\n* [phpcodesniffer-composer-installer](https://github.com/PHPCSStandards/composer-installer)\n\n## Working in IDE\n\n### Sublime Text 3\n\nTo make the sniff work in Sublime Text 3, you need to have sublime linter set up, and add [phpcs linter](https://github.com/SublimeLinter/SublimeLinter-phpcs).\n\nThen in your settings you need to reference the path to the coding standards. It should look something like this\n\n```json\n\"paths\": {\n    \"linux\": [],\n    \"osx\": [\n        \"${project}/vendor/bin/\",\n        \"/Users/user_name/wpcs/vendor/bin\"\n    ],\n    \"windows\": []\n},\n```\n\nThe path depends on where you've installed your standards. Then in the linters user settings you'll need to add in the `linters` key\n\n```json\n\"phpcs\": {\n    \"@disable\": false,\n    \"args\": [],\n    \"excludes\": [],\n    \"standard\": \"Eightshift\"\n},\n```\n\nOr set the `standard` to point to the phpcs.xml.dist in your root folder (**preferred method**)\n\n```json\n\"phpcs\": {\n    \"@disable\": false,\n    \"args\": [],\n    \"excludes\": [],\n    \"standard\": \"$folder/phpcs.xml.dist\"\n},\n```\n\n#### Note about global installation\n\nIn your `wpcs` folder, when adding Eightshift folder. You can clone this repository there, be sure to comment out the\n `\u003cconfig\n name=\"installed_paths\" value=\"vendor/wp-coding-standards/wpcs\"/\u003e` part, so that your sniffer won't go looking for that folder.\n\n### Visual Studio Code\n\nTo set up phpcs in your VSCode, use [vscode-phpcs](https://github.com/ikappas/vscode-phpcs/) extension. Once installed in the user settings set\n\n```json\n\"phpcs.enable\": true,\n\"phpcs.standard\": \"Eightshift\",\n```\n\nThis will look in your project's vendor folder for the Eightshift's WordPress Coding Standards, and run the sniffs on\n every\n save. You can see the issues in the Problems tab at the bottom.\n\n### Atom\n\nTo set up phpcs in the Atom editor, you need to install a couple of packages. First install the base linter package for Atom: [linter](https://atom.io/packages/linter). Upon completion you will be prompted to install its dependency [linter-ui-default](https://atom.io/packages/linter-ui-default). After that install [linter-phpcs](https://atom.io/packages/linter-phpcs).\n\nIn `linter-phpcs` package settings you can set the path to previously installed `phpcs` or allow the package to\n search for `phpcs` executable inside your project. Also, you must set the name of the standard: `\"Eightshift\"` or\n  path to\n  the\n  `ruleset.xml` of Eightshift's WordPress Coding Standards. We recommend you to disable searching for configuration\n   files\n   because that can cause some other standards to be used instead.\n\nIn config.cson linter-phpcs settings can look like this:\n\n```coffee\n# If you want to use phpcs executable available in project\n\"linter-phpcs\":\n  autoConfigSearch: false\n  codeStandardOrConfigFile: \"Eightshift\"\n  disableWhenNoConfigFile: true\n\n# If you want to use specific phpcs executable\n\"linter-phpcs\":\n  autoConfigSearch: false\n  autoExecutableSearch: false\n  codeStandardOrConfigFile: \"Eightshift\"\n  disableWhenNoConfigFile: true\n  executablePath: \"/Users/user_name/wpcs/vendor/bin/phpcs\" #For Mac users\n  executablePath: \"path_to_composer/vendor/bin/phpcs.bat\" # For Windows users\n\n# If you want to use specific standard\n\"linter-phpcs\":\n  autoConfigSearch: false\n  codeStandardOrConfigFile: \"vendor/infinum/eightshift-coding-standards/Eightshift/ruleset.xml\"\n  disableWhenNoConfigFile: true\n```\n\n## Credits\n\nEightshift WordPress Coding Standards are maintained and sponsored by [Infinum](https://www.infinum.com).\n\n## License\n\nEightshift WordPress Coding Standards are Copyright © 2023 Infinum.\nThis is free software, and may be redistributed under the terms specified in the LICENSE file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinum%2Feightshift-coding-standards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinum%2Feightshift-coding-standards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinum%2Feightshift-coding-standards/lists"}