When I run update.php, I get
Parse error: syntax error, unexpected 'PUBLIC' (T_PUBLIC) in /homepages/24/d681484044/htdocs/modules/email_confirmer/src/Entity/EmailConfirmation.php on line 127
This totally kills my site!

Comments

tjtj created an issue. See original summary.

manuel.adan’s picture

Title: Error in php file » Error in php file, constant name not allowed in PHP5
Assigned: Unassigned » manuel.adan
Status: Active » Patch (to be ported)
StatusFileSize
new1.92 KB

It seems to happen only on PHP5, testing in PHP 5.6.30 I got the same error. "PUBLIC" nor "PRIVATE" are invalid constant names in PHP5, however, I didn't find any in the documentation at a quick glance. Patch solves it, plz confirm that it also works for you. I'll commit it in less than 2 hours, within a new release.

manuel.adan’s picture

Confirmed, from http://php.net/manual/en/reserved.keywords.php

"As of PHP 7.0.0 these keywords are allowed as property, constant, and method names of classes, interfaces and traits, except that class may not be used as constant name. "

  • manuel.adan committed 3ee8f14 on 8.x-1.x
    Issue #2922182 by manuel.adan: Error in php file, constant name not...
manuel.adan’s picture

Status: Patch (to be ported) » Fixed

Committed and fixed in new release (8.x-1.0-beta3).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

manuel.adan’s picture

Assigned: manuel.adan » Unassigned