Update to PHP 8.1#703
Conversation
m90
left a comment
There was a problem hiding this comment.
I do understand the change in PDO behavior but I am still a bit puzzled about the changes caused by this.
|
We'll also need to update this setting: api/.github/workflows/composer.test.yml Line 25 in 5b6e5dd |
|
When installing dependencies locally using PHP 8, I will get prompted to update the lock file so we probably need to do this here as well? |
As part of this process it was necssary to make some tweaks related to our use of PDO calls. In 8.1 attempting to explicitly commit or rollback a transaciton when none is in progress now errors rather than failing silently[1]. We have a number of these in our wiki deletion code since the altering of the tables automatically commits and ends the transaction. For this reason we are also unable use the traits that rollback transactions after running tests if the tests themselves are causing a commit. These have been removed too. Unfortunately this adds more places where the tests are no longer idempotent. [1] php/php-src@990bb34
|
I'm still seeing the warning here: #703 (comment) - is this ok / expected or should we also update the lockfile? |
Interestingly I don't see this even with no updates using the This is probably true; it's somewhat hard to do this in isolation though; this typically involves pulling in loads of updated dependencies. I'll follow up with another PR for it |
|
I haven't got a solid plan to be honest; I'd be happy to:
|
|
I have to admit I know too little about PHP and package management to know about the consequences of such a warning being ignored. Could it mean we end up with a incompatible dependency tree, or is it just sth cosmetic? |
|
as I understand it the risk is that you think you have newer dependencies than you do because the lockfile is taking priority over the |
|
As for why I am seeing the message, this is my setup I don't run this in Docker but use PHPBrew. |
* Run after using php81 * Use legacy PSR-7 message factories --------- Co-authored-by: Andrew Kostka <andrew.kostka@wikimedia.de>
As part of this process it was necssary to make some tweaks related to our use of PDO calls. In 8.1 attempting to explicitly commit or rollback a transaciton when none is in progress now errors rather than failing silently[1].
We have a number of these in our wiki deletion code since the altering of the tables automatically commits and ends the transaction.
For this reason we are also unable use the traits that rollback transactions after running tests if the tests themselves are causing a commit. These have been removed too. Unfortunately this adds more places where the tests are no longer idempotent.
[1] php/php-src@990bb34