Title: Issue with PHP 8.0, Deprecated: Method ReflectionParameter
Last modified: January 8, 2021

---

# Issue with PHP 8.0, Deprecated: Method ReflectionParameter

 *  Resolved [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/)
 * Hey! Thank you for sharing this plugin with the community.
 * A little heads up. I’ve been testing the new PHP 8.0, and Avatar Privacy seems
   to have an issue with that, throwing this error:
 * `Deprecated: Method ReflectionParameter::getClass() is deprecated in /home/oldrupdk/
   oldrup.net/wp-content/plugins/avatar-privacy/vendor-scoped/level-2/dice/Dice.
   php on line 184`
 * Please let me know if I can do anything to help locate and fix this issue.
 * Bjarne
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fissue-with-php-8-0-deprecated-method-reflectionparameter%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/page/2/?output_format=md)

 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-13883639)
 * Hi [@oldrup](https://wordpress.org/support/users/oldrup/)! Thanks for the heads
   up! I have not yet tested Avatar Privacy with PHP 8.0. I plan to do that after
   releasing 2.4.0 (which is almost finished). The issue you encountered is in the
   dependency injection container Dice. There is an [upstream ticket](https://github.com/Level-2/Dice/issues/192)
   I’ve discovered. I’m hoping the upstream maintainer will fix it by the time I
   get to PHP 8 compatibility.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-13887049)
 * I’ve added an [issue to track PHP 8.* compatibility](https://github.com/mundschenk-at/avatar-privacy/issues/197)
   on GitHub.
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-13887592)
 * That’s great news [@pputzer](https://wordpress.org/support/users/pputzer/). Looking
   forward to giving the new version a spin! 🙂
 * Bjarne
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14170877)
 * Hi [@oldrup](https://wordpress.org/support/users/oldrup/), I’ve just released
   Avatar Privacy 2.5.0 which should have fully supported PHP 8.0 … but of course
   I forgot about the upstream issue and the unit tests don’t check that.
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14171260)
 * Ah. So close! 😀
 * Let me know if I can do anything to help. Have you got a PHP 8 WordPress to test
   on? Otherwise, I can easily provide you with a login.
 * Also, don’t hesitate to get in touch if you want me to take it for a spin.
 * Kind regards
    Bjarne
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14176593)
 * Hi [@oldrup](https://wordpress.org/support/users/oldrup/), I’ve uploaded a draft
   of 2.5.1 to trunk, you can download it via [https://wordpress.org/plugins/avatar-privacy/advanced/](https://wordpress.org/plugins/avatar-privacy/advanced/)
   and install it manually to do a test drive. (It’s running fine in MAMP PRO, when
   I finally got their PHP 8.0.2 package to work.)
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14180082)
 * Cool! Tested it on my WordPress 5.7, PHP 8.0.2 multisite test bench and both 
   real gravatar images as well as the automatically generated (I used the birds),
   works well.
 * I get no more deprecation or other errors in the backend. Good job.
 * Only oddity, is a weird blank line occurring in the dashboard. I’m using firefox..
   Screenshot here: [https://snipboard.io/qbV3eP.jpg](https://snipboard.io/qbV3eP.jpg)
 * Seems to come from this:
 *     ```
       .php-error #adminmenuback, .php-error #adminmenuwrap {
           margin-top: 2em;
       }
       ```
   
 * Looking like the php error output was triggered, but no errors were output?
 * Can you reproduce? I’ve got debug info on.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14180130)
 * No, where do you get that from? I don’t think that markup is produced by WordPress?
 * I do have a (silenced) PHP warning in my test environment (because the minified
   CSS file is not present in a GitHub checkout), and that’s strangely not marked
   as silences in PHP 8, although it still should be? (I know that there have been
   some chances for @ operator, but AFAIK not when used with file functions.). But
   with the zip file from WP.org this should not be triggered at all, because the
   minified file is there.
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14181973)
 * I can give the plugin a shut on another installation, just to check it isn’t 
   something at my end.. Anyhow, it does not seem to interfere with the functionality
   of the plugin.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14182144)
 * I’m pretty certain that the markup is stemming from another plugin even if it
   is somehow triggered by Avatar Privacy (e.g. I can see silenced errors in Query
   Monitor). Do you get anything in the logs?
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14194140)
 * In the browser console logs? Nope… Clean as my cats plate.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14196574)
 * No, I meant the PHP error log. A stacktrace would be helpful.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14295244)
 * Hi [@oldrup](https://wordpress.org/support/users/oldrup/), have you found out
   anything more?
 *  Thread Starter [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * (@oldrup)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14296792)
 * Hey [@pepe](https://wordpress.org/support/users/pepe/)
 * Sorry for the late reply. You’ve lost me at stacktrace, sorry. But I’ve done 
   some additional testing that might help you reproduce this minor issue. I’ve 
   been testing on existing sites and brand new installs with a combination of PHP
   8, 7.4 and multisite on/of.
 * My conclusions so far, is that it has nothing to do with multisite nor PHP 8.
 * The odd margin (screenshot: [https://snipboard.io/qbV3eP.jpg](https://snipboard.io/qbV3eP.jpg))
   appears on a brand new stand alone site running php 7.4 and 2021 theme, no extra
   plugins besides Avartar Privacy, but ONLY with debug on in wp-config.php, like
   this:
 *     ```
       // This enables debugging.
       define( 'WP_DEBUG', true );
       ```
   
 * Apart from that, the plugin appears to work fine. And as most people don’t have
   wp_debug enabled, I’m not surprised if you don’t get other reports on this.
 * Please let me know if I can do anything else to troubleshoot this. If wanted,
   I can create a login to a dedicated install where you can take a look for yourself.
 * Also I understand if you don’t want to spend more time on this, as it is such
   an edge/non-critical issue that hardly affects people in real life situations.
 * Kind regards
    Bjarne
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/#post-14324606)
 * I’ve been able to reproduce the issue when I’ve disabled Query Monitor. I’ll 
   look into it.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/page/2/?output_format=md)

The topic ‘Issue with PHP 8.0, Deprecated: Method ReflectionParameter’ is closed
to new replies.

 * ![](https://ps.w.org/avatar-privacy/assets/icon.svg?rev=2711226)
 * [Avatar Privacy](https://wordpress.org/plugins/avatar-privacy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/avatar-privacy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/avatar-privacy/)
 * [Active Topics](https://wordpress.org/support/plugin/avatar-privacy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/avatar-privacy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/avatar-privacy/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [Bjarne Oldrup](https://wordpress.org/support/users/oldrup/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/issue-with-php-8-0-deprecated-method-reflectionparameter/page/2/#post-14387032)
 * Status: resolved