Php7 PHP Fatal error: Cannot use 'String' as class name

because the upgrade PHP7, wants to detect incompatible code, the tool php7cc
php7cc-- level=error vendor > error.txt

is used.
  document  also indicates invalid classes, interfaces, and trait naming 

these codes are all under vendor, so you can"t modify them directly. How to deal with them?

May.22,2021

I took a look at it. I think your Parser tool used the keyword of PHP7 or the reserved word of PHP to make the class name, and then made an error. I haven't used your tool under vendor, but it's not impossible for you to change it as a PHP,.


where is it used, and is it possible to inherit and rewrite directly? I remember there was a bag like this when I used yii2.

Menu