diff --git a/.idea/php.xml b/.idea/php.xml
index 0e06e2ed4..e0317304f 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -108,7 +108,6 @@
-
diff --git a/.idea/symfony-flex-backend.iml b/.idea/symfony-flex-backend.iml
index 8b85ffbce..02fdfc57a 100644
--- a/.idea/symfony-flex-backend.iml
+++ b/.idea/symfony-flex-backend.iml
@@ -133,7 +133,6 @@
-
diff --git a/composer.json b/composer.json
index cf5694347..03d7e85f2 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,7 @@
"ext-random": "*",
"doctrine/doctrine-bundle": "2.13.0",
"doctrine/doctrine-migrations-bundle": "3.3.1",
- "doctrine/orm": "2.20.0",
+ "doctrine/orm": "3.3.0",
"friendsofphp/proxy-manager-lts": "1.0.18",
"gedmo/doctrine-extensions": "3.17.1",
"lexik/jwt-authentication-bundle": "3.1.0",
diff --git a/composer.lock b/composer.lock
index ae6213040..4317ec446 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "720e557a07b16c1a232c0d12388396b1",
+ "content-hash": "b0fe4000b759fac0af4f49a5df2b4804",
"packages": [
{
"name": "behat/transliterator",
@@ -387,47 +387,42 @@
},
{
"name": "doctrine/dbal",
- "version": "3.9.3",
+ "version": "4.2.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba"
+ "reference": "dadd35300837a3a2184bd47d403333b15d0a9bd0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/61446f07fcb522414d6cfd8b1c3e5f9e18c579ba",
- "reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/dadd35300837a3a2184bd47d403333b15d0a9bd0",
+ "reference": "dadd35300837a3a2184bd47d403333b15d0a9bd0",
"shasum": ""
},
"require": {
- "composer-runtime-api": "^2",
- "doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3|^1",
- "doctrine/event-manager": "^1|^2",
- "php": "^7.4 || ^8.0",
+ "php": "^8.1",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
"require-dev": {
"doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1",
- "jetbrains/phpstorm-stubs": "2023.1",
+ "jetbrains/phpstorm-stubs": "2023.2",
"phpstan/phpstan": "1.12.6",
+ "phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan-strict-rules": "^1.6",
- "phpunit/phpunit": "9.6.20",
- "psalm/plugin-phpunit": "0.18.4",
+ "phpunit/phpunit": "10.5.30",
+ "psalm/plugin-phpunit": "0.19.0",
"slevomat/coding-standard": "8.13.1",
"squizlabs/php_codesniffer": "3.10.2",
- "symfony/cache": "^5.4|^6.0|^7.0",
- "symfony/console": "^4.4|^5.4|^6.0|^7.0",
- "vimeo/psalm": "4.30.0"
+ "symfony/cache": "^6.3.8|^7.0",
+ "symfony/console": "^5.4|^6.3|^7.0",
+ "vimeo/psalm": "5.25.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
},
- "bin": [
- "bin/doctrine-dbal"
- ],
"type": "library",
"autoload": {
"psr-4": {
@@ -480,7 +475,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.9.3"
+ "source": "https://github.com/doctrine/dbal/tree/4.2.1"
},
"funding": [
{
@@ -496,7 +491,7 @@
"type": "tidelift"
}
],
- "time": "2024-10-10T17:56:43+00:00"
+ "time": "2024-10-10T18:01:27+00:00"
},
{
"name": "doctrine/deprecations",
@@ -1191,63 +1186,51 @@
},
{
"name": "doctrine/orm",
- "version": "2.20.0",
+ "version": "3.3.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/orm.git",
- "reference": "8ed6c2234aba019f9737a6bcc9516438e62da27c"
+ "reference": "69958152e661aa9c14e80d1ee4962863485aa60b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/orm/zipball/8ed6c2234aba019f9737a6bcc9516438e62da27c",
- "reference": "8ed6c2234aba019f9737a6bcc9516438e62da27c",
+ "url": "https://api.github.com/repos/doctrine/orm/zipball/69958152e661aa9c14e80d1ee4962863485aa60b",
+ "reference": "69958152e661aa9c14e80d1ee4962863485aa60b",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2",
- "doctrine/cache": "^1.12.1 || ^2.1.1",
- "doctrine/collections": "^1.5 || ^2.1",
- "doctrine/common": "^3.0.3",
- "doctrine/dbal": "^2.13.1 || ^3.2",
+ "doctrine/collections": "^2.2",
+ "doctrine/dbal": "^3.8.2 || ^4",
"doctrine/deprecations": "^0.5.3 || ^1",
"doctrine/event-manager": "^1.2 || ^2",
"doctrine/inflector": "^1.4 || ^2.0",
"doctrine/instantiator": "^1.3 || ^2",
- "doctrine/lexer": "^2 || ^3",
- "doctrine/persistence": "^2.4 || ^3",
+ "doctrine/lexer": "^3",
+ "doctrine/persistence": "^3.3.1",
"ext-ctype": "*",
- "php": "^7.1 || ^8.0",
+ "php": "^8.1",
"psr/cache": "^1 || ^2 || ^3",
- "symfony/console": "^4.2 || ^5.0 || ^6.0 || ^7.0",
- "symfony/polyfill-php72": "^1.23",
- "symfony/polyfill-php80": "^1.16"
- },
- "conflict": {
- "doctrine/annotations": "<1.13 || >= 3.0"
+ "symfony/console": "^5.4 || ^6.0 || ^7.0",
+ "symfony/var-exporter": "^6.3.9 || ^7.0"
},
"require-dev": {
- "doctrine/annotations": "^1.13 || ^2",
- "doctrine/coding-standard": "^9.0.2 || ^12.0",
- "phpbench/phpbench": "^0.16.10 || ^1.0",
- "phpstan/extension-installer": "~1.1.0 || ^1.4",
- "phpstan/phpstan": "~1.4.10 || 1.12.6",
- "phpstan/phpstan-deprecation-rules": "^1",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
+ "doctrine/coding-standard": "^12.0",
+ "phpbench/phpbench": "^1.0",
+ "phpdocumentor/guides-cli": "^1.4",
+ "phpstan/extension-installer": "^1.4",
+ "phpstan/phpstan": "1.12.6",
+ "phpstan/phpstan-deprecation-rules": "^1.2",
+ "phpunit/phpunit": "^10.4.0",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.2",
- "symfony/cache": "^4.4 || ^5.4 || ^6.4 || ^7.0",
- "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2 || ^7.0",
- "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
- "vimeo/psalm": "4.30.0 || 5.24.0"
+ "symfony/cache": "^5.4 || ^6.2 || ^7.0",
+ "vimeo/psalm": "5.24.0"
},
"suggest": {
"ext-dom": "Provides support for XSD validation for XML mapping files",
- "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0",
- "symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
+ "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0"
},
- "bin": [
- "bin/doctrine"
- ],
"type": "library",
"autoload": {
"psr-4": {
@@ -1288,9 +1271,9 @@
],
"support": {
"issues": "https://github.com/doctrine/orm/issues",
- "source": "https://github.com/doctrine/orm/tree/2.20.0"
+ "source": "https://github.com/doctrine/orm/tree/3.3.0"
},
- "time": "2024-10-11T11:47:24+00:00"
+ "time": "2024-10-12T20:07:18+00:00"
},
{
"name": "doctrine/persistence",
diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml
index 7645fdc57..5dade6b0f 100644
--- a/config/packages/doctrine.yaml
+++ b/config/packages/doctrine.yaml
@@ -12,6 +12,7 @@ doctrine:
EnumLanguage: App\Doctrine\DBAL\Types\EnumLanguageType
EnumLocale: App\Doctrine\DBAL\Types\EnumLocaleType
EnumLogLogin: App\Doctrine\DBAL\Types\EnumLogLoginType
+ PrimaryString: App\Doctrine\DBAL\Types\PrimaryStringType
profiling_collect_backtrace: '%kernel.debug%'
#use_savepoints: true
# IMPORTANT: You MUST configure your server version,
diff --git a/src/Doctrine/DBAL/Types/EnumType.php b/src/Doctrine/DBAL/Types/EnumType.php
index a2e06e0dc..ed40723eb 100644
--- a/src/Doctrine/DBAL/Types/EnumType.php
+++ b/src/Doctrine/DBAL/Types/EnumType.php
@@ -11,7 +11,7 @@
use App\Enum\Interfaces\DatabaseEnumInterface;
use BackedEnum;
use Doctrine\DBAL\Platforms\AbstractPlatform;
-use Doctrine\DBAL\Types\ConversionException;
+use Doctrine\DBAL\Types\Exception\InvalidFormat;
use Doctrine\DBAL\Types\Type;
use InvalidArgumentException;
use Override;
@@ -20,6 +20,7 @@
use function implode;
use function in_array;
use function is_string;
+use function sprintf;
/**
* @package App\Doctrine\DBAL\Types
@@ -89,21 +90,10 @@ public function convertToPHPValue($value, AbstractPlatform $platform): DatabaseE
return $enum;
}
- throw ConversionException::conversionFailedFormat(
+ throw InvalidFormat::new(
gettype($value),
static::$name,
'One of: "' . implode('", "', static::getValues()) . '"',
);
}
-
- /**
- * Parent method is deprecated, so remove this after it has been removed.
- *
- * @codeCoverageIgnore
- */
- #[Override]
- public function getName(): string
- {
- return '';
- }
}
diff --git a/src/Doctrine/DBAL/Types/PrimaryStringType.php b/src/Doctrine/DBAL/Types/PrimaryStringType.php
new file mode 100644
index 000000000..6a9872aed
--- /dev/null
+++ b/src/Doctrine/DBAL/Types/PrimaryStringType.php
@@ -0,0 +1,30 @@
+
+ */
+
+namespace App\Doctrine\DBAL\Types;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform;
+use Doctrine\DBAL\Types\StringType;
+use Override;
+
+/**
+ * @package App\Doctrine\DBAL\Types
+ * @author TLe, Tarmo Leppänen
+ */
+class PrimaryStringType extends StringType
+{
+ protected static string $name = Types::PRIMARY_STRING;
+
+ #[Override]
+ public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
+ {
+ $column['length'] = 255;
+
+ return $platform->getStringTypeDeclarationSQL($column);
+ }
+}
diff --git a/src/Doctrine/DBAL/Types/Types.php b/src/Doctrine/DBAL/Types/Types.php
index 99cafa09f..23a5f6b41 100644
--- a/src/Doctrine/DBAL/Types/Types.php
+++ b/src/Doctrine/DBAL/Types/Types.php
@@ -17,4 +17,5 @@ class Types
final public const string ENUM_LANGUAGE = 'EnumLanguage';
final public const string ENUM_LOCALE = 'EnumLocale';
final public const string ENUM_LOG_LOGIN = 'EnumLogLogin';
+ final public const string PRIMARY_STRING = 'PrimaryString';
}
diff --git a/src/Doctrine/DBAL/Types/UTCDateTimeType.php b/src/Doctrine/DBAL/Types/UTCDateTimeType.php
index 8273e01c5..74f60a30c 100644
--- a/src/Doctrine/DBAL/Types/UTCDateTimeType.php
+++ b/src/Doctrine/DBAL/Types/UTCDateTimeType.php
@@ -9,12 +9,12 @@
namespace App\Doctrine\DBAL\Types;
use DateTime;
-use DateTimeInterface;
use DateTimeZone;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\ConversionException;
use Doctrine\DBAL\Types\DateTimeType;
+use Doctrine\DBAL\Types\Exception\InvalidFormat;
use Override;
/**
@@ -45,7 +45,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): stri
/**
* @param T $value
*
- * @return (T is null ? null : DateTimeInterface)
+ * @return (T is null ? null : DateTime)
*
* @template T
*
@@ -53,7 +53,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): stri
* @throws Exception
*/
#[Override]
- public function convertToPHPValue($value, AbstractPlatform $platform): DateTimeInterface|null
+ public function convertToPHPValue($value, AbstractPlatform $platform): ?DateTime
{
if ($value instanceof DateTime) {
$value->setTimezone($this->getUtcDateTimeZone());
@@ -90,7 +90,7 @@ private function checkConvertedValue(string $value, AbstractPlatform $platform,
return $converted;
}
- throw ConversionException::conversionFailedFormat(
+ throw InvalidFormat::new(
$value,
self::lookupName($this),
$platform->getDateTimeFormatString()
diff --git a/src/Entity/ApiKey.php b/src/Entity/ApiKey.php
index dcdcce37f..d6bda88ce 100644
--- a/src/Entity/ApiKey.php
+++ b/src/Entity/ApiKey.php
@@ -117,8 +117,8 @@ class ApiKey implements EntityInterface, UserGroupAwareInterface
* @var Collection|ArrayCollection
*/
#[ORM\OneToMany(
- mappedBy: 'apiKey',
targetEntity: LogRequest::class,
+ mappedBy: 'apiKey',
)]
#[Groups([
'ApiKey.logsRequest',
diff --git a/src/Entity/DateDimension.php b/src/Entity/DateDimension.php
index f9f41142d..811ea5aa9 100644
--- a/src/Entity/DateDimension.php
+++ b/src/Entity/DateDimension.php
@@ -34,10 +34,10 @@
name: 'date_dimension',
)]
#[ORM\Index(
+ name: 'date',
columns: [
'date',
],
- name: 'date',
)]
#[ORM\ChangeTrackingPolicy('DEFERRED_EXPLICIT')]
class DateDimension implements EntityInterface
diff --git a/src/Entity/LogLogin.php b/src/Entity/LogLogin.php
index 7b61d3451..98a6dd894 100644
--- a/src/Entity/LogLogin.php
+++ b/src/Entity/LogLogin.php
@@ -36,16 +36,16 @@
name: 'log_login',
)]
#[ORM\Index(
+ name: 'user_id',
columns: [
'user_id',
],
- name: 'user_id',
)]
#[ORM\Index(
+ name: 'date',
columns: [
'date',
],
- name: 'date',
)]
#[ORM\HasLifecycleCallbacks]
#[ORM\ChangeTrackingPolicy('DEFERRED_EXPLICIT')]
diff --git a/src/Entity/LogLoginFailure.php b/src/Entity/LogLoginFailure.php
index 6a44e912c..b83b9b700 100644
--- a/src/Entity/LogLoginFailure.php
+++ b/src/Entity/LogLoginFailure.php
@@ -31,10 +31,10 @@
name: 'log_login_failure',
)]
#[ORM\Index(
+ name: 'user_id',
columns: [
'user_id',
],
- name: 'user_id',
)]
#[ORM\ChangeTrackingPolicy('DEFERRED_EXPLICIT')]
class LogLoginFailure implements EntityInterface
diff --git a/src/Entity/LogRequest.php b/src/Entity/LogRequest.php
index de19ebe81..6e7e64711 100644
--- a/src/Entity/LogRequest.php
+++ b/src/Entity/LogRequest.php
@@ -35,22 +35,22 @@
name: 'log_request',
)]
#[ORM\Index(
+ name: 'user_id',
columns: [
'user_id',
],
- name: 'user_id',
)]
#[ORM\Index(
+ name: 'api_key_id',
columns: [
'api_key_id',
],
- name: 'api_key_id',
)]
#[ORM\Index(
+ name: 'request_date',
columns: [
'date',
],
- name: 'request_date',
)]
#[ORM\HasLifecycleCallbacks]
#[ORM\ChangeTrackingPolicy('DEFERRED_EXPLICIT')]
diff --git a/src/Entity/Role.php b/src/Entity/Role.php
index e5bc5d0ca..42e3eeb78 100644
--- a/src/Entity/Role.php
+++ b/src/Entity/Role.php
@@ -8,6 +8,7 @@
namespace App\Entity;
+use App\Doctrine\DBAL\Types\Types as AppTypes;
use App\Entity\Interfaces\EntityInterface;
use App\Entity\Traits\Blameable;
use App\Entity\Traits\Timestampable;
@@ -54,8 +55,8 @@ class Role implements EntityInterface
* @var Collection|ArrayCollection
*/
#[ORM\OneToMany(
- mappedBy: 'role',
targetEntity: UserGroup::class,
+ mappedBy: 'role',
)]
#[Groups([
'Role.userGroups',
@@ -64,9 +65,10 @@ class Role implements EntityInterface
public function __construct(
#[ORM\Id]
+ #[ORM\GeneratedValue(strategy: 'NONE')]
#[ORM\Column(
name: 'role',
- type: Types::STRING,
+ type: AppTypes::PRIMARY_STRING,
unique: true,
nullable: false,
)]
@@ -80,7 +82,7 @@ public function __construct(
UserGroup::SET_USER_PROFILE_GROUPS,
UserGroup::SET_USER_GROUP_BASIC,
])]
- private string $id
+ private readonly string $id
) {
$this->userGroups = new ArrayCollection();
}
diff --git a/src/Entity/UserGroup.php b/src/Entity/UserGroup.php
index 44fb98dc6..4bf9d76e4 100644
--- a/src/Entity/UserGroup.php
+++ b/src/Entity/UserGroup.php
@@ -110,9 +110,6 @@ class UserGroup implements EntityInterface, Stringable
targetEntity: User::class,
mappedBy: 'userGroups',
)]
- #[ORM\JoinTable(
- name: 'user_has_user_group',
- )]
#[Groups([
'UserGroup.users',
])]
@@ -125,9 +122,6 @@ class UserGroup implements EntityInterface, Stringable
targetEntity: ApiKey::class,
mappedBy: 'userGroups',
)]
- #[ORM\JoinTable(
- name: 'api_key_has_user_group',
- )]
#[Groups([
'UserGroup.apiKeys',
])]
diff --git a/src/Repository/ApiKeyRepository.php b/src/Repository/ApiKeyRepository.php
index 7891bcc1f..6b0cf8179 100644
--- a/src/Repository/ApiKeyRepository.php
+++ b/src/Repository/ApiKeyRepository.php
@@ -9,6 +9,7 @@
namespace App\Repository;
use App\Entity\ApiKey as Entity;
+use Doctrine\DBAL\LockMode;
use Doctrine\Persistence\ManagerRegistry;
/**
@@ -18,7 +19,7 @@
* @psalm-suppress LessSpecificImplementedReturnType
* @codingStandardsIgnoreStart
*
- * @method Entity|null find(string $id, ?int $lockMode = null, ?int $lockVersion = null)
+ * @method Entity|null find(string $id, LockMode|int|null $lockMode = null, ?int $lockVersion = null)
* @method Entity|null findAdvanced(string $id, string | int | null $hydrationMode = null)
* @method Entity|null findOneBy(array $criteria, ?array $orderBy = null)
* @method Entity[] findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
diff --git a/src/Repository/DateDimensionRepository.php b/src/Repository/DateDimensionRepository.php
index 99ebf6665..54a3b9b34 100644
--- a/src/Repository/DateDimensionRepository.php
+++ b/src/Repository/DateDimensionRepository.php
@@ -9,6 +9,7 @@
namespace App\Repository;
use App\Entity\DateDimension as Entity;
+use Doctrine\DBAL\LockMode;
use Doctrine\Persistence\ManagerRegistry;
/**
@@ -18,7 +19,7 @@
* @psalm-suppress LessSpecificImplementedReturnType
* @codingStandardsIgnoreStart
*
- * @method Entity|null find(string $id, ?int $lockMode = null, ?int $lockVersion = null)
+ * @method Entity|null find(string $id, LockMode|int|null $lockMode = null, ?int $lockVersion = null)
* @method Entity|null findAdvanced(string $id, string | int | null $hydrationMode = null)
* @method Entity|null findOneBy(array $criteria, ?array $orderBy = null)
* @method Entity[] findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
diff --git a/src/Repository/HealthzRepository.php b/src/Repository/HealthzRepository.php
index effa60052..854fa81e5 100644
--- a/src/Repository/HealthzRepository.php
+++ b/src/Repository/HealthzRepository.php
@@ -12,6 +12,7 @@
use DateInterval;
use DateTimeImmutable;
use DateTimeZone;
+use Doctrine\DBAL\LockMode;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\NonUniqueResultException;
use Doctrine\Persistence\ManagerRegistry;
@@ -25,7 +26,7 @@
* @psalm-suppress LessSpecificImplementedReturnType
* @codingStandardsIgnoreStart
*
- * @method Entity|null find(string $id, ?int $lockMode = null, ?int $lockVersion = null)
+ * @method Entity|null find(string $id, LockMode|int|null $lockMode = null, ?int $lockVersion = null)
* @method Entity|null findAdvanced(string $id, string | int | null $hydrationMode = null)
* @method Entity|null findOneBy(array $criteria, ?array $orderBy = null)
* @method Entity[] findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
diff --git a/src/Repository/Interfaces/BaseRepositoryInterface.php b/src/Repository/Interfaces/BaseRepositoryInterface.php
index c1bf4e3a1..c8aa89830 100644
--- a/src/Repository/Interfaces/BaseRepositoryInterface.php
+++ b/src/Repository/Interfaces/BaseRepositoryInterface.php
@@ -13,7 +13,8 @@
use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Exception\ORMException;
-use Doctrine\ORM\Mapping\ClassMetadataInfo;
+use Doctrine\ORM\Mapping\AssociationMapping;
+use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\NonUniqueResultException;
use Doctrine\ORM\NoResultException;
use Doctrine\ORM\OptimisticLockException;
@@ -51,14 +52,14 @@ public function getReference(string $id): ?object;
/**
* Gets all association mappings of the class.
*
- * @psalm-return array>
+ * @psalm-return array
*/
public function getAssociations(): array;
/**
* Returns the ORM metadata descriptor for a class.
*/
- public function getClassMetaData(): ClassMetadataInfo;
+ public function getClassMetaData(): ClassMetadata;
/**
* Getter method for EntityManager for current entity.
@@ -73,13 +74,11 @@ public function createQueryBuilder(?string $alias = null, ?string $indexBy = nul
/**
* Wrapper for default Doctrine repository find method.
*
- * @psalm-param LockMode::*|null $lockMode
- *
* @throws ORMException
* @throws OptimisticLockException
* @throws TransactionRequiredException
*/
- public function find(string $id, ?int $lockMode = null, ?int $lockVersion = null): ?EntityInterface;
+ public function find(string $id, LockMode|int|null $lockMode = null, ?int $lockVersion = null): ?EntityInterface;
/**
* Advanced version of find method, with this you can process query as you
@@ -108,6 +107,7 @@ public function findOneBy(array $criteria, ?array $orderBy = null): ?object;
*
* @psalm-param array $criteria
* @psalm-param array|null $orderBy
+ * @phpstan-param array|null $orderBy
*
* @psalm-return list