Skip to content

Commit 3b76bdb

Browse files
committed
BH-681: Update doctrine-bundle
1 parent eebe2eb commit 3b76bdb

File tree

21 files changed

+58
-45
lines changed

21 files changed

+58
-45
lines changed

composer.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,23 @@
5555
"ass/xmlsecurity": "1.1.1",
5656
"box/spout": "2.7.3",
5757
"doctrine/annotations": "1.13.2",
58-
"doctrine/cache": "1.9.1",
59-
"doctrine/collections": "1.6.4",
60-
"doctrine/common": "2.13.3",
61-
"doctrine/data-fixtures": "1.4.0",
62-
"doctrine/dbal": "2.10.0",
63-
"doctrine/doctrine-bundle": "1.12.0",
64-
"doctrine/doctrine-fixtures-bundle": "3.3.0",
65-
"doctrine/doctrine-migrations-bundle": "1.3.2",
66-
"doctrine/event-manager": "1.1.0",
67-
"doctrine/instantiator": "1.3.1",
68-
"doctrine/migrations": "1.8.1",
69-
"doctrine/orm": "2.7.0",
70-
"doctrine/persistence": "1.3.3",
71-
"doctrine/reflection": "1.0.0",
58+
"doctrine/cache": "^1.12.1",
59+
"doctrine/collections": "^1.6.8",
60+
"doctrine/common": "^3.1.2",
61+
"doctrine/data-fixtures": "^1.5.0",
62+
"doctrine/dbal": "^2.13.2",
63+
"doctrine/doctrine-bundle": "2.4.2",
64+
"doctrine/doctrine-fixtures-bundle": "^3.4.0",
65+
"doctrine/doctrine-migrations-bundle": "^2.2",
66+
"doctrine/event-manager": "^1.1.1",
67+
"doctrine/instantiator": "^1.4.0",
68+
"doctrine/migrations": "^2.3.4",
69+
"doctrine/orm": "^2.9.5",
70+
"doctrine/persistence": "^2.2.2",
7271
"dompdf/dompdf" : "1.0.2",
7372
"elasticsearch/elasticsearch": "7.11.0",
7473
"friendsofsymfony/jsrouting-bundle": "2.7.0",
75-
"friendsofsymfony/oauth-server-bundle": "1.6.2",
74+
"friendsofsymfony/oauth-server-bundle": "dev-master",
7675
"friendsofsymfony/rest-bundle": "^3.0.5",
7776
"gedmo/doctrine-extensions":"v3.0.3",
7877
"google/cloud-pubsub": "1.29.1",
@@ -112,7 +111,7 @@
112111
"symfony/proxy-manager-bridge": "4.4.25",
113112
"symfony/requirements-checker": "^1.1",
114113
"symfony/routing": "4.4.25",
115-
"symfony/security-acl": "3.0.2",
114+
"symfony/security-acl": "^3.2.0",
116115
"symfony/security-bundle": "4.4.25",
117116
"symfony/security-core": "4.4.25",
118117
"symfony/security-csrf": "4.4.25",

config/packages/doctrine.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ doctrine_migrations:
5959
dir_name: '%doctrine_migrations_dir%'
6060
namespace: Pim\Upgrade\Schema
6161
name: PIM Migrations
62+
column_name: 'version'
63+
column_length: 191

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ includes:
33
- vendor/phpstan/phpstan-webmozart-assert/extension.neon
44
parameters:
55
reportUnmatchedIgnoredErrors: false
6+
checkGenericClassInNonGenericObjectType: false
67
symfony:
78
container_xml_path: %rootDir%/../../../var/cache/dev/srcKernelDevDebugContainer.xml
89
ignoreErrors:

src/Akeneo/Pim/Enrichment/Bundle/EventSubscriber/AttributeOption/LocalizableSubscriber.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ public function getSubscribedEvents()
4141

4242
/**
4343
* After load
44-
*
45-
* @param LifecycleEventArgs $args
4644
*/
4745
public function postLoad(LifecycleEventArgs $args)
4846
{

src/Akeneo/Pim/Enrichment/Component/Product/Repository/ReferenceDataRepositoryResolverInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Akeneo\Pim\Enrichment\Component\Product\Repository;
44

5+
use Doctrine\Persistence\ObjectRepository;
6+
57
/**
68
* Resolves the repository given a reference data type
79
*
@@ -14,7 +16,7 @@ interface ReferenceDataRepositoryResolverInterface
1416
/**
1517
* @param string $referenceDataType
1618
*
17-
* @return \Doctrine\Common\Persistence\ObjectRepository
19+
* @return ObjectRepository
1820
*/
1921
public function resolve($referenceDataType);
2022
}

src/Akeneo/Tool/Bundle/BatchBundle/Persistence/Sql/GetJobExecutionIds.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,34 @@
55
namespace Akeneo\Tool\Bundle\BatchBundle\Persistence\Sql;
66

77
use Akeneo\Tool\Component\Batch\Job\BatchStatus;
8+
use DateTime;
89
use Doctrine\DBAL\Connection;
9-
use Doctrine\DBAL\Driver\PDOStatement;
10+
use Doctrine\DBAL\Driver\ResultStatement;
1011
use Doctrine\DBAL\Types\Types;
12+
use InvalidArgumentException;
1113

1214
/**
1315
* @copyright 2020 Akeneo SAS (http://www.akeneo.com)
1416
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1517
*/
1618
final class GetJobExecutionIds
1719
{
18-
/** @var Connection */
19-
private $connection;
20+
private Connection $connection;
2021

2122
public function __construct(Connection $connection)
2223
{
2324
$this->connection = $connection;
2425
}
2526

26-
public function olderThanDays(int $days): PDOStatement
27+
public function olderThanDays(int $days): ResultStatement
2728
{
2829
if ($days < 1) {
29-
throw new \InvalidArgumentException(sprintf('Number of days should be strictly superior to 0, "%s% given', $days));
30+
throw new InvalidArgumentException(
31+
sprintf('Number of days should be strictly superior to 0, "%s given', $days)
32+
);
3033
}
3134

32-
$endTime = new \DateTime();
35+
$endTime = new DateTime();
3336
$endTime->modify(sprintf('- %d days', $days));
3437

3538
$query = <<<SQL
@@ -41,7 +44,7 @@ public function olderThanDays(int $days): PDOStatement
4144
WHERE last_job_execution.status = :status
4245
GROUP BY last_job_execution.job_instance_id
4346
)
44-
SQL;
47+
SQL;
4548

4649
return $this->connection->executeQuery(
4750
$query,
@@ -50,7 +53,7 @@ public function olderThanDays(int $days): PDOStatement
5053
);
5154
}
5255

53-
public function all(): PDOStatement
56+
public function all(): ResultStatement
5457
{
5558
$query = <<<SQL
5659
SELECT id

src/Akeneo/Tool/Bundle/StorageUtilsBundle/spec/Doctrine/ORM/MappingsOverrideConfiguratorSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace spec\Akeneo\Tool\Bundle\StorageUtilsBundle\Doctrine\ORM;
44

5-
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver;
65
use Doctrine\ORM\Configuration;
76
use Doctrine\ORM\EntityManagerInterface;
87
use Doctrine\ORM\Mapping\ClassMetadataInfo;
8+
use Doctrine\Persistence\Mapping\Driver\MappingDriver;
99
use PhpSpec\ObjectBehavior;
1010
use Prophecy\Argument;
1111

src/Oro/Bundle/SecurityBundle/Acl/Persistence/AbstractAclManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function getSid($identity)
2323
if (is_string($identity)) {
2424
return new RoleSecurityIdentity($identity);
2525
} elseif ($identity instanceof RoleInterface) {
26-
return new RoleSecurityIdentity($identity->getRole());
26+
return new RoleSecurityIdentity($identity->getRole() ?? '');
2727
} elseif ($identity instanceof UserInterface) {
2828
return UserSecurityIdentity::fromAccount($identity);
2929
} elseif ($identity instanceof TokenInterface) {

symfony.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
"doctrine/dbal": {
8282
"version": "v2.7.2"
8383
},
84+
"doctrine/deprecations": {
85+
"version": "v0.5.3"
86+
},
8487
"doctrine/doctrine-bundle": {
8588
"version": "1.6",
8689
"recipe": {
@@ -148,6 +151,9 @@
148151
"doctrine/reflection": {
149152
"version": "v1.0.0"
150153
},
154+
"doctrine/sql-formatter": {
155+
"version": "1.1.1"
156+
},
151157
"dompdf/dompdf": {
152158
"version": "v0.6.2"
153159
},

tests/back/Pim/Enrichment/Specification/Bundle/Doctrine/ORM/Repository/ProductRepositorySpec.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Doctrine\ORM\EntityManager;
99
use Doctrine\ORM\Mapping\ClassMetadata;
1010
use Doctrine\ORM\QueryBuilder;
11+
use Doctrine\Persistence\ObjectRepository;
1112
use PhpSpec\ObjectBehavior;
1213
use Akeneo\Pim\Structure\Component\ReferenceData\ConfigurationRegistryInterface;
1314
use Prophecy\Argument;
@@ -30,7 +31,7 @@ function it_is_a_product_repository()
3031

3132
function it_is_an_object_repository()
3233
{
33-
$this->shouldImplement('Doctrine\Common\Persistence\ObjectRepository');
34+
$this->shouldImplement(ObjectRepository::class);
3435
}
3536

3637
function it_checks_if_the_product_has_an_attribute_in_its_family(

0 commit comments

Comments
 (0)