pkg.soopen package index

brew / rank 1868

Install phpstan with Homebrew, Nix

PHP Static Analysis Tool. Version 2.3.4 via Homebrew; verified 2026-11-03. Also installable with nix: nix profile install nixpkgs#phpstan.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install phpstan

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#phpstan

nixpkgs package indexes · pkgs/by-name/ph/phpstan/package.nix · source: api.github.com

overview

Package summary

PHP Static Analysis Tool

Commands and aliases

  • phpstan

history

Project history and usage

PHPStan is a static analyzer for PHP that infers types and reports potential defects without running the analyzed application.

Project history

Ondřej Mirtes first released PHPStan in 2016 as a static analyzer focused on finding PHP bugs without executing the program. A dedicated documentation site followed in 2020, version 1.0 marked six years of development in 2021, and version 2.0 expanded the rule-level model in 2024.

Adoption history

PHPStan's graduated rule levels let teams introduce analysis incrementally, while baselines let established codebases enforce stricter checks on new work without first repairing every historical finding. Composer installation and a library of framework-specific extensions fit normal PHP project workflows.

How it is used

Projects commonly install PHPStan as a Composer development dependency, run `analyse` against source and test directories, and choose a rule level from 0 through 10. NEON configuration controls paths and behavior, while a generated baseline can suppress existing findings during gradual adoption.

Why package nerds care

PHPStan helped make whole-program static analysis a routine PHP development dependency. Package-oriented users care about its self-contained PHAR, Composer distribution, NEON configuration, extension ecosystem, and explicit compatibility between analyzer, PHP language, and framework versions.

Timeline

  • 2016: First public release.
  • 2020: Dedicated PHPStan documentation website launched.
  • 2021: PHPStan 1.0 released after six years of development.
  • 2024: PHPStan 2.0 introduced level 10 and further type-system improvements.

Related projects

  • Composer is the recommended installation path and enables PHPStan extensions.
  • Framework and library extensions supply more precise type information and rules.
  • PHPStan Pro provides a web interface for browsing findings, including baselined errors.

security posture

No protected-tool coverage found yet

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

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 1 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

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

Config paths the tool may read or write during local use.

Unix
./phpstan.neon./phpstan.neon.dist./phpstan.dist.neon./phpstan-baseline.neon

executables

Installed executables

CommandKindExposureNote
phpstancliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-11-04
manager version2.3.4
manager updated2026-11-03
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/phpstan/phpstan

install metadata

Package metadata

Package keybrew:phpstan
Version2.3.4
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/phpstan
Homepagehttps://phpstan.org/
Repositoryhttps://github.com/phpstan/phpstan
Upstream docshttps://phpstan.org/
LicenseMIT
Source archivehttps://github.com/phpstan/phpstan/releases/download/2.3.5/phpstan.phar
Last updated2026-11-03T14:54:37Z
Pulseupdated
Bottleavailable (on all)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namephpstan
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

phpstan

nix profile install nixpkgs#phpstan
  • normalized package name match
  • Matched by: Phpstan
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ph/phpstan/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

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