Skip to content

Commit 650150f

Browse files
authored
Merge pull request #152 from wmde/doctrine-update-2024
Update Doctrine ORM and DBAL
2 parents 8262c43 + 97d3761 commit 650150f

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"wmde/euro": "~1.0",
99
"wmde/fun-validators": "~v4.0",
1010

11-
"doctrine/orm": "^2.16.1",
12-
"doctrine/dbal": "^3.3",
11+
"doctrine/orm": "~2.18 | ~3.0",
12+
"doctrine/dbal": "~3.8 | ~4.0",
1313
"doctrine/migrations": "^3.5",
1414
"guzzlehttp/guzzle": "^7.4",
1515
"sofort/sofortlib-php": "^3.2",

config/DoctrineClassMapping/WMDE.Fundraising.PaymentContext.Domain.Model.PaymentReferenceCode.dcm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
33
<entity name="WMDE\Fundraising\PaymentContext\Domain\Model\PaymentReferenceCode" table="payment_reference_codes">
4-
<id name="formattedCode" type="string" column="code">
4+
<id name="formattedCode" type="string" column="code" length="255">
55
<generator strategy="NONE"/>
66
</id>
77
</entity>

phpstan-baseline.neon

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
# A workaround for Doctrine not specifying an UniqueConstraintViolationException being thrown
4-
# See https://github.com/doctrine/orm/issues/7780
5-
# This rule might be unnecessary in the future with a fixe discussed in
6-
# https://github.com/phpstan/phpstan-doctrine/issues/295
7-
- message: /Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException is never thrown in the try block/
8-
path: src/DataAccess/DoctrinePaymentRepository.php
9-
count: 1
10-
113
# Workaround for loading the Paypal configuration YAML file (mixed content) and assuming a certain array shape (validated with Symfony config)
124
# In the future, Symfony Config might generate PHPStan types that would allow us to at least type the input to PayPalAPIURLGeneratorConfigFactory
135
# and the output of PayPalPaymentProviderAdapterConfigReader

tests/Integration/DataAccess/DoctrinePaymentRepositoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public function testRepositoryCatchesDatabaseErrorsFromPaymentsWithTheSameId():
8585
$firstPayment = new CreditCardPayment( 1, Euro::newFromInt( 99 ), PaymentInterval::Quarterly );
8686
$firstPayment->bookPayment( [ 'transactionId' => 'badcaffee', 'amount' => 9900 ], new DummyPaymentIdRepository() );
8787
$secondPayment = new CreditCardPayment( 1, Euro::newFromInt( 42 ), PaymentInterval::Monthly );
88-
$this->entityManager->getConfiguration()->setRejectIdCollisionInIdentityMap( false );
8988
$repo = new DoctrinePaymentRepository( $this->entityManager );
9089
$repo->storePayment( $firstPayment );
9190

0 commit comments

Comments
 (0)