diff --git a/tools/.phpstan/composer.json b/tools/.phpstan/composer.json index a9a69f975..a459e2a9c 100644 --- a/tools/.phpstan/composer.json +++ b/tools/.phpstan/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "phpstan/phpstan": "^2.1.56", + "phpstan/phpstan": "^2.2.1", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan-strict-rules": "^2.0.11", "tomasvotruba/type-coverage": "^2.2.1", diff --git a/tools/.phpstan/composer.lock b/tools/.phpstan/composer.lock index 25e54ecb1..ba2d08e56 100644 --- a/tools/.phpstan/composer.lock +++ b/tools/.phpstan/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a1a89a5081a183dea0929c9c7692b544", + "content-hash": "3024ee9f22f3fb038c07e374fc056917", "packages": [], "packages-dev": [ { @@ -221,11 +221,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.56", + "version": "2.2.1", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/93a603c9fc3be8c3c93bbc8d22170ad766685537", - "reference": "93a603c9fc3be8c3c93bbc8d22170ad766685537", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dea9c8f2d25cc849391042b71e429c1a4bf82660", + "reference": "dea9c8f2d25cc849391042b71e429c1a4bf82660", "shasum": "" }, "require": { @@ -248,6 +248,17 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" + } + ], "description": "PHPStan - PHP Static Analysis Tool", "keywords": [ "dev", @@ -270,7 +281,7 @@ "type": "github" } ], - "time": "2026-05-26T17:04:57+00:00" + "time": "2026-05-28T14:44:12+00:00" }, { "name": "phpstan/phpstan-strict-rules", diff --git a/tools/.phpstan/vendor/composer/installed.json b/tools/.phpstan/vendor/composer/installed.json index 6a58aeb49..028c75ecb 100644 --- a/tools/.phpstan/vendor/composer/installed.json +++ b/tools/.phpstan/vendor/composer/installed.json @@ -223,12 +223,12 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.56", - "version_normalized": "2.1.56.0", + "version": "2.2.1", + "version_normalized": "2.2.1.0", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/93a603c9fc3be8c3c93bbc8d22170ad766685537", - "reference": "93a603c9fc3be8c3c93bbc8d22170ad766685537", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dea9c8f2d25cc849391042b71e429c1a4bf82660", + "reference": "dea9c8f2d25cc849391042b71e429c1a4bf82660", "shasum": "" }, "require": { @@ -237,7 +237,7 @@ "conflict": { "phpstan/phpstan-shim": "*" }, - "time": "2026-05-26T17:04:57+00:00", + "time": "2026-05-28T14:44:12+00:00", "bin": [ "phpstan", "phpstan.phar" @@ -253,6 +253,17 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" + } + ], "description": "PHPStan - PHP Static Analysis Tool", "keywords": [ "dev", diff --git a/tools/.phpstan/vendor/composer/installed.php b/tools/.phpstan/vendor/composer/installed.php index 65214a030..15c0289ce 100644 --- a/tools/.phpstan/vendor/composer/installed.php +++ b/tools/.phpstan/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '0398c8400327a363191c3004854396b29281256e', + 'reference' => 'a030e5333a106e9bdb041358cbf1d03e323656a0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '0398c8400327a363191c3004854396b29281256e', + 'reference' => 'a030e5333a106e9bdb041358cbf1d03e323656a0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -47,9 +47,9 @@ 'dev_requirement' => true, ), 'phpstan/phpstan' => array( - 'pretty_version' => '2.1.56', - 'version' => '2.1.56.0', - 'reference' => '93a603c9fc3be8c3c93bbc8d22170ad766685537', + 'pretty_version' => '2.2.1', + 'version' => '2.2.1.0', + 'reference' => 'dea9c8f2d25cc849391042b71e429c1a4bf82660', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), diff --git a/tools/.phpstan/vendor/phpstan/phpstan/CLAUDE.md b/tools/.phpstan/vendor/phpstan/phpstan/CLAUDE.md new file mode 100644 index 000000000..bed0f2088 --- /dev/null +++ b/tools/.phpstan/vendor/phpstan/phpstan/CLAUDE.md @@ -0,0 +1,115 @@ +# PHPStan - PHP Static Analysis Tool + +## Project Overview + +PHPStan finds errors in PHP code without running it. It catches bugs before tests are written, moving PHP closer to compiled languages. This is the **distribution repository** — the compiled PHAR and supporting infrastructure. The actual source code lives at [phpstan/phpstan-src](https://github.com/phpstan/phpstan-src). + +- **Website:** https://phpstan.org/ +- **Documentation:** https://phpstan.org/user-guide/getting-started +- **API Reference:** https://apiref.phpstan.org/ + +## Repository Structure + +``` +├── phpstan # CLI entry point (shell script loading the PHAR) +├── phpstan.phar # Compiled PHAR archive (~26 MB) +├── phpstan.phar.asc # GPG signature for the PHAR +├── bootstrap.php # PHAR autoloader with PHP version polyfills +├── composer.json # Package definition (requires PHP ^7.4|^8.0) +├── .phar-checksum # MD5 + SHA1 checksums for reproducible builds +├── conf/ +│ └── bleedingEdge.neon # Bleeding edge configuration profile +├── e2e/ # End-to-end tests (~67 test scenarios) +├── docker/ # Dockerfiles for PHP 8.0–8.4 +├── identifier-extractor/ # Tool to extract error identifiers from rule source code +├── playground-api/ # AWS Lambda API for the online playground (TypeScript) +├── playground-runner/ # AWS Lambda runner for the playground (PHP/Bref) +├── website/ # phpstan.org static site (Eleventy + Vite + TailwindCSS) +└── .github/workflows/ # CI/CD workflows +``` + +## Key Concepts + +### Distribution Model + +This repository distributes a pre-built PHAR archive. The source code is in [phpstan/phpstan-src](https://github.com/phpstan/phpstan-src), which is on PHP 8.1+ internally but the PHAR build is downgraded to support PHP 7.4+. The `phpstan` script loads the PHAR and delegates to the bundled binary. + +### PHP Version Support + +- **This distribution package:** PHP ^7.4|^8.0 (defined in composer.json) +- **phpstan-src internally:** PHP 8.1+ (downgraded during PHAR build) +- **Other extension repositories** (phpstan-strict-rules, phpstan-doctrine, phpstan-symfony, etc.): still support PHP 7.4+ +- **E2E tests run on:** PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5 (Linux + Windows) + +### Bleeding Edge + +The `conf/bleedingEdge.neon` configuration enables experimental/strict checks before they become defaults. Users opt in by including this config. + +### Error Identifiers + +Every PHPStan error has a unique identifier (e.g., `argument.type`, `deadCode.unreachable`). The `identifier-extractor/` tool scans all PHPStan repositories to extract these identifiers, producing JSON used to generate documentation on the website. + +## Development + + +### CI Workflows + +Key workflows in `.github/workflows/`: + +- **`tests.yml`** — Runs e2e tests on PHP 7.4–8.5, Linux + Windows. Triggered on changes to `e2e/**`, `phpstan`, `.phar-checksum`, `bootstrap.php`. +- **`other-tests.yml`** — Additional integration tests (PHP-Parser, React Promise, etc.) +- **`integration-tests.yml`** — Tests against major projects (Rector, Larastan, Carbon, etc.) +- **`extension-tests.yml`** — Tests 1st-party PHPStan extensions (PHPUnit, Doctrine, Symfony, etc.) +- **`release.yml`** — Creates GitHub release on tag push, uploads `phpstan.phar` and signature +- **`docker-stable.yml`** / **`docker-nightly.yml`** — Builds multi-arch Docker images (arm64 + amd64) pushed to ghcr.io +- **`extract-identifiers.yml`** — Extracts error identifiers from all PHPStan repos +- **`website.yml`** — Builds and deploys phpstan.org +- **`generate-error-docs.lock.yml`** — Generates error documentation using Claude + +### Current Branch + +The main development branch for this repository is `2.2.x`. + +## Website + +The website (phpstan.org) lives in `website/` and has its own `website/CLAUDE.md` with detailed instructions. Key points: + +- Built with Eleventy (11ty) + Vite + TailwindCSS +- Two-stage build: `npm run build:11ty` then `npm run build:vite` +- Deployed to AWS S3 + CloudFront +- Error documentation in `website/errors/` is auto-generated (see `website/errors/CLAUDE.md`) + +## Playground + +The online playground at https://phpstan.org/try consists of two AWS Lambda services: + +- **playground-api/** — TypeScript API that orchestrates analysis across multiple PHP versions +- **playground-runner/** — PHP Lambda (via Bref) that executes PHPStan against submitted code + +Both are deployed via the Serverless Framework to eu-west-1. + +## Docker + +Dockerfiles in `docker/` build images for PHP 8.0–8.4, based on `php:*-cli-alpine`. Images are published to `ghcr.io` as multi-architecture (arm64 + amd64). The images install PHPStan via Composer and use `phpstan` as the entrypoint. + +## Related Repositories + +- [phpstan/phpstan-src](https://github.com/phpstan/phpstan-src) — Main source code (PHP 8.1+, downgraded for PHAR) +- [phpstan/phpstan-strict-rules](https://github.com/phpstan/phpstan-strict-rules) — Additional strict rules +- [phpstan/phpstan-deprecation-rules](https://github.com/phpstan/phpstan-deprecation-rules) — Deprecation detection +- [phpstan/phpstan-doctrine](https://github.com/phpstan/phpstan-doctrine) — Doctrine integration +- [phpstan/phpstan-symfony](https://github.com/phpstan/phpstan-symfony) — Symfony integration +- [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) — PHPUnit integration +- [phpstan/phpstan-nette](https://github.com/phpstan/phpstan-nette) — Nette integration +- [phpstan/phpstan-webmozart-assert](https://github.com/phpstan/phpstan-webmozart-assert) — Webmozart Assert integration +- [phpstan/phpdoc-parser](https://github.com/phpstan/phpdoc-parser) — PHPDoc parser library + +Extension repositories support PHP 7.4+ and some support multiple versions of the libraries they analyse. + +## Making Changes + +- **Source code changes** belong in [phpstan/phpstan-src](https://github.com/phpstan/phpstan-src), not here +- **E2E tests** can be added or modified in `e2e/` +- **Website content** is in `website/src/` (see `website/CLAUDE.md`) +- **Error documentation** is in `website/errors/` (see `website/errors/CLAUDE.md`) +- Configuration uses NEON format (Nette Object Notation), similar to YAML diff --git a/tools/.phpstan/vendor/phpstan/phpstan/README.md b/tools/.phpstan/vendor/phpstan/phpstan/README.md index 689f9841c..443d1d13d 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan/README.md +++ b/tools/.phpstan/vendor/phpstan/phpstan/README.md @@ -67,7 +67,7 @@ Want your logo here? [Learn more »](https://phpstan.org/sponsor)
ZOL     -EdgeNext +Inviqa
Route4Me: Route Optimizer and Route Planner Software     @@ -78,10 +78,8 @@ Want your logo here? [Learn more »](https://phpstan.org/sponsor) campoint AG
Crisp.nl -    -Inviqa
- +Netrouting [**You can sponsor my open-source work on PHPStan through GitHub Sponsors and also directly.**](https://phpstan.org/sponsor) diff --git a/tools/.phpstan/vendor/phpstan/phpstan/composer.json b/tools/.phpstan/vendor/phpstan/phpstan/composer.json index 8b51d4b71..a267d4c50 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan/composer.json +++ b/tools/.phpstan/vendor/phpstan/phpstan/composer.json @@ -2,6 +2,17 @@ "name": "phpstan/phpstan", "description": "PHPStan - PHP Static Analysis Tool", "license": ["MIT"], + "authors": [ + { + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" + } + ], "keywords": ["dev", "static analysis"], "require": { "php": "^7.4|^8.0" diff --git a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar index cb49ab636..e0e15ae58 100755 Binary files a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar and b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar differ diff --git a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc index 64be89f20..4859a2b79 100644 --- a/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc +++ b/tools/.phpstan/vendor/phpstan/phpstan/phpstan.phar.asc @@ -1,16 +1,16 @@ -----BEGIN PGP SIGNATURE----- -iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmoV0nsACgkQUcZzBf/C -5cCg9g/+NXlFA76CXI1399Y3bXRuHLLZ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