Title: PHP Parse error: syntax error (PHP 8)
Last modified: April 18, 2022

---

# PHP Parse error: syntax error (PHP 8)

 *  Resolved [Tim Bowen](https://wordpress.org/support/users/creativeslice/)
 * (@creativeslice)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-php-8/)
 * After updating to Gravity PDF 6.2.1 we are no longer able to deploy code to our
   Host (WPEngine.com) with PHP_LINT on.
 * The follow errors are coming from monolog code which does not appear to work 
   with PHP 8:
 *     ```
       PHP Parse error:  syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE) in ./wp-content/plugins/gravity-forms-pdf-extended/vendor_prefixed/monolog/src/Monolog/Attribute/AsMonologProcessor.php on line 30
       Errors parsing ./wp-content/plugins/gravity-forms-pdf-extended/vendor_prefixed/monolog/src/Monolog/Attribute/AsMonologProcessor.php
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jake Jackson](https://wordpress.org/support/users/blue-liquid-designs/)
 * (@blue-liquid-designs)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-php-8/#post-15569422)
 * Thanks for reporting this error.
 * From the research I’ve done, the code that triggers this parse error is only 
   PHP8+ compatible, so the lint check being auto-run on deployment must be using
   PHP7.x.
 * That particular file isn’t actually used by Gravity PDF, so there isn’t a chance
   the error will occur outside of CLI tools running the PHP parser on all files.
   That said, it would be good to fix so you don’t have any auto-deployment issues
   in the future.
 * [I see the Monolog team have released a new version](https://github.com/Seldaek/monolog/blob/2.5.0/CHANGELOG.md)
   that fixes the PHP parse error. We’ll include this update in Gravity PDF 6.3,
   which is currently in active development and will be released next month.
 * Please let me know if you’ve any further questions.

Viewing 1 replies (of 1 total)

The topic ‘PHP Parse error: syntax error (PHP 8)’ is closed to new replies.

 * ![](https://ps.w.org/gravity-forms-pdf-extended/assets/icon-256x256.png?rev=3168987)
 * [Gravity PDF](https://wordpress.org/plugins/gravity-forms-pdf-extended/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-pdf-extended/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-pdf-extended/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-pdf-extended/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-pdf-extended/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-pdf-extended/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jake Jackson](https://wordpress.org/support/users/blue-liquid-designs/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-php-8/#post-15569422)
 * Status: resolved