1
0
Fork 0

Fix more phpstan errors

pull/8742/head
Jordi Boggiano 2020-04-07 14:56:39 +02:00
parent bbc4854452
commit b166ef4b58
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 5 additions and 13 deletions

View File

@ -16,17 +16,6 @@ parameters:
# ion cube is not installed # ion cube is not installed
- '~^Function ioncube_loader_\w+ not found\.$~' - '~^Function ioncube_loader_\w+ not found\.$~'
# rar is not installed
- '~^Call to static method open\(\) on an unknown class RarArchive\.$~'
# imagick is not installed
- '~^Instantiated class Imagick not found\.$~'
# windows specific constants
-
message: '~^Constant PHP_WINDOWS_VERSION_MAJOR not found\.$~'
path: '*/src/Composer/Downloader/PathDownloader.php'
-
message: '~^Constant PHP_WINDOWS_VERSION_MINOR not found\.$~'
path: '*/src/Composer/Downloader/PathDownloader.php'
# variables from global scope # variables from global scope
- '~^Undefined variable: \$vendorDir$~' - '~^Undefined variable: \$vendorDir$~'
@ -35,6 +24,9 @@ parameters:
# variable defined in eval # variable defined in eval
- '~^Undefined variable: \$res$~' - '~^Undefined variable: \$res$~'
# erroneous detection of missing const, see https://github.com/phpstan/phpstan/issues/2960
- '~^Access to undefined constant ZipArchive::LIBZIP_VERSION.$~'
# we don't have different constructors for parent/child # we don't have different constructors for parent/child
- '~^Unsafe usage of new static\(\)\.$~' - '~^Unsafe usage of new static\(\)\.$~'

View File

@ -279,9 +279,9 @@ class PoolBuilder
$loadNames[$replace] = null; $loadNames[$replace] = null;
// TODO should we try to merge constraints here? // TODO should we try to merge constraints here?
$this->nameConstraints[$replace] = null; $this->nameConstraints[$replace] = null;
} elseif (!$request->getUpdateAllowTransitiveRootDependencies() && $this->isRootRequire($request, $replace) && !isset($this->updateAllowWarned[$require])) { } elseif (!$request->getUpdateAllowTransitiveRootDependencies() && $this->isRootRequire($request, $replace) && !isset($this->updateAllowWarned[$replace])) {
$this->updateAllowWarned[$replace] = true; $this->updateAllowWarned[$replace] = true;
$this->io->writeError('<warning>Dependency "'.$require.'" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies to include root dependencies.</warning>'); $this->io->writeError('<warning>Dependency "'.$replace.'" is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies to include root dependencies.</warning>');
} }
} }
} }