Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -
- 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Subash Chandra Poudel 1 year, 10 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
August 9, 2023 at 1:48 pm #14176205

tanguyM-3

I use Monolog in my project, v3.4.0, which use PSR/log 3.0.0. WPML seems to be using PSR/log 2.0.0 as its dependencies for WPML\Utilities\Logger, which implements the LoggerInterface.

As I use Monolog >= 3.0.0, it requires PSR/log 3.0.0, in which this interface has changed.

that incompatibility makes it throw an error : Declaration of Monolog\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::emergency($message, array $context = [])

Can you please upgrade to PSR/Log 3.0.0 ?

August 10, 2023 at 4:33 pm #14184295

Subash Chandra Poudel

Hi there,

Firstly, to ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. You can find it in WPML > Support > click on “Debug information” link. Please check this link for more info: http://wpml.org/faq/provide-debug-information-faster-support/

Regarding the issue, will it be possible for you to replicate the issue with your plugin/theme/code on a clean site so that I can escalate the issue to our team with proper details? Can you please:

- Login to the sandbox site that I created for you using the link hidden link

- Setup WPML and your plugin/code or theme that causes the issue.

- Try to replicate the issue on the site with minimal setup/plugins.

Then let me know the exact steps to see/feplicate the issue.

Regards,
Subash

August 12, 2023 at 1:51 pm #14191739

tanguyM-3

Hello,

Impossible to reproduce using a sandbox.
The problem is from WPML composer dependencies.

You are using PSR/Log v2.0.0, which is outdated, but force us to use it too in our composer dependencies, because the vendor folder in the WPML plugin overrides the PSR/log V3.0.0 when we install it.

Do you have any plan in dropping support for php <= 8.0.0 and update this dependency to v3.0.0 ?

Thanks,

August 13, 2023 at 10:46 am #14192869

Subash Chandra Poudel

Hi there,

Thank you for the reply.

I have escalated the issue to our team to see if we can have a workaround for this or if there are plans to use the new version of PSR/Log .

In the meantime, can you please confirm that the Monolog integration that you are referring to is related to this: hidden link ?

Also, will it be possible for you to share site access to a test site in your server where we can see the incompatibility issue? I have enabled a private reply for you to share the credentials safely if it is possible. Also, please let me know how/where can I see the issue at my end.

Regards,
Subash

August 22, 2023 at 6:05 am #14267685

tanguyM-3

Hello,

Yes this is the dependency I'm talking about.
Unfortunately I can't share the website as it is sensitive and my company forbids it.

To reproduce it, you can install a fresh Bedrock installation (hidden link)
Install monolog using composer,
Install WPML,
Use Monolog in a theme or plugin, and it should raise the error :

Declaration of Monolog\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::emergency($message, array $context = [])

Which is due to Psr\Log\LoggerInterface used in WPML (2.0.0) overriding Psr\Log\LoggerInterface in Monolog dependencies,

August 22, 2023 at 8:22 am #14268797

Subash Chandra Poudel

Thank you for the updates.

The issue is being handled by our 2'nd tier team and I will let you know as soon as we have an update here. This might take some time though.

The topic ‘[Closed] PSR/log 2.0.0 dependencies makes monolog >=3.0.0 unusable’ is closed to new replies.