updated streamline-setup v2

This commit is contained in:
2025-01-15 08:53:49 -08:00
committed by alec.turner
parent a2ce9248f0
commit 4b569f81b0
20228 changed files with 2932048 additions and 63204 deletions
@@ -1,11 +0,0 @@
/.github export-ignore
/BACKERS.md export-ignore
/CODE_OF_CONDUCT.md export-ignore
/docker export-ignore
/e2e export-ignore
/issue-bot export-ignore
/playground-api export-ignore
/playground-runner export-ignore
/.travis.yml export-ignore
/website export-ignore
website/* linguist-vendored
@@ -1,9 +0,0 @@
/build/phpstan-generated.neon
/composer.lock
/conf/config.local.yml
/e2e/composer.lock
/e2e/vendor
/vendor
/.idea
/tests/tmp
/tests/.phpunit.result.cache
+36 -19
View File
@@ -5,7 +5,7 @@
</p>
<p align="center">
<a href="https://github.com/phpstan/phpstan/actions"><img src="https://github.com/phpstan/phpstan/workflows/Build/badge.svg" alt="Build Status"></a>
<a href="https://github.com/phpstan/phpstan/actions"><img src="https://github.com/phpstan/phpstan/workflows/Tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/phpstan/phpstan"><img src="https://poser.pugx.org/phpstan/phpstan/v/stable" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/phpstan/phpstan/stats"><img src="https://poser.pugx.org/phpstan/phpstan/downloads" alt="Total Downloads"></a>
<a href="https://choosealicense.com/licenses/mit/"><img src="https://poser.pugx.org/phpstan/phpstan/license" alt="License"></a>
@@ -18,45 +18,62 @@ PHPStan focuses on finding errors in your code without actually running it. It c
even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code
can be checked before you run the actual line.
**[Read more about PHPStan in an introductory article »](https://phpstan.org/blog/find-bugs-in-your-code-without-writing-tests)**
**[Read more about PHPStan »](https://phpstan.org/)**
**[Try out PHPStan on the on-line playground! »](https://phpstan.org/)**
**[Try out PHPStan on the on-line playground! »](https://phpstan.org/try)**
## Sponsors
<a href="https://coders.thecodingmachine.com/phpstan"><img src="https://i.imgur.com/kQhNOTP.png" alt="TheCodingMachine" width="247" height="64"></a>
<a href="https://coders.thecodingmachine.com/phpstan"><img src="website/src/images/sponsor/tcm.png" alt="TheCodingMachine" width="247" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://packagist.com/?utm_source=phpstan&utm_medium=readme&utm_campaign=sponsorlogo"><img src="https://i.imgur.com/PmMC45f.png" alt="Private Packagist" width="326" height="64"></a>
<a href="https://packagist.com/?utm_source=phpstan&utm_medium=readme&utm_campaign=sponsorlogo"><img src="website/src/images/sponsor/packagist.png" alt="Private Packagist" width="283" height="64"></a>
<br>
<a href="https://musement.recruiterbox.com/jobs/f661d5d5676e4c578d289bcf2fb40b02"><img src="https://i.imgur.com/uw5rAlR.png" alt="Musement" width="247" height="49"></a>
<a href="https://www.cdn77.com/"><img src="website/src/images/sponsor/cdn77.png" alt="CDN77" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://blackfire.io/docs/introduction?utm_source=phpstan&utm_medium=github_readme&utm_campaign=logo"><img src="https://i.imgur.com/zR8rsqk.png" alt="Blackfire.io" width="254" height="64"></a>
<a href="https://blackfire.io/docs/introduction?utm_source=phpstan&utm_medium=github_readme&utm_campaign=logo"><img src="website/src/images/sponsor/blackfire.png" alt="Blackfire.io" width="254" height="64"></a>
<br>
<a href="https://www.intracto.com/"><img src="https://i.imgur.com/XRCDGZi.png" alt="Intracto" width="254" height="65"></a>
<a href="https://www.iodigital.com/"><img src="website/src/images/sponsor/io.png" alt="iO" width="254" height="65"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://jobs.ticketswap.com/"><img src="https://i.imgur.com/lhzcutK.png" alt="TicketSwap" width="269" height="64"></a>
<a href="https://www.fame.fi/"><img src="website/src/images/sponsor/fame.png" alt="Fame Helsinki" width="283" height="64"></a>
<br>
<a href="https://www.startupjobs.cz/startup/shipmonk"><img src="https://i.imgur.com/bAC47za.jpg" alt="ShipMonk" width="290" height="64"></a>
<a href="https://www.startupjobs.cz/startup/shipmonk"><img src="website/src/images/sponsor/shipmonk.jpg" alt="ShipMonk" width="290" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://togetter.com/"><img src="https://i.imgur.com/x9n5cj3.png" alt="Togetter" width="283" height="64"></a>
<a href="https://togetter.com/"><img src="website/src/images/sponsor/togetter.png" alt="Togetter" width="283" height="64"></a>
<br>
<a href="https://join.rightcapital.com/?utm_source=phpstan&utm_medium=github&utm_campaign=sponsorship"><img src="https://i.imgur.com/EuIgI08.png" alt="RightCapital" width="283" height="64"></a>
<a href="https://join.rightcapital.com/?utm_source=phpstan&utm_medium=github&utm_campaign=sponsorship"><img src="website/src/images/sponsor/rightcapital.png" alt="RightCapital" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://www.contentkingapp.com/?ref=php-developer&utm_source=phpstan&utm_medium=referral&utm_campaign=sponsorship"><img src="https://i.imgur.com/0blm7ki.png" alt="ContentKing" width="283" height="64"></a>
<a href="https://www.contentkingapp.com/?ref=php-developer&utm_source=phpstan&utm_medium=referral&utm_campaign=sponsorship"><img src="website/src/images/sponsor/contentking.png" alt="ContentKing" width="283" height="64"></a>
<br>
<a href="https://zol.fr?utm_source=phpstan"><img src="https://i.imgur.com/dzDgd4s.png" alt="ZOL" width="283" height="64"></a>
<a href="https://zol.fr?utm_source=phpstan"><img src="website/src/images/sponsor/zol.png" alt="ZOL" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://kocourek.uk/"><img src="https://i.imgur.com/EX29z98.png" alt="Stepan Kocourek" width="294" height="64"></a>
<a href="https://www.edgenext.com/"><img src="website/src/images/sponsor/edgenext.png" alt="EdgeNext" width="283" height="64"></a>
<br>
<a href="https://www.shopware.com/en/"><img src="https://i.imgur.com/L4X5w9s.png" alt="Shopware" width="284" height="64"></a>
<a href="https://www.shopware.com/en/"><img src="website/src/images/sponsor/shopware.png" alt="Shopware" width="284" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://craftcms.com/"><img src="https://i.imgur.com/xJWThke.png" alt="Craft CMS" width="283" height="64"></a>
<a href="https://craftcms.com/"><img src="website/src/images/sponsor/craftcms.png" alt="Craft CMS" width="283" height="64"></a>
<br>
<a href="https://www.worksome.com/"><img src="website/src/images/sponsor/worksome.png" alt="Worksome" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://www.campoint.net/"><img src="website/src/images/sponsor/campoint.png" alt="campoint AG" width="283" height="64"></a>
<br>
<a href="https://www.crisp.nl/"><img src="website/src/images/sponsor/crisp.png" alt="Crisp.nl" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://inviqa.com/"><img src="website/src/images/sponsor/inviqa.png" alt="Inviqa" width="254" height="65"></a>
<br>
<a href="https://www.getresponse.com/"><img src="website/src/images/sponsor/getresponse.png" alt="GetResponse" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://www.shoptet.cz/"><img src="website/src/images/sponsor/shoptet.png" alt="Shoptet" width="283" height="64"></a>
<br>
<a href="https://route4me.com/"><img src="website/src/images/sponsor/route4me.png" alt="Route4Me: Route Optimizer and Route Planner Software" width="283" height="64"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://jobs.ticketswap.com/"><img src="website/src/images/sponsor/ticketswap.png" alt="TicketSwap" width="269" height="64"></a>
[**You can now sponsor my open-source work on PHPStan through GitHub Sponsors.**](https://github.com/sponsors/ondrejmirtes)
Does GitHub already have your 💳? Do you use PHPStan to find 🐛 before they reach production? [Send a couple of 💸 a month my way too.](https://github.com/sponsors/ondrejmirtes) Thank you!
One-time donations [through PayPal](https://paypal.me/phpstan) are also accepted. To request an invoice, [contact me](mailto:ondrej@mirtes.cz) through e-mail.
One-time donations [through Revolut.me](https://revolut.me/ondrejmirtes) are also accepted. To request an invoice, [contact me](mailto:ondrej@mirtes.cz) through e-mail.
## Documentation
@@ -67,6 +84,7 @@ All the documentation lives on the [phpstan.org website](https://phpstan.org/):
* [PHPDocs Basics](https://phpstan.org/writing-php-code/phpdocs-basics) & [PHPDoc Types](https://phpstan.org/writing-php-code/phpdoc-types)
* [Extension Library](https://phpstan.org/user-guide/extension-library)
* [Developing Extensions](https://phpstan.org/developing-extensions/extension-types)
* [API Reference](https://apiref.phpstan.org/)
## PHPStan Pro
@@ -74,7 +92,6 @@ PHPStan Pro is a paid add-on on top of open-source PHPStan Static Analysis Tool
* Web UI for browsing found errors, you can click and open your editor of choice on the offending line.
* Continuous analysis (watch mode): scans changed files in the background, refreshes the UI automatically.
* Interactive fixer: lets you choose the right fix for found errors :blush:
Try it on PHPStan 0.12.45 or later by running it with the `--pro` option. You can create an account either by following the on-screen instructions, or by visiting [account.phpstan.com](https://account.phpstan.com/).
+79 -4
View File
@@ -3,12 +3,17 @@
namespace PHPStan;
use Composer\Autoload\ClassLoader;
use function class_exists;
use const PHP_VERSION_ID;
final class PharAutoloader
{
/** @var ClassLoader */
private static $composerAutoloader;
/** @var bool */
private static $polyfillsLoaded = false;
final public static function loadClass(string $class): void {
if (!extension_loaded('phar') || defined('__PHPSTAN_RUNNING__')) {
return;
@@ -21,12 +26,9 @@ final class PharAutoloader
if (self::$composerAutoloader === null) {
self::$composerAutoloader = require 'phar://' . __DIR__ . '/phpstan.phar/vendor/autoload.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/clue/block-react/src/functions_include.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/jetbrains/phpstorm-stubs/PhpStormStubsMap.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise-stream/src/functions_include.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise-timer/src/functions_include.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/async/src/functions_include.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/react/promise/src/functions_include.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/ringcentral/psr7/src/functions_include.php';
}
self::$composerAutoloader->loadClass($class);
@@ -40,6 +42,79 @@ final class PharAutoloader
throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.');
}
if (!self::$polyfillsLoaded) {
self::$polyfillsLoaded = true;
if (
PHP_VERSION_ID < 80000
&& empty($GLOBALS['__composer_autoload_files']['a4a119a56e50fbb293281d9a48007e0e'])
&& !class_exists(\Symfony\Polyfill\Php80\Php80::class, false)
) {
$GLOBALS['__composer_autoload_files']['a4a119a56e50fbb293281d9a48007e0e'] = true;
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php80/Php80.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php80/bootstrap.php';
}
if (
empty($GLOBALS['__composer_autoload_files']['0e6d7bf4a5811bfa5cf40c5ccd6fae6a'])
&& !class_exists(\Symfony\Polyfill\Mbstring\Mbstring::class, false)
) {
$GLOBALS['__composer_autoload_files']['0e6d7bf4a5811bfa5cf40c5ccd6fae6a'] = true;
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-mbstring/Mbstring.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-mbstring/bootstrap.php';
}
if (
empty($GLOBALS['__composer_autoload_files']['e69f7f6ee287b969198c3c9d6777bd38'])
&& !class_exists(\Symfony\Polyfill\Intl\Normalizer\Normalizer::class, false)
) {
$GLOBALS['__composer_autoload_files']['e69f7f6ee287b969198c3c9d6777bd38'] = true;
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-intl-normalizer/Normalizer.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-intl-normalizer/bootstrap.php';
}
if (
PHP_VERSION_ID < 70300
&& empty($GLOBALS['__composer_autoload_files']['0d59ee240a4cd96ddbb4ff164fccea4d'])
&& !class_exists(\Symfony\Polyfill\Php73\Php73::class, false)
) {
$GLOBALS['__composer_autoload_files']['0d59ee240a4cd96ddbb4ff164fccea4d'] = true;
// already loaded by bootstrap inside the hrtime condition
// require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php73/Php73.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php73/bootstrap.php';
}
if (
PHP_VERSION_ID < 70400
&& empty($GLOBALS['__composer_autoload_files']['b686b8e46447868025a15ce5d0cb2634'])
&& !class_exists(\Symfony\Polyfill\Php74\Php74::class, false)
) {
$GLOBALS['__composer_autoload_files']['b686b8e46447868025a15ce5d0cb2634'] = true;
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php74/Php74.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php74/bootstrap.php';
}
if (
!extension_loaded('intl')
&& empty($GLOBALS['__composer_autoload_files']['8825ede83f2f289127722d4e842cf7e8'])
&& !class_exists(\Symfony\Polyfill\Intl\Grapheme\Grapheme::class, false)
) {
$GLOBALS['__composer_autoload_files']['8825ede83f2f289127722d4e842cf7e8'] = true;
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-intl-grapheme/Grapheme.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-intl-grapheme/bootstrap.php';
}
if (
PHP_VERSION_ID < 80100
&& empty ($GLOBALS['__composer_autoload_files']['23c18046f52bef3eea034657bafda50f'])
&& !class_exists(\Symfony\Polyfill\Php81\Php81::class, false)
) {
$GLOBALS['__composer_autoload_files']['23c18046f52bef3eea034657bafda50f'] = true;
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php81/Php81.php';
require_once 'phar://' . __DIR__ . '/phpstan.phar/vendor/symfony/polyfill-php81/bootstrap.php';
}
}
$filename = str_replace('\\', DIRECTORY_SEPARATOR, $class);
if (strpos($class, 'PHPStan\\BetterReflection\\') === 0) {
$filename = substr($filename, strlen('PHPStan\\BetterReflection\\'));
+9 -6
View File
@@ -2,8 +2,9 @@
"name": "phpstan/phpstan",
"description": "PHPStan - PHP Static Analysis Tool",
"license": ["MIT"],
"keywords": ["dev", "static analysis"],
"require": {
"php": "^7.1|^8.0"
"php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -12,12 +13,14 @@
"phpstan",
"phpstan.phar"
],
"extra": {
"branch-alias": {
"dev-master": "0.12-dev"
}
},
"autoload": {
"files": ["bootstrap.php"]
},
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"forum": "https://github.com/phpstan/phpstan/discussions",
"source": "https://github.com/phpstan/phpstan-src",
"docs": "https://phpstan.org/user-guide/getting-started",
"security": "https://github.com/phpstan/phpstan/security/policy"
}
}
Binary file not shown.
+13 -13
View File
@@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmNg7EcACgkQzxoQjQ56
5yAk8g/+LNhE/tYkdGT+j2hnQVx6EWFoKo3yEy1ZzPH3PZ+ks1q1s2AuNDZ9/C2w
gjFPOdQnFhxK6NpchA4g9KH7Av4eahaWMBnN/C2zfKsCTnx8XlPlZQarfUYNZ+hH
bR/UAytQrWV4phArauctQLqbuqw7ezRHceR+48KrDh7DK/+KAfzpuj/5MbFoZcDa
b17g1wogQ3LxXAoSW74i1XKWxzMPV5uk49Mn9BXI6BIf+5WyIen5/NUG5sl0W2zJ
X+YELla6TqUff+FtgK8QTG24Tza+M5WcS8DRrs7/tI3IciXa23Ier/ZuvyfYmrVf
GD/BWlnJe9S8gM/x/p3xccmMHGBr93vX9xgez7h6TTrynvhgfMoPYbvTspR3Fhqw
8MLLp0S+5HCNF+BU5u+K+B3Em3kMz28kthAlADvjG9361SDiQGtVcQTW8F/Yd/vP
BPtIMQdzl9VITU81t8nbS6TusltMZ5GUGtzPu5MrmOqe4zTGGiEBE277ubhdRv7n
2l0FLNXwoe3CliL2C1+2eyvtB1fkKyYxEF7IQ+IdTBDhRCvbx5tkaqz3UTTY+h7T
lGWtv0JR10WaK4as5liPUMf1EtvoOZSIU5WMOJMZJMABXxkOfBd+OFwBHZBaxm6Q
5EF9RKWwUAkqk0MIO9I1D0GHVbLS8H+ajxGyFuIphCE1c0Lg7QM=
=eTuG
iQIzBAABCgAdFiEEynwsejDI6OEnSoR2UcZzBf/C5cAFAmd6tdcACgkQUcZzBf/C
5cBrxg//cdUi9fwIVaZJmYz2L9JmQ+/sG8LvaOhb6kfHv4tU0yhli7ugBtOyZWRe
kNmMBFSeF/DMtw/Jf5IXbdnxjbnHcaKzKVeGGXIWQ6+4dmhQ+iApAywaasmAGSwS
jQKX5z1+FTScy0LYL6wDVJR/A3OTIAyFBj87rdNK20mB+twKzxM69jc5OPFLo8An
yzEZRWiibgewkf2BF9ryoC5iNRBJh7rc/zVj7uf57I/uyRhmPce0WXjBdwn5YIbS
8jcWql5x9H1mxjF8oyJf1cLy1sRcZbmG6NlG1Mj1SwtJxiKblb1G8jmpAhwGXw1W
M0TsGxhz5nbAHPd1yQTzFgrf4hljGWDdwznYZm7Yf93bp4ANKqLKJ8Uv8VNGsDU1
V5t49nnlPR6CFr+Tt52KWgRDUVIqZkObpy8XXl9gutah30+UjS06OgmQwjagspBg
zisT7ZKnpwC50l3strW0nS8fdgVhsOO7c++Zuyo0rRj7PBrKF2Hvy4S5jiRhBkP4
VAjyBVyTW1xfbwp5FgmD9HTRodYj0rLblV4JKR+qkS6QVt1JWSafwVl7RQJ1Wywb
kPoNv2dG9rMxXXXpidtWC56UwGFz4vvUBK0N5DbxOtVu9Sdl0B/U17Trp4myNXWP
qTeneOEVDJ3OD7s8Dxnz4GYOmPGvICy4RPR+kE8tFRQae6OU/dM=
=9uT3
-----END PGP SIGNATURE-----