Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use composer/package-versions-deprecated instead of ocramius/package-versions #3846

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"felixfbecker/language-server-protocol": "^1.4",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0",
"nikic/php-parser": "^4.3",
"ocramius/package-versions": "^1.2",
"composer/package-versions-deprecated": "^1.8.0",
"openlss/lib-array2xml": "^1.0",
"sebastian/diff": "^3.0 || ^4.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
Expand Down
5 changes: 5 additions & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
<referencedMethod name="PhpParser\Comment::getLine" />
</errorLevel>
</DeprecatedMethod>
<DeprecatedClass>
<errorLevel type="suppress">
<referencedClass name="PackageVersions\Versions"/>
</errorLevel>
</DeprecatedClass>

<UnusedParam>
<errorLevel type="suppress">
Expand Down
4 changes: 4 additions & 0 deletions tests/fixtures/SuicidalAutoloader/autoloader.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<?php

use React\Promise\PromiseInterface as ReactPromise;
use ResourceBundle;
use Transliterator;
use Composer\InstalledVersions;

spl_autoload_register(function (string $className) {
$knownBadClasses = [
ReactPromise::class, // amphp/amp
ResourceBundle::class, // symfony/polyfill-php73
Transliterator::class, // symfony/string
InstalledVersions::class, // composer v2
// it's unclear why Psalm tries to autoload parent
'parent',
];
Expand Down