PHPackages                             obliviousharmony/vscode-phpcs-integration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. obliviousharmony/vscode-phpcs-integration

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

obliviousharmony/vscode-phpcs-integration
=========================================

The custom PHPCS integration for the obliviousharmony.vscode-php-codesniffer VS Code extension.

3.1.0(1mo ago)426.4k5[5 issues](https://github.com/ObliviousHarmony/vscode-php-codesniffer/issues)GPL-2.0-or-laterTypeScriptCI passing

Since Feb 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ObliviousHarmony/vscode-php-codesniffer)[ Packagist](https://packagist.org/packages/obliviousharmony/vscode-phpcs-integration)[ Docs](https://github.com/ObliviousHarmony/vscode-php-codesniffer)[ RSS](/packages/obliviousharmony-vscode-phpcs-integration/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (22)Used By (0)

VS Code PHP\_CodeSniffer Extension
==================================

[](#vs-code-php_codesniffer-extension)

Integrates [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) into VS Code.

This extension uses the version of PHPCS defined by the platform-specific executable setting. Through the use of custom reports we are able to generate diagnostics, code actions, and document formatting that fully utilizes VS Code's available features.

Configuration
-------------

[](#configuration)

***Until you configure it, this extension will not lint any files.***

### Standard (`phpCodeSniffer.standard`)

[](#standard-phpcodesnifferstandard)

This dropdown selects the coding standard that will be used. There are a few options that, when selected, will instead change the behavior of the extension.

#### `Disabled`

[](#disabled)

This option will prevent the extension from linting any documents.

#### `Default`

[](#default)

Allow PHPCS to decide what standard should apply to the document. It will either use the default standard if one is configured, otherwise, it will try to find one in the workspace root and all parent directories.

#### `Automatic`

[](#automatic)

When selected, this option will cause the extension to search for an applicable coding standard file (`.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist`, `phpcs.xml.dist`). The extension starts in the document's folder and traverses through parent directories until it reaches the workspace root. If the extension fails to find a file it will do nothing and output an error.

#### `Custom`

[](#custom)

This option will use the content of the `phpCodeSniffer.standardCustom` input as the standard. This can be the name of a custom ruleset, or, a path to a custom standard file. If a relative path is given it will be based on the workspace root that the document resides in (untitled documents use the first root).

### Executable (`phpCodeSniffer.exec.linux`, `phpCodeSniffer.exec.osx`, and `phpCodeSniffer.exec.windows`)

[](#executable-phpcodesnifferexeclinux-phpcodesnifferexecosx-and-phpcodesnifferexecwindows)

This text input allows for setting a path to a platform-specific PHPCS executable. If a relative path is given it will be based on the workspace root that the document resides in (untitled documents use the first root). Any arguments or options added after the executable will be passed to it automatically.

You may also set the `phpCodeSniffer.autoExecutable` option if you'd like for the extension to automatically search for an executable. This works by looking for a `{vendor-dir}/bin/phpcs` (`{vendor-dir}\bin\phpcs.bat` on Windows) file in the document's directory and then traversing up to the workspace folder if it does not find one. When it fails to find one automatically it will fall back to the explicit option.

### File and Folder Exclusions (`phpCodeSniffer.exclude`)

[](#file-and-folder-exclusions-phpcodesnifferexclude)

This array of glob patterns allows you to exclude files and folders from linting. While the extension **does** respect any file rules in your coding standard, this option allows you to define additional rules.

### Autofix on Save

[](#autofix-on-save)

Rather than providing an option here, this extension encourages you to use the built-in VS Code `editor.formatOnSave` option:

```
{
    "[php]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "obliviousharmony.vscode-php-codesniffer"
    }
}
```

Using in Containerized Development Environments (`phpCodeSniffer.autoloadPHPCSIntegration`)
-------------------------------------------------------------------------------------------

[](#using-in-containerized-development-environments-phpcodesnifferautoloadphpcsintegration)

If you are using a container for your development environment we would *strongly* recommend using one of [VS Code's remote development extensions](https://code.visualstudio.com/docs/remote/remote-overview). However, if this is not possible, [we have provided a Composer package with the files required to integrate with PHPCS](./assets/phpcs-integration). You *must* install these files alongside PHPCS (globally or per-project) in order for the extension to work properly. Once you have installed the package it will be used instead of the build-in integration when `phpCodeSniffer.autoloadPHPCSIntegration` is enabled.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance87

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 99% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~98 days

Recently: every ~198 days

Total

20

Last Release

52d ago

Major Versions

0.4.1 → 1.0.02021-03-02

1.7.0 → 2.0.02023-04-13

2.3.0 → 3.0.02024-01-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/67851e0deeb2c6a7a4c238cf45c0e9694a919e2c5e02706c5852e67c4ad279c9?d=identicon)[ObliviousHarmony](/maintainers/ObliviousHarmony)

---

Top Contributors

[![ObliviousHarmony](https://avatars.githubusercontent.com/u/6451942?v=4)](https://github.com/ObliviousHarmony "ObliviousHarmony (96 commits)")[![brandondove](https://avatars.githubusercontent.com/u/300348?v=4)](https://github.com/brandondove "brandondove (1 commits)")

---

Tags

phpcsphpcbfvscodevscode-extensionvscode-phpcsvscode-phpcbf

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/obliviousharmony-vscode-phpcs-integration/health.svg)

```
[![Health](https://phpackages.com/badges/obliviousharmony-vscode-phpcs-integration/health.svg)](https://phpackages.com/packages/obliviousharmony-vscode-phpcs-integration)
```

###  Alternatives

[phpcsstandards/phpcsutils

A suite of utility functions for use with PHP\_CodeSniffer

6233.4M58](/packages/phpcsstandards-phpcsutils)[woocommerce/woocommerce-sniffs

WooCommerce sniffs

496.8M42](/packages/woocommerce-woocommerce-sniffs)[phpcompatibility/phpcompatibility-paragonie

A set of rulesets for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.

1031.3M10](/packages/phpcompatibility-phpcompatibility-paragonie)[drupol/drupal-conventions

Drupal conventions for coding.

2422.7k1](/packages/drupol-drupal-conventions)[ramsey/coding-standard

A common coding standard for Ramsey's PHP libraries.

1091.1k36](/packages/ramsey-coding-standard)[syde/phpcs

Syde PHP coding standards for WordPress projects.

1019.7k7](/packages/syde-phpcs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
