# Install phpstan with Homebrew, Nix

PHP Static Analysis Tool. Version 2.2.7 via Homebrew; verified 2026-07-29. Also installable with nix: nix profile install nixpkgs#phpstan.

## Install

```sh
sudo av install brew:phpstan
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install phpstan
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#phpstan
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ph/phpstan/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:phpstan
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/phpstan>
- **Version:** 2.2.7
- **Source summary:** PHP Static Analysis Tool
- **Homepage:** <https://phpstan.org/>
- **Repository:** <https://github.com/phpstan/phpstan>
- **Upstream docs:** <https://phpstan.org/>
- **License:** MIT
- **Source archive:** <https://github.com/phpstan/phpstan/releases/download/2.2.7/phpstan.phar>
- **Last updated:** 2026-07-29T19:57:02Z
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- phpstan (cli)
- phpstan (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-08-04
- Package-manager version: 2.2.7
- Package-manager updated: 2026-07-29
- Local data: ok
- Upstream repository: https://github.com/phpstan/phpstan
- info: No cached GitHub release or tag data was available.

## Security Notes

No matching local secret-handling manifest was found for phpstan. Package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./phpstan.neon, ./phpstan.neon.dist, ./phpstan.dist.neon, ./phpstan-baseline.neon
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** phpstan
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - phpstan: normalized package name match | nixpkgs package indexes: pkgs/by-name/ph/phpstan/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://pkg.so/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [psalm](https://pkg.so/brew/psalm/) - Shares pkgdb curated category or tags: cli, developer-tools, php, static-analysis, type-checking.
- [eslint](https://pkg.so/brew/eslint/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [pylint](https://pkg.so/brew/pylint/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [pmd](https://pkg.so/brew/pmd/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [checkstyle](https://pkg.so/brew/checkstyle/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [luacheck](https://pkg.so/brew/luacheck/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [pyscn](https://pkg.so/brew/pyscn/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [detekt](https://pkg.so/brew/detekt/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, static-analysis.
- [credo](https://pkg.so/brew/credo/) - Local package facts share a topical domain. Shared terms: analysis, cli, code, code-quality, developer.

## Combined YAML source

View the package source record on GitHub. [combined/phpstan.yml](https://github.com/mxcl/pkgdb/blob/main/combined/phpstan.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
