Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is receiving a deprecation warning regarding the Whip_RequirementsChecker on their site. They provided a potential fix which involves adding properties 'configuration' and 'messageManager' within the class Whip_RequirementsChecker.

Solution:
We acknowledged the client's suggested solution and provided a similar code snippet to address the issue:

public function __construct( $configuration = array(), $textdomain = 'default' ) {
    public $configuration; // start fix
    public $messageManager; //end fix
		$this->requirements   = array();
		$this->configuration  = new Whip_Configuration( $configuration );
		$this->messageManager = new Whip_MessagesManager();
		$this->textdomain     = $textdomain;
}

However, we explained that we cannot apply the fix immediately as it requires further testing due to the involvement of other classes and plugins. We also mentioned that Whip_Configuration is an external library used by Yoast, and the issue might not be entirely within our control to fix. We provided a link to a related issue on Yoast's GitHub: https://github.com/Yoast/wordpress-seo/issues/19914
We informed the client that the final solution is scheduled for WPML 4.7 and requested that they refrain from using obscene language in communications.

Please note that the solution provided might be outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket for further assistance.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Bruno Kos 1 year, 4 months ago.

Assisted by: Bruno Kos.

Author Posts
February 16, 2024 at 6:29 am #15309995

markoJ-7

On my Site I receive a Deprecation-Warning regarding the Whip_RequirementsChecker

I found this work-around posted by Ahmed Mohammed on June 15 2023 https://wpml.org/forums/topic/getting-error/ in which ABSOLUTELY UNACCEPTABLE because it flushes my logs with deprecation warnings .. the higher the traffic the worse the problem gets.

It is absolutely outrageous that you guys did not fix this considering HOW FUCKING EASY it is.

The problem is literally that you don't add the properties 'configuration' and 'messageManager' within the class Whip_RequirementsChecker as class-properties.
This is literally a fix which takes 5 MInutes and I don't understand why you did not fix such minor issues the minute you get them.

Check my 2nd screenshot this is LITERALLY what you have to do.

Here I make it easy for you COPY PASTE if you are too lazy to type

/**
* The Configuration
*
* @var Whip_Configuration
*/
public $configuration;

/**
* The text MessagesManager to use for translations.
*
* @var Whip_MessagesManager
*/
public $messageManager;

Screenshot from 2024-02-16 07-27-12.png
Screenshot from 2024-02-16 07-17-44.png
February 16, 2024 at 1:10 pm #15311755

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Yes, our potential solution is also within these lines, so like:

	public function __construct( $configuration = array(), $textdomain = 'default' ) {
    public $configuration; // start fix
    public $messageManager; //end fix
		$this->requirements   = array();
		$this->configuration  = new Whip_Configuration( $configuration );
		$this->messageManager = new Whip_MessagesManager();
		$this->textdomain     = $textdomain;
	}

But we don't do it just like that - we always need further testing as we have many classes that are related to other plugins, in this case Whip_Configuration is an external library that we use - Yoast whip library - so it might not be entirely up to us to fix.
hidden link

On a side note, we kindly request refraining from the use of obscene language in our communication channels. While we understand the urgency and frustration, maintaining a respectful dialogue allows us to better assist you and resolve the issue effectively.

Regards,
Bruno Kos

February 16, 2024 at 1:32 pm #15311848

markoJ-7

Thanks for the quick response and sorry for the harsh words I was not aware that this is from a 3rd-Party source. I will now continue my rant Yoast ...

February 16, 2024 at 1:55 pm #15311964

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

If I may please don't rant anyone - we are working with Yoast closely, however we need to check this (and other deprecation functions) more closely, it came mostly because of these:

Dynamic properties are deprecated in PHP 8.2 -> hidden link
String Interpolation as well -> hidden link{var}-string-interpolation-deprecated

So it may affect some other components - in any case the final solution is scheduled for WPML 4.7 (unless dev team decides otherwise), I can't say when it would be published though.