yii2-dynamicform
yii2-dynamicform copied to clipboard
syntax error, unexpected ':', expecting ';' or '{'
I have that error in in /home/brandup4/public_html/stp/vendor/symfony/dom-crawler/Crawler.php at line 958
Were you able to resolve it? I encounter the same Error.
I couldnt
It seems to be related with the PHP version. Trying to run with 5.6 server gets the same error in Crawler... when trying to install wbraganca with composer and php 5.6 i get this error:
`ERGMBP:gescaad ergon$ /Applications/AMPPS/php-5.6/bin/php ../composer.phar require --prefer-dist wbraganca/yii2-dynamicform "*" ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.
Problem 1 - symfony/browser-kit v4.1.0 requires php ^7.1.3 -> your PHP version (5.6.31) does not satisfy that requirement. - symfony/browser-kit v4.1.0 requires php ^7.1.3 -> your PHP version (5.6.31) does not satisfy that requirement. - symfony/browser-kit v4.1.0 requires php ^7.1.3 -> your PHP version (5.6.31) does not satisfy that requirement. - Installation request for symfony/browser-kit (locked at v4.1.0) -> satisfiable by symfony/browser-kit[v4.1.0].
Installation failed, reverting ./composer.json to its original content.`
Anybody knows if there is a php 5.6 wbraganca compatible version?
And here is the explanation...
https://www.tutorialspoint.com/php7/php7_returntype_declarations.htm
New funcionality of PHP 7.0 for casting the function return values...
This must be updated Pls wbraganca sir, update your widget thank you.
im have same trouble in php 5.6, and im fix with downgrade this :
symfony/dom-crawler (v4.2.2) >> to >> "symfony/dom-crawler": "~2.7.5", symfony/css-selector (v4.2.2) >> to >> "symfony/css-selector": "~2.7.0"
how to ? just install again with another version .. composer require --prefer-dist symfony/dom-crawler "2.7.0" composer require --prefer-dist symfony/css-selector "2.7.0"
this error come because symfony/dom-crawler and symfony/css-selector newest version use syntax for php 7 not for php 5.6
To everyone who just upgrade from php5.6 to php7. To save your life, make sure set short_open_tag to on in php.ini.