smrealms / smr

Space Merchant Realms open-source game engine
http://www.smrealms.de
GNU Affero General Public License v3.0
25 stars 15 forks source link

Update to Doctrine\DBAL v4 #1855

Closed hemberger closed 3 months ago

hemberger commented 3 months ago

Special handling needed for the following BC break:

Instead of returning an empty value, Connection::lastInsertId() throws an exception when there's no identity value.

Basically, this means that we can't call call Database::getInsertID on arbitrary INSERT/REPLACE statements, because they would throw if they don't have an auto-increment column.

Add separate methods {replace,insert}AutoIncrement, which are called explicitly when we need to know the updated column(s).

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 30.86%. Comparing base (0469ddf) to head (5a88818).

Files Patch % Lines
src/lib/Smr/AbstractPlayer.php 0.00% 1 Missing :warning:
src/lib/Smr/Planet.php 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1855 +/- ## ============================================ + Coverage 30.84% 30.86% +0.01% - Complexity 4023 4024 +1 ============================================ Files 125 125 Lines 12707 12708 +1 ============================================ + Hits 3920 3922 +2 + Misses 8787 8786 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.