extdn / github-actions-m2

137 stars 46 forks source link

Monolog 2.7 causes breaking changes that make Integration Tests fail #72

Closed jissereitsma closed 2 years ago

jissereitsma commented 2 years ago

In my environment, Magento 2.4.4 with PHP 8.1 causes the installation of Monolog 2.7, which again has changed method signatures that are used by the Magento TestFramework to log stuff. This issue is reported at Magento here: https://github.com/magento/magento2/issues/35720

The workaround is to add composer require monolog/monolog:2.6.0 somewhere to the Integration Tests, right before doing a composer install. I've personally added it to a pre-install script.

Anyone else bumping into this? If so, I might simply add it to the GitHub Action here instead.

jissereitsma commented 2 years ago

/cc @damienwebdev

damienwebdev commented 2 years ago

@jissereitsma indeed - https://github.com/graycoreio/github-actions-magento2/blob/main/.github/workflows/integration.yaml#L114

This came from @convenient https://github.com/magento/magento2/pull/35596

jissereitsma commented 2 years ago

Note that 2.8 will still include this change :)

My own Magento issue is a duplicate. I'll close it right away.

jissereitsma commented 2 years ago

Added for now like this: https://github.com/extdn/github-actions-m2/commit/1cc6ce6b38f772c70b6cbc41f2a108bed5069709

convenient commented 2 years ago

@jissereitsma Yeah agreed that 2.8 monolog will still include this change my thoughts were

This was to hopefully prevent against weird scenarios in future where I've locked to 2.6.0 but need higher, honestly as well to keep it painful a little bit. Don't want to forget this is an issue that needs handled :p

jissereitsma commented 2 years ago

@convenient I definitely like the approach of asking for feedback on the comment that Jordi (Seldaek) made, but I'm actually not sure if anyone will pick up on this. It might very well be that the person know built this in the past, moved on already.

A handler is a better idea indeed. I already refactored a couple of things in my dev environment to allow for this. But I'm also just wondering who is using this logging ability. Plus I read that in PHPUnit 10 the logger listening feature is actually going to be removed :o