• Resolved Generosus

    (@generosus)


    Hey Team Cloudflare!

    What’s going on? We can use your support.

    We need a fix for the PHP 8.2.7 deprecation notices shown here. To replicate the issue, install the plugin Query Monitor and test your plugin using both PHP 8.1.X and PHP 8.2.X.

    Many other users are having similar issues.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello! To fix this we need to declare it in the class definition. The first error message "Creation of dynamic property CF\WordPress\DataStore::$logger is deprecated" you just need to copy this:

        /**
         * @var DefaultLogger
         */
        protected $logger;

    go into /wp-content/plugins/cloudflare/src/WordPress/DataStore.php and paste it just above the line where it has protected $wordPressWrapper; (was line 15 for me) .

    The second error Creation of dynamic property CF\WordPress\Proxy::$pluginAPI is deprecated is just as easy fix, go into /wp-content/plugins/cloudflare/src/WordPress/Proxy.php and paste this protected $pluginAPI; right under the line protected $requestRouter; .. So the section should look like this:

        protected $config;
        protected $dataStore;
        protected $logger;
        protected $wordpressAPI;
        protected $wordpressClientAPI;
        protected $wordpressIntegration;
        protected $requestRouter;
        protected $pluginAPI;

    Both errors are now fixed!

    • This reply was modified 1 year, 4 months ago by humboldtk.
    Thread Starter Generosus

    (@generosus)

    Hey @humboldtk,

    Thank you. We’ll give it try and let you know if it works.

    Meanwhile, for obvious reasons, we prefer Cloudflare’s Developers address all deprecation notices via official channels (i.e., plugin updates).

    Again, thank you.

    Landon

    (@landonbotis)

    Chiming in to add that PHP 8.0 is reaching EOL this coming November, and many WordPress hosts, including WPEngine, will require 8.2. Updating the plugin to be compatible with 8.2 should be a high priority.

    • This reply was modified 1 year, 3 months ago by Landon.
    Thread Starter Generosus

    (@generosus)

    Hey @humboldtk,

    Your fix worked like a charm. It works for PHP 8.3.0 as well.

    We’re leaving this topic open until Cloudflare incorporates your fix.

    Thank you!

    Hey @ggalow,

    Any chance your team can fix this soon?

    Thank you!

    No response here at all, and of course no bug-fix update yet. The plugin seems to be abandoned.

    Thread Starter Generosus

    (@generosus)

    Update:

    Today, Team Cloudflare released V4.12.4 of their plugin which fixed all detected PHP 8.3.1 deprecation notices.

    Job well done, Team Cloudflare.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Need Fix | Deprecation Notices | PHP 8.2.7’ is closed to new replies.