formapro / JsFormValidatorBundle

The Javascript validation for Symfony 2, 3 and 4 forms
MIT License
128 stars 56 forks source link

PHP version 5.3 & 5.4 not compliant #121

Closed tazorax closed 7 years ago

tazorax commented 7 years ago

Multiple files are not PHP 5.3 & 5.4 compliant, but composer.json says php >=5.3.2 :

PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Factory/JsFormValidatorFactory.php on line 451
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Factory/JsFormValidatorFactory.php on line 451
Errors parsing ./Factory/JsFormValidatorFactory.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Form/Extension/FormExtension.php on line 55
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Form/Extension/FormExtension.php on line 55
Errors parsing ./Form/Extension/FormExtension.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/FormGroupsArray.php on line 23
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/FormGroupsArray.php on line 23
Errors parsing ./Tests/Fixtures/FormGroupsArray.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/FormGroupsClosure.php on line 23
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/FormGroupsClosure.php on line 23
Errors parsing ./Tests/Fixtures/FormGroupsClosure.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/SimpleForms/FormOne.php on line 12
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/SimpleForms/FormOne.php on line 12
Errors parsing ./Tests/Fixtures/SimpleForms/FormOne.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/SimpleForms/FormTwo.php on line 12
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/SimpleForms/FormTwo.php on line 12
Errors parsing ./Tests/Fixtures/SimpleForms/FormTwo.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/TestForm.php on line 26
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/Fixtures/TestForm.php on line 26
Errors parsing ./Tests/Fixtures/TestForm.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Controller/BaseTestController.php on line 36
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Controller/BaseTestController.php on line 36
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Controller/BaseTestController.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Controller/FunctionalTestsController.php on line 115
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Controller/FunctionalTestsController.php on line 115
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Controller/FunctionalTestsController.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/AsyncLoadType.php on line 26
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/AsyncLoadType.php on line 26
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/AsyncLoadType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/BasicConstraintsEntityType.php on line 30
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/BasicConstraintsEntityType.php on line 30
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/BasicConstraintsEntityType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/CommentType.php on line 24
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/CommentType.php on line 24
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/CommentType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/CustomizationType.php on line 28
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/CustomizationType.php on line 28
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/CustomizationType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/EmptyChoiceType.php on line 27
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/EmptyChoiceType.php on line 27
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/EmptyChoiceType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/PasswordFieldType.php on line 28
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/PasswordFieldType.php on line 28
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/PasswordFieldType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TagType.php on line 24
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TagType.php on line 24
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/TagType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TaskType.php on line 28
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TaskType.php on line 28
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/TaskType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TestFormType.php on line 25
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TestFormType.php on line 25
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/TestFormType.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TestFormTypeValidationFalse.php on line 25
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TestFormTypeValidationFalse.php on line 25
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/TestFormTypeValidationFalse.php
PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TestSubFormType.php on line 25
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in ./Tests/TestBundles/DefaultTestBundle/Form/TestSubFormType.php on line 25
Errors parsing ./Tests/TestBundles/DefaultTestBundle/Form/TestSubFormType.php

For example, in Form/Extension/FormExtension.php in function getExtendedType() :

return FormType::class;

class keyword is available only from 5.5 version

66Ton99 commented 7 years ago

Version 1.4 or newer require Symfony 3 and requirement for Symfony 3 PHP 5.5.9 If you have older Symfony use version 1.3