Skip to content

Commit

Permalink
Merge branch '3.4.x' into 4.0.x
Browse files Browse the repository at this point in the history
* 3.4.x:
  Remove composer/package-versions-deprecated (#366)
  Explictly configure new Psalm options (#365)
  Upgrade to PHPStan 1.11.1 (#364)
  Upgrade to doctrine/coding-standard v12 (#363)
  • Loading branch information
derrabus committed May 21, 2024
2 parents 01f4d56 + bea01f5 commit 3e3b9e4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 27 deletions.
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@
"psr/cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"composer/package-versions-deprecated": "^1.11",
"phpstan/phpstan": "1.9.4",
"phpstan/phpstan": "1.11.1",
"phpstan/phpstan-phpunit": "^1",
"phpstan/phpstan-strict-rules": "^1.1",
"doctrine/coding-standard": "^11",
"doctrine/coding-standard": "^12",
"doctrine/common": "^3.0",
"phpunit/phpunit": "^8.5 || ^9.5",
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
Expand Down
11 changes: 3 additions & 8 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ parameters:
count: 1
path: src/Persistence/Reflection/EnumReflectionProperty.php

-
message: "#^Method Doctrine\\\\Persistence\\\\Reflection\\\\EnumReflectionProperty\\:\\:getType\\(\\) should return ReflectionNamedType\\|ReflectionUnionType\\|null but returns ReflectionType\\|null\\.$#"
count: 1
path: src/Persistence/Reflection/EnumReflectionProperty.php

-
message: "#^Method Doctrine\\\\Persistence\\\\Reflection\\\\EnumReflectionProperty\\:\\:toEnum\\(\\) should return array\\<BackedEnum\\>\\|BackedEnum but returns array\\<BackedEnum\\|int\\|string\\>\\.$#"
count: 1
Expand All @@ -41,17 +36,17 @@ parameters:
path: tests/Persistence/Mapping/DriverChainTest.php

-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{'Foo\\\\\\\\Bar\\\\\\\\subDirClass', 'Foo\\\\\\\\global', 'Foo\\\\\\\\stdClass'\\} and array\\<int, class\\-string\\> will always evaluate to false\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{'Foo\\\\\\\\stdClass', 'Foo\\\\\\\\sub\\\\\\\\subClass', 'Foo\\\\\\\\sub\\\\\\\\subsub…'\\} and array\\<int, class\\-string\\> will always evaluate to false\\.$#"
count: 1
path: tests/Persistence/Mapping/SymfonyFileLocatorTest.php

-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{'Foo\\\\\\\\Bar\\\\\\\\subDirClass', 'Foo\\\\\\\\stdClass'\\} and array\\<int, class\\-string\\> will always evaluate to false\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with non\\-empty\\-array\\<int, 'Foo\\\\\\\\Bar\\\\\\\\subDirClass'\\|'Foo\\\\\\\\global'\\|'Foo\\\\\\\\stdClass'\\> and array\\<int, class\\-string\\> will always evaluate to false\\.$#"
count: 1
path: tests/Persistence/Mapping/SymfonyFileLocatorTest.php

-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{'Foo\\\\\\\\stdClass', 'Foo\\\\\\\\sub\\\\\\\\subClass', 'Foo\\\\\\\\sub\\\\\\\\subsub…'\\} and array\\<int, class\\-string\\> will always evaluate to false\\.$#"
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with non\\-empty\\-array\\<int, 'Foo\\\\\\\\Bar\\\\\\\\subDirClass'\\|'Foo\\\\\\\\stdClass'\\> and array\\<int, class\\-string\\> will always evaluate to false\\.$#"
count: 1
path: tests/Persistence/Mapping/SymfonyFileLocatorTest.php

Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<psalm
errorLevel="3"
phpVersion="8.1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
findUnusedPsalmSuppress="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
Expand Down
20 changes: 10 additions & 10 deletions src/Persistence/AbstractManagerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getName()
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getConnection(?string $name = null)
{
Expand All @@ -107,15 +107,15 @@ public function getConnection(?string $name = null)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getConnectionNames()
{
return $this->connections;
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getConnections()
{
Expand All @@ -128,23 +128,23 @@ public function getConnections()
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getDefaultConnectionName()
{
return $this->defaultConnection;
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getDefaultManagerName()
{
return $this->defaultManager;
}

/**
* {@inheritdoc}
* {@inheritDoc}
*
* @throws InvalidArgumentException
*/
Expand Down Expand Up @@ -195,15 +195,15 @@ public function getManagerForClass(string $class)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getManagerNames()
{
return $this->managers;
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getManagers()
{
Expand All @@ -218,7 +218,7 @@ public function getManagers()
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getRepository(
string $persistentObject,
Expand All @@ -230,7 +230,7 @@ public function getRepository(
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function resetManager(?string $name = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Persistence/Mapping/Driver/StaticPHPDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function addPaths(array $paths)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function loadMetadataForClass(string $className, ClassMetadata $metadata)
{
Expand Down Expand Up @@ -123,7 +123,7 @@ public function getAllClassNames()
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function isTransient(string $className)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Persistence/ObjectManagerDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract class ObjectManagerDecorator implements ObjectManager
protected $wrapped;

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function find(string $className, $id)
{
Expand Down Expand Up @@ -56,15 +56,15 @@ public function flush()
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getRepository(string $className)
{
return $this->wrapped->getRepository($className);
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getClassMetadata(string $className)
{
Expand All @@ -83,7 +83,7 @@ public function initializeObject(object $obj)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function contains(object $object)
{
Expand Down

0 comments on commit 3e3b9e4

Please sign in to comment.