Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 814d8d4

Browse files
authored
Merge pull request #10802 from greg0ire/psalm-5-13
Upgrade to Psalm 5.13
2 parents b17e52b + dc41195 commit 814d8d4

6 files changed

Lines changed: 14 additions & 26 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
5050
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
5151
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
52-
"vimeo/psalm": "4.30.0 || 5.12.0"
52+
"vimeo/psalm": "4.30.0 || 5.13.0"
5353
},
5454
"conflict": {
5555
"doctrine/annotations": "<1.13 || >= 3.0"

lib/Doctrine/ORM/Mapping/Driver/AttributeDriver.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use function constant;
2424
use function defined;
2525
use function get_class;
26-
use function sprintf;
2726

2827
use const PHP_VERSION_ID;
2928

@@ -56,10 +55,10 @@ class AttributeDriver extends CompatibilityAnnotationDriver
5655
public function __construct(array $paths)
5756
{
5857
if (PHP_VERSION_ID < 80000) {
59-
throw new LogicException(sprintf(
58+
throw new LogicException(
6059
'The attribute metadata driver cannot be enabled on PHP 7. Please upgrade to PHP 8 or choose a different'
6160
. ' metadata driver.'
62-
));
61+
);
6362
}
6463

6564
$this->reader = new AttributeReader();

lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,25 @@ class XmlDriver extends FileDriver
5050
public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION, bool $isXsdValidationEnabled = false)
5151
{
5252
if (! extension_loaded('simplexml')) {
53-
throw new LogicException(sprintf(
53+
throw new LogicException(
5454
'The XML metadata driver cannot be enabled because the SimpleXML PHP extension is missing.'
5555
. ' Please configure PHP with SimpleXML or choose a different metadata driver.'
56-
));
56+
);
5757
}
5858

5959
if (! $isXsdValidationEnabled) {
6060
Deprecation::trigger(
6161
'doctrine/orm',
6262
'https://github.com/doctrine/orm/pull/6728',
63-
sprintf(
64-
'Using XML mapping driver with XSD validation disabled is deprecated'
65-
. ' and will not be supported in Doctrine ORM 3.0.'
66-
)
63+
'Using XML mapping driver with XSD validation disabled is deprecated'
64+
. ' and will not be supported in Doctrine ORM 3.0.'
6765
);
6866
}
6967

7068
if ($isXsdValidationEnabled && ! extension_loaded('dom')) {
71-
throw new LogicException(sprintf(
69+
throw new LogicException(
7270
'XSD validation cannot be enabled because the DOM extension is missing.'
73-
));
71+
);
7472
}
7573

7674
$this->isXsdValidationEnabled = $isXsdValidationEnabled;

lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENS
4848
);
4949

5050
if (! class_exists(Yaml::class)) {
51-
throw new LogicException(sprintf(
51+
throw new LogicException(
5252
'The YAML metadata driver cannot be enabled because the "symfony/yaml" library'
5353
. ' is not installed. Please run "composer require symfony/yaml" or choose a different'
5454
. ' metadata driver.'
55-
));
55+
);
5656
}
5757

5858
parent::__construct($locator, $fileExtension);

lib/Doctrine/ORM/ORMSetup.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use function class_exists;
2525
use function extension_loaded;
2626
use function md5;
27-
use function sprintf;
2827
use function sys_get_temp_dir;
2928

3029
final class ORMSetup
@@ -72,11 +71,11 @@ public static function createDefaultAnnotationDriver(
7271
__METHOD__
7372
);
7473
if (! class_exists(AnnotationReader::class)) {
75-
throw new LogicException(sprintf(
74+
throw new LogicException(
7675
'The annotation metadata driver cannot be enabled because the "doctrine/annotations" library'
7776
. ' is not installed. Please run "composer require doctrine/annotations" or choose a different'
7877
. ' metadata driver.'
79-
));
78+
);
8079
}
8180

8281
$reader = new AnnotationReader();

psalm-baseline.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.12.0@f90118cdeacd0088e7215e64c0c99ceca819e176">
2+
<files psalm-version="5.13.0@a0a9c27630bcf8301ee78cb06741d2907d8c9fef">
33
<file src="lib/Doctrine/ORM/AbstractQuery.php">
44
<DeprecatedClass>
55
<code>IterableResult</code>
@@ -213,11 +213,6 @@
213213
<code>CacheProvider</code>
214214
</MoreSpecificReturnType>
215215
</file>
216-
<file src="lib/Doctrine/ORM/Cache/Region/FileLockRegion.php">
217-
<ArgumentTypeCoercion>
218-
<code><![CDATA[sprintf('%s/*.%s', $this->directory, self::LOCK_EXTENSION)]]></code>
219-
</ArgumentTypeCoercion>
220-
</file>
221216
<file src="lib/Doctrine/ORM/Cache/RegionsConfiguration.php">
222217
<RedundantCastGivenDocblockType>
223218
<code>(int) $defaultLifetime</code>
@@ -2456,9 +2451,6 @@
24562451
</MissingTemplateParam>
24572452
</file>
24582453
<file src="lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php">
2459-
<ArgumentTypeCoercion>
2460-
<code><![CDATA[$path . '/*.yml']]></code>
2461-
</ArgumentTypeCoercion>
24622454
<PossiblyUndefinedArrayOffset>
24632455
<code><![CDATA[$column['type']]]></code>
24642456
</PossiblyUndefinedArrayOffset>

0 commit comments

Comments
 (0)