1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Abandon humbug/box update attempt

This commit is contained in:
Matthew Brown 2022-03-07 16:57:18 -05:00
parent f0b214265c
commit a0739b1716
3 changed files with 14 additions and 43 deletions

View File

@ -35,7 +35,8 @@
"openlss/lib-array2xml": "^1.0",
"sebastian/diff": "^4.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0",
"symfony/filesystem": "^5.4 || ^6.0"
"symfony/filesystem": "^5.4 || ^6.0",
"symfony/polyfill-php80": "^1.25"
},
"provide": {
"psalm/psalm": "self.version"

View File

@ -1,27 +1,6 @@
<?php
use Isolated\Symfony\Component\Finder\Finder;
$polyfillsBootstraps = array_map(
static fn (SplFileInfo $fileInfo) => $fileInfo->getPathname(),
iterator_to_array(
Finder::create()
->files()
->in(__DIR__ . '/vendor/symfony/polyfill-*')
->name('bootstrap*.php'),
false,
),
);
$polyfillsStubs = array_map(
static fn (SplFileInfo $fileInfo) => $fileInfo->getPathname(),
iterator_to_array(
Finder::create()
->files()
->in(__DIR__ . '/vendor/symfony/polyfill-*/Resources/stubs')
->name('*.php'),
false,
),
);
use Composer\Autoload\ClassLoader;
return [
'patchers' => [
@ -90,26 +69,17 @@ return [
return $ret;
},
],
'exclude-namespaces' => [
'Symfony\Polyfill',
'Psalm',
'whitelist' => [
ClassLoader::class,
Stringable::class,
'Psalm\*',
],
'exclude-constants' => [
// Symfony global constants
// TODO: switch to the following regex once regexes are supported here
// https://github.com/humbug/php-scoper/issues/634
'/^SYMFONY\_[\p{L}_]+$/',
// Meanwhile:
'SYMFONY_GRAPHEME_CLUSTER_RX',
'PSALM_VERSION',
'PHP_PARSER_VERSION',
],
'exclude-files' => [
'files-whitelist' => [
'src/spl_object_id.php',
...$polyfillsBootstraps,
...$polyfillsStubs,
],
'expose-classes' => [
\Composer\Autoload\ClassLoader::class,
'vendor/symfony/polyfill-php80/Php80.php',
'vendor/symfony/polyfill-php80/PhpToken.php',
'vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
'vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php',
],
];

View File

@ -2,7 +2,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"humbug/box": "3.16.*"
"humbug/box": "3.10.*"
},
"config": {
"allow-plugins": {