diff --git a/.gitattributes b/.gitattributes
index 1b71dc4e5b3..cec212e0701 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -19,5 +19,3 @@ phpstan-baseline.neon export-ignore
phpstan-dbal2.neon export-ignore
phpstan-params.neon export-ignore
phpstan-persistence2.neon export-ignore
-psalm.xml export-ignore
-psalm-baseline.xml export-ignore
diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml
index 12edb5facc9..9fc2664859c 100644
--- a/.github/workflows/coding-standards.yml
+++ b/.github/workflows/coding-standards.yml
@@ -24,4 +24,4 @@ on:
jobs:
coding-standards:
- uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.3.0"
+ uses: "doctrine/.github/.github/workflows/coding-standards.yml@6.0.0"
diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
index 6ef2b0bb59b..84bf616c873 100644
--- a/.github/workflows/documentation.yml
+++ b/.github/workflows/documentation.yml
@@ -17,4 +17,4 @@ on:
jobs:
documentation:
name: "Documentation"
- uses: "doctrine/.github/.github/workflows/documentation.yml@5.3.0"
+ uses: "doctrine/.github/.github/workflows/documentation.yml@6.0.0"
diff --git a/.github/workflows/release-on-milestone-closed.yml b/.github/workflows/release-on-milestone-closed.yml
index 1b53878b22e..0a35bee6617 100644
--- a/.github/workflows/release-on-milestone-closed.yml
+++ b/.github/workflows/release-on-milestone-closed.yml
@@ -7,7 +7,7 @@ on:
jobs:
release:
- uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.3.0"
+ uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@6.0.0"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index 52f30872a9c..94448e0bd3a 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -9,7 +9,6 @@ on:
- composer.*
- src/**
- phpstan*
- - psalm*
- tests/StaticAnalysis/**
push:
branches:
@@ -19,7 +18,6 @@ on:
- composer.*
- src/**
- phpstan*
- - psalm*
- tests/StaticAnalysis/**
jobs:
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
deleted file mode 100644
index cef61546b74..00000000000
--- a/psalm-baseline.xml
+++ /dev/null
@@ -1,1244 +0,0 @@
-
-
-
-
- isEmpty() ? $filteredParameters->first() : null]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getConfiguration()
- ->getSecondLevelCacheConfiguration()
- ->getCacheFactory()]]>
-
-
-
-
-
-
-
-
-
-
-
-
- identifiers[$assocIndex]]]>
- identifiers[$assocIndex]]]>
- identifiers[$index]]]>
- identifiers[$index]]]>
-
-
- class]]>
- class]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- identifiers]]>
-
-
- getOwner()]]>
-
-
-
-
-
-
-
-
- getOwner()]]>
- getOwner()]]>
-
-
-
-
- getOwner()]]>
-
-
-
-
- getOwner()]]>
- getOwner()]]>
-
-
-
-
-
-
-
-
-
-
-
- class]]>
-
-
- getOwner()]]>
- getOwner()]]>
-
-
- getCache()]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- time]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- name ? $entity : null]]>
- load($sortedId, null, null, [], $lockMode)]]>
- loadById($sortedId)]]>
- metadataFactory]]>
-
-
-
-
-
- getProxyDir()]]>
- getProxyNamespace()]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- load($criteria, null, null, [], null, 1, $orderBy)]]>
-
-
-
- &Selectable]]>
-
-
-
- loadAll($criteria, $orderBy, $limit, $offset)]]>
-
-
- ]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- resultPointers[$parent]]]>
-
-
- resultPointers[$parent][key($first)]]]>
- resultPointers[$dqlAlias] =& $coll[array_key_last($coll)]]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- columnNames]]>
- columnNames]]>
- columnNames]]>
- columnNames]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- declaredField]]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- reflClass]]>
-
-
-
-
-
- table]]>
- table]]>
-
-
-
-
-
-
-
-
-
-
- table[$indexType][$indexName]]]>
-
-
- table[$indexType]]]>
-
-
- em]]>
- em]]>
-
-
-
-
-
-
-
-
-
-
-
-
- generatorType]]>
- idGenerator]]>
-
-
-
-
-
-
-
-
-
-
- instances]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $seqGeneratorAttribute->sequenceName,
- 'allocationSize' => $seqGeneratorAttribute->allocationSize,
- 'initialValue' => $seqGeneratorAttribute->initialValue,
- ]]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getReflectionClass()]]>
-
-
-
-
-
-
-
-
- name)]]>
-
-
-
-
-
-
-
-
-
-
- tables[$tableName]]]>
- tables[$tableName]]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- cacheToArray($manyToManyElement->cache)]]>
- cacheToArray($manyToOneElement->cache)]]>
- cacheToArray($oneToManyElement->cache)]]>
- cacheToArray($oneToOneElement->cache)]]>
-
-
- table]]>
-
-
-
- $usage,
- 'region' => $region,
- ]]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- mappedBy)]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]]>
-
-
- fetch === ClassMetadata::FETCH_EXTRA_LAZY
- ? new LazyCriteriaCollection($persister, $criteria)
- : new ArrayCollection($persister->loadCriteria($criteria))]]>
- em->find($this->typeClass->name, $key)]]>
-
-
- ]]>
-
-
- unwrap()->matching($criteria)]]>
-
-
-
-
-
-
- backRefFieldName]]>
-
-
-
-
-
-
- unwrap(), 'add']]]>
-
-
-
-
- getOwner()]]>
- getOwner()]]>
- getOwner()]]>
- getOwner()]]>
- getOwner()]]>
- getOwner()]]>
- getOwner()]]>
-
-
-
-
-
-
-
-
-
- getOwner()]]>
- getOwner()]]>
- getOwner()]]>
-
-
-
-
-
-
-
-
-
- true]]]>
- true]]]>
- true]]]>
-
-
-
-
-
-
-
-
-
- ]]>
-
-
-
-
-
-
-
-
-
-
-
- currentPersisterContext->sqlTableAliases]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- proxyFactories]]>
-
-
- isEmbeddedClass]]>
- isMappedSuperclass]]>
-
-
- proxyFactories[$className] = $proxyFactory]]>
-
-
-
-
-
-
-
-
-
- 4]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
- getDQL()]]>
-
-
-
-
-
-
-
-
-
-
- ArithmeticPrimary()]]>
- ArithmeticPrimary()]]>
-
-
-
-
- ArithmeticPrimary()]]>
- ArithmeticPrimary()]]>
-
-
-
-
- ArithmeticPrimary()]]>
- ArithmeticPrimary()]]>
-
-
- unit->value]]>
-
-
-
-
- ArithmeticPrimary()]]>
- ArithmeticPrimary()]]>
-
-
-
-
- unit->value]]>
-
-
-
-
-
-
-
-
-
- simpleArithmeticExpression]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sqlStatements]]>
-
-
-
-
-
- sqlStatements]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
- sqlStatements]]>
-
-
-
-
- sqlStatements]]>
-
-
-
-
- executeStatement($this->sqlStatements, $params, $types)]]>
-
-
-
-
-
- sqlStatements]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
- arguments]]>
-
-
- ]]>
-
-
-
-
-
-
-
-
-
- conditionType]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- parameters]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
- queryComponents]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- lexer->getLiteral($token)]]>
- lexer->getLiteral($token)]]>
- lexer->getLiteral($token)]]>
-
-
-
- query->getDQL()]]>
- value]]>
-
-
- value]]>
- value]]>
- lexer->glimpse()->type]]>
- value]]>
- value]]>
-
-
- value === TokenType::T_IDENTIFIER->value]]>
-
-
-
-
- parameters)]]>
-
-
- ]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
- simpleArithmeticExpression]]>
- subselect]]>
-
- rangeVariableDeclaration]]>
- caseOperand]]>
-
-
- scalarResultAliasMap]]>
- scalarResultAliasMap]]>
-
-
-
-
-
-
-
- $join]]]>
- $join]]]>
-
-
-
-
-
-
- isEmpty() ? $filteredParameters->first() : null]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- repositoryList[$repositoryHash] ??= $this->createRepository($entityManager, $entityName)]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- name]]>
-
-
- getConfiguration()->getProxyDir()]]>
-
-
-
-
-
-
-
-
-
- entityListeners]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getName()]]>
- getName()]]>
-
-
-
-
-
-
-
- getName()]]>
- getName()]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getSqlStatements()]]>
-
-
-
-
-
-
-
-
- orderByItems]]>
-
-
- orderByClause]]>
-
-
- orderByItems]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- entityChangeSets]]>
- entityChangeSets]]>
-
-
-
-
-
-
-
-
-
- identityMap[$rootClassName]]]>
-
-
- getTypeOfField($class->getSingleIdentifierFieldName())]]>
- getOwner()]]>
- getOwner()]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- name]]>
- subClasses]]>
-
-
-
diff --git a/psalm.xml b/psalm.xml
deleted file mode 100644
index b399821aa34..00000000000
--- a/psalm.xml
+++ /dev/null
@@ -1,246 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/AbstractQuery.php b/src/AbstractQuery.php
index 0ff92c30089..62862e9a915 100644
--- a/src/AbstractQuery.php
+++ b/src/AbstractQuery.php
@@ -83,7 +83,7 @@ abstract class AbstractQuery
* The parameter map of this query.
*
* @var ArrayCollection|Parameter[]
- * @psalm-var ArrayCollection
+ * @phpstan-var ArrayCollection
*/
protected ArrayCollection $parameters;
@@ -95,14 +95,14 @@ abstract class AbstractQuery
/**
* The map of query hints.
*
- * @psalm-var array
+ * @phpstan-var array
*/
protected array $hints = [];
/**
* The hydration mode.
*
- * @psalm-var string|AbstractQuery::HYDRATE_*
+ * @phpstan-var string|AbstractQuery::HYDRATE_*
*/
protected string|int $hydrationMode = self::HYDRATE_OBJECT;
@@ -130,7 +130,7 @@ abstract class AbstractQuery
/**
* Second level query cache mode.
*
- * @psalm-var Cache::MODE_*|null
+ * @phpstan-var Cache::MODE_*|null
*/
protected int|null $cacheMode = null;
@@ -217,14 +217,14 @@ public function setLifetime(int $lifetime): static
return $this;
}
- /** @psalm-return Cache::MODE_*|null */
+ /** @phpstan-return Cache::MODE_*|null */
public function getCacheMode(): int|null
{
return $this->cacheMode;
}
/**
- * @psalm-param Cache::MODE_* $cacheMode
+ * @phpstan-param Cache::MODE_* $cacheMode
*
* @return $this
*/
@@ -267,7 +267,7 @@ public function free(): void
/**
* Get all defined parameters.
*
- * @psalm-return ArrayCollection
+ * @phpstan-return ArrayCollection
*/
public function getParameters(): ArrayCollection
{
@@ -296,14 +296,14 @@ public function getParameter(int|string $key): Parameter|null
* Sets a collection of query parameters.
*
* @param ArrayCollection|mixed[] $parameters
- * @psalm-param ArrayCollection|mixed[] $parameters
+ * @phpstan-param ArrayCollection|mixed[] $parameters
*
* @return $this
*/
public function setParameters(ArrayCollection|array $parameters): static
{
if (is_array($parameters)) {
- /** @psalm-var ArrayCollection $parameterCollection */
+ /** @phpstan-var ArrayCollection $parameterCollection */
$parameterCollection = new ArrayCollection();
foreach ($parameters as $key => $value) {
@@ -642,7 +642,7 @@ public function getQueryCacheProfile(): QueryCacheProfile|null
* Change the default fetch mode of an association for this query.
*
* @param class-string $class
- * @psalm-param Mapping\ClassMetadata::FETCH_EAGER|Mapping\ClassMetadata::FETCH_LAZY $fetchMode
+ * @phpstan-param Mapping\ClassMetadata::FETCH_EAGER|Mapping\ClassMetadata::FETCH_LAZY $fetchMode
*/
public function setFetchMode(string $class, string $assocName, int $fetchMode): static
{
@@ -656,7 +656,7 @@ public function setFetchMode(string $class, string $assocName, int $fetchMode):
*
* @param string|int $hydrationMode Doctrine processing mode to be used during hydration process.
* One of the Query::HYDRATE_* constants.
- * @psalm-param string|AbstractQuery::HYDRATE_* $hydrationMode
+ * @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode
*
* @return $this
*/
@@ -670,7 +670,7 @@ public function setHydrationMode(string|int $hydrationMode): static
/**
* Gets the hydration mode currently used by the query.
*
- * @psalm-return string|AbstractQuery::HYDRATE_*
+ * @phpstan-return string|AbstractQuery::HYDRATE_*
*/
public function getHydrationMode(): string|int
{
@@ -682,7 +682,7 @@ public function getHydrationMode(): string|int
*
* Alias for execute(null, $hydrationMode = HYDRATE_OBJECT).
*
- * @psalm-param string|AbstractQuery::HYDRATE_* $hydrationMode
+ * @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode
*/
public function getResult(string|int $hydrationMode = self::HYDRATE_OBJECT): mixed
{
@@ -728,7 +728,7 @@ public function getScalarResult(): array
/**
* Get exactly one result or null.
*
- * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+ * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
*
* @throws NonUniqueResultException
*/
@@ -763,7 +763,7 @@ public function getOneOrNullResult(string|int|null $hydrationMode = null): mixed
* If the result is not unique, a NonUniqueResultException is thrown.
* If there is no result, a NoResultException is thrown.
*
- * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+ * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
*
* @throws NonUniqueResultException If the query result is not unique.
* @throws NoResultException If the query returned no result.
@@ -843,8 +843,8 @@ public function getHints(): array
* Executes the query and returns an iterable that can be used to incrementally
* iterate over the result.
*
- * @psalm-param ArrayCollection|mixed[] $parameters
- * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+ * @phpstan-param ArrayCollection|mixed[] $parameters
+ * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
*
* @return iterable
*/
@@ -877,8 +877,8 @@ public function toIterable(
/**
* Executes the query.
*
- * @psalm-param ArrayCollection|mixed[]|null $parameters
- * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+ * @phpstan-param ArrayCollection|mixed[]|null $parameters
+ * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
*/
public function execute(
ArrayCollection|array|null $parameters = null,
@@ -894,8 +894,8 @@ public function execute(
/**
* Execute query ignoring second level cache.
*
- * @psalm-param ArrayCollection|mixed[]|null $parameters
- * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+ * @phpstan-param ArrayCollection|mixed[]|null $parameters
+ * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
*/
private function executeIgnoreQueryCache(
ArrayCollection|array|null $parameters = null,
@@ -965,8 +965,8 @@ private function getHydrationCache(): CacheItemPoolInterface
/**
* Load from second level cache or executes the query and put into cache.
*
- * @psalm-param ArrayCollection|mixed[]|null $parameters
- * @psalm-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
+ * @phpstan-param ArrayCollection|mixed[]|null $parameters
+ * @phpstan-param string|AbstractQuery::HYDRATE_*|null $hydrationMode
*/
private function executeUsingQueryCache(
ArrayCollection|array|null $parameters = null,
@@ -1029,7 +1029,7 @@ private function getTimestampKey(): TimestampCacheKey|null
* automatically generated for you.
*
* @return string[] ($key, $hash)
- * @psalm-return array{string, string} ($key, $hash)
+ * @phpstan-return array{string, string} ($key, $hash)
*/
protected function getHydrationCacheId(): array
{
diff --git a/src/Cache/DefaultCache.php b/src/Cache/DefaultCache.php
index 685181c906e..3f947cf773b 100644
--- a/src/Cache/DefaultCache.php
+++ b/src/Cache/DefaultCache.php
@@ -25,7 +25,7 @@ class DefaultCache implements Cache
/**
* @var QueryCache[]
- * @psalm-var array
+ * @phpstan-var array
*/
private array $queryCaches = [];
diff --git a/src/Cache/DefaultQueryCache.php b/src/Cache/DefaultQueryCache.php
index 08e703cd4b0..bf0cbc1b362 100644
--- a/src/Cache/DefaultQueryCache.php
+++ b/src/Cache/DefaultQueryCache.php
@@ -297,7 +297,7 @@ public function put(QueryCacheKey $key, ResultSetMapping $rsm, mixed $result, ar
/**
* @return mixed[]|null
- * @psalm-return array{targetEntity: class-string, type: mixed, list?: array[], identifier?: array}|null
+ * @phpstan-return array{targetEntity: class-string, type: mixed, list?: array[], identifier?: array}|null
*/
private function storeAssociationCache(QueryCacheKey $key, AssociationMapping $assoc, mixed $assocValue): array|null
{
@@ -348,7 +348,7 @@ private function storeAssociationCache(QueryCacheKey $key, AssociationMapping $a
];
}
- /** @psalm-return list|object|null */
+ /** @phpstan-return list|object|null */
private function getAssociationValue(
ResultSetMapping $rsm,
string $assocAlias,
@@ -374,9 +374,9 @@ private function getAssociationValue(
}
/**
- * @psalm-param array $path
+ * @phpstan-param array $path
*
- * @psalm-return list|object|null
+ * @phpstan-return list|object|null
*/
private function getAssociationPathValue(mixed $value, array $path): array|object|null
{
diff --git a/src/Configuration.php b/src/Configuration.php
index 59ddb214d8a..361d146a50b 100644
--- a/src/Configuration.php
+++ b/src/Configuration.php
@@ -41,16 +41,16 @@ class Configuration extends \Doctrine\DBAL\Configuration
/** @var mixed[] */
protected array $attributes = [];
- /** @psalm-var array, ClassMetadata::GENERATOR_TYPE_*> */
+ /** @phpstan-var array, ClassMetadata::GENERATOR_TYPE_*> */
private $identityGenerationPreferences = [];
- /** @psalm-param array, ClassMetadata::GENERATOR_TYPE_*> $value */
+ /** @phpstan-param array, ClassMetadata::GENERATOR_TYPE_*> $value */
public function setIdentityGenerationPreferences(array $value): void
{
$this->identityGenerationPreferences = $value;
}
- /** @psalm-return array, ClassMetadata::GENERATOR_TYPE_*> $value */
+ /** @phpstan-return array, ClassMetadata::GENERATOR_TYPE_*> $value */
public function getIdentityGenerationPreferences(): array
{
return $this->identityGenerationPreferences;
@@ -122,7 +122,7 @@ public function setMetadataDriverImpl(MappingDriver $driverImpl): void
/**
* Sets the entity alias map.
*
- * @psalm-param array $entityNamespaces
+ * @phpstan-param array $entityNamespaces
*/
public function setEntityNamespaces(array $entityNamespaces): void
{
@@ -132,7 +132,7 @@ public function setEntityNamespaces(array $entityNamespaces): void
/**
* Retrieves the list of registered entity namespace aliases.
*
- * @psalm-return array
+ * @phpstan-return array
*/
public function getEntityNamespaces(): array
{
@@ -191,7 +191,7 @@ public function setMetadataCache(CacheItemPoolInterface $cache): void
* DQL function names are case-insensitive.
*
* @param class-string|callable $className Class name or a callable that returns the function.
- * @psalm-param class-string|callable(string):FunctionNode $className
+ * @phpstan-param class-string|callable(string):FunctionNode $className
*/
public function addCustomStringFunction(string $name, string|callable $className): void
{
@@ -201,7 +201,7 @@ public function addCustomStringFunction(string $name, string|callable $className
/**
* Gets the implementation class name of a registered custom string DQL function.
*
- * @psalm-return class-string|callable(string):FunctionNode|null
+ * @phpstan-return class-string|callable(string):FunctionNode|null
*/
public function getCustomStringFunction(string $name): string|callable|null
{
@@ -218,7 +218,7 @@ public function getCustomStringFunction(string $name): string|callable|null
*
* Any previously added string functions are discarded.
*
- * @psalm-param array|callable(string):FunctionNode> $functions The map of custom
+ * @phpstan-param array|callable(string):FunctionNode> $functions The map of custom
* DQL string functions.
*/
public function setCustomStringFunctions(array $functions): void
@@ -236,7 +236,7 @@ public function setCustomStringFunctions(array $functions): void
* DQL function names are case-insensitive.
*
* @param class-string|callable $className Class name or a callable that returns the function.
- * @psalm-param class-string|callable(string):FunctionNode $className
+ * @phpstan-param class-string|callable(string):FunctionNode $className
*/
public function addCustomNumericFunction(string $name, string|callable $className): void
{
@@ -246,7 +246,7 @@ public function addCustomNumericFunction(string $name, string|callable $classNam
/**
* Gets the implementation class name of a registered custom numeric DQL function.
*
- * @psalm-return ?class-string|callable(string):FunctionNode
+ * @phpstan-return class-string|callable(string):FunctionNode|null
*/
public function getCustomNumericFunction(string $name): string|callable|null
{
@@ -281,7 +281,7 @@ public function setCustomNumericFunctions(array $functions): void
* DQL function names are case-insensitive.
*
* @param string|callable $className Class name or a callable that returns the function.
- * @psalm-param class-string|callable(string):FunctionNode $className
+ * @phpstan-param class-string|callable(string):FunctionNode $className
*/
public function addCustomDatetimeFunction(string $name, string|callable $className): void
{
@@ -309,7 +309,7 @@ public function getCustomDatetimeFunction(string $name): string|callable|null
* Any previously added date/time functions are discarded.
*
* @param array $functions The map of custom DQL date/time functions.
- * @psalm-param array|callable(string):FunctionNode> $functions
+ * @phpstan-param array|callable(string):FunctionNode> $functions
*/
public function setCustomDatetimeFunctions(array $functions): void
{
@@ -538,7 +538,7 @@ public function getSecondLevelCacheConfiguration(): CacheConfiguration|null
/**
* Returns query hints, which will be applied to every query in application
*
- * @psalm-return array
+ * @phpstan-return array
*/
public function getDefaultQueryHints(): array
{
@@ -548,7 +548,7 @@ public function getDefaultQueryHints(): array
/**
* Sets array of query hints, which will be applied to every query in application
*
- * @psalm-param array $defaultQueryHints
+ * @phpstan-param array $defaultQueryHints
*/
public function setDefaultQueryHints(array $defaultQueryHints): void
{
diff --git a/src/EntityManager.php b/src/EntityManager.php
index 5324d9cac7b..06b34689abf 100644
--- a/src/EntityManager.php
+++ b/src/EntityManager.php
@@ -586,7 +586,7 @@ public function hasFilters(): bool
}
/**
- * @psalm-param LockMode::* $lockMode
+ * @phpstan-param LockMode::* $lockMode
*
* @throws OptimisticLockException
* @throws TransactionRequiredException
diff --git a/src/EntityManagerInterface.php b/src/EntityManagerInterface.php
index d4c64ef06dc..03dbdbbea19 100644
--- a/src/EntityManagerInterface.php
+++ b/src/EntityManagerInterface.php
@@ -71,10 +71,10 @@ public function beginTransaction(): void;
* If an exception occurs during execution of the function or flushing or transaction commit,
* the transaction is rolled back, the EntityManager closed and the exception re-thrown.
*
- * @psalm-param callable(self): T $func The function to execute transactionally.
+ * @phpstan-param callable(self): T $func The function to execute transactionally.
*
* @return mixed The value returned from the closure.
- * @psalm-return T
+ * @phpstan-return T
*
* @template T
*/
@@ -117,11 +117,11 @@ public function createQueryBuilder(): QueryBuilder;
* during the search.
* @param int|null $lockVersion The version of the entity to find when using
* optimistic locking.
- * @psalm-param class-string $className
- * @psalm-param LockMode::*|null $lockMode
+ * @phpstan-param class-string $className
+ * @phpstan-param LockMode::*|null $lockMode
*
* @return object|null The entity instance or NULL if the entity can not be found.
- * @psalm-return T|null
+ * @phpstan-return T|null
*
* @throws OptimisticLockException
* @throws ORMInvalidArgumentException
@@ -139,7 +139,7 @@ public function find(string $className, mixed $id, LockMode|int|null $lockMode =
* @param LockMode|int|null $lockMode One of the \Doctrine\DBAL\LockMode::* constants
* or NULL if no specific lock mode should be used
* during the search.
- * @psalm-param LockMode::*|null $lockMode
+ * @phpstan-param LockMode::*|null $lockMode
*
* @throws ORMInvalidArgumentException
* @throws ORMException
@@ -172,7 +172,7 @@ public function close(): void;
/**
* Acquire a lock on the given entity.
*
- * @psalm-param LockMode::* $lockMode
+ * @phpstan-param LockMode::* $lockMode
*
* @throws OptimisticLockException
* @throws PessimisticLockException
@@ -202,7 +202,7 @@ public function getUnitOfWork(): UnitOfWork;
/**
* Create a new instance for the given hydration mode.
*
- * @psalm-param string|AbstractQuery::HYDRATE_* $hydrationMode
+ * @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode
*
* @throws ORMException
*/
@@ -233,9 +233,9 @@ public function hasFilters(): bool;
*
* @param string|class-string $className
*
- * @psalm-return ($className is class-string ? Mapping\ClassMetadata : Mapping\ClassMetadata