Skip to content

Commit

Permalink
Merge pull request #152 from wmde/doctrine-update-2024
Browse files Browse the repository at this point in the history
Update Doctrine ORM and DBAL
  • Loading branch information
gbirke authored Feb 8, 2024
2 parents 8262c43 + 97d3761 commit 650150f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"wmde/euro": "~1.0",
"wmde/fun-validators": "~v4.0",

"doctrine/orm": "^2.16.1",
"doctrine/dbal": "^3.3",
"doctrine/orm": "~2.18 | ~3.0",
"doctrine/dbal": "~3.8 | ~4.0",
"doctrine/migrations": "^3.5",
"guzzlehttp/guzzle": "^7.4",
"sofort/sofortlib-php": "^3.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<entity name="WMDE\Fundraising\PaymentContext\Domain\Model\PaymentReferenceCode" table="payment_reference_codes">
<id name="formattedCode" type="string" column="code">
<id name="formattedCode" type="string" column="code" length="255">
<generator strategy="NONE"/>
</id>
</entity>
Expand Down
8 changes: 0 additions & 8 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
parameters:
ignoreErrors:
# A workaround for Doctrine not specifying an UniqueConstraintViolationException being thrown
# See https://github.com/doctrine/orm/issues/7780
# This rule might be unnecessary in the future with a fixe discussed in
# https://github.com/phpstan/phpstan-doctrine/issues/295
- message: /Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException is never thrown in the try block/
path: src/DataAccess/DoctrinePaymentRepository.php
count: 1

# Workaround for loading the Paypal configuration YAML file (mixed content) and assuming a certain array shape (validated with Symfony config)
# In the future, Symfony Config might generate PHPStan types that would allow us to at least type the input to PayPalAPIURLGeneratorConfigFactory
# and the output of PayPalPaymentProviderAdapterConfigReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public function testRepositoryCatchesDatabaseErrorsFromPaymentsWithTheSameId():
$firstPayment = new CreditCardPayment( 1, Euro::newFromInt( 99 ), PaymentInterval::Quarterly );
$firstPayment->bookPayment( [ 'transactionId' => 'badcaffee', 'amount' => 9900 ], new DummyPaymentIdRepository() );
$secondPayment = new CreditCardPayment( 1, Euro::newFromInt( 42 ), PaymentInterval::Monthly );
$this->entityManager->getConfiguration()->setRejectIdCollisionInIdentityMap( false );
$repo = new DoctrinePaymentRepository( $this->entityManager );
$repo->storePayment( $firstPayment );

Expand Down

0 comments on commit 650150f

Please sign in to comment.