Minimum PHP requirements

429 views
Skip to first unread message

snky1987

unread,
Jun 8, 2015, 5:31:40 AM6/8/15
to sonat...@googlegroups.com
Hi Guys,

I know it may sound unrealistic but there are still companies that use Apache Servers with PHP 5.3 :)

Would it be beneficial to put clear information in Sonata's Get Started that minimum PHP version requirement is 5.4 ?


On PHP 5.3 I get this kind of errors:

Parse error: syntax error, unexpected '[', expecting ')' in /home/vagrant/Code/sonata/vendor/react/promise/src/functions.php on line 68 Call Stack: 0.0017 324600 1. {main}() /home/vagrant/Code/sonata/web/app.php:0 0.0187 544112 2. require_once('/home/vagrant/Code/sonata/app/bootstrap.php.cache') /home/vagrant/Code/sonata/web/app.php:12 0.0228 544656 3. require_once('/home/vagrant/Code/sonata/app/autoload.php') /home/vagrant/Code/sonata/app/bootstrap.php.cache:5 0.0236 544960 4. include('/home/vagrant/Code/sonata/vendor/autoload.php') /home/vagrant/Code/sonata/app/autoload.php:3 0.0282 546716 5. ComposerAutoloaderInit67a7ff3581f863ac5ab403a52ed93c46::getLoader() /home/vagrant/Code/sonata/vendor/autoload.php:7 0.0447 765476 6. composerRequire67a7ff3581f863ac5ab403a52ed93c46() /home/vagrant/Code/sonata/vendor/composer/autoload_real.php:49 0.0462 765876 7. require('/home/vagrant/Code/sonata/vendor/react/promise/src/functions_include.php') /home/vagrant/Code/sonata/vendor/composer/autoload_real.php:58



Which relates to Vendor packages with [] (php 5.4+) array definition instead of array() (valid on php 5.3)

Many Thanks

Thomas Rabaix

unread,
Jun 8, 2015, 5:36:38 AM6/8/15
to sonat...@googlegroups.com
You need to check your dependencies as they include react. As far I know Sonata do not used this libraries.

--
You received this message because you are subscribed to the Google Groups "sonata-devs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonata-devs...@googlegroups.com.
To post to this group, send email to sonat...@googlegroups.com.
Visit this group at http://groups.google.com/group/sonata-devs.
For more options, visit https://groups.google.com/d/optout.



--

snky1987

unread,
Jun 8, 2015, 5:46:42 AM6/8/15
to sonat...@googlegroups.com, tho...@rabaix.net
Hi,

I just used "Get Started" tutorial and put:

composer create-project sonata sonata-project/sandbox:2.3.x-dev

Command to my CLI and that's it :) After installation was completed I get the error (on clear cache) that "knp_paginator.helper.processor has a dependency on a non-existing service templating.helper.router" and an error mentioned before on first try to run sonata on my localhost env.

Ofc with a massive amount of warning that says that some functions will be removed in Symfony 3.0 but those can be ignored as Sonata will probably use Symfony 2.* for a longer period of time  :)  


Shall I then use some older version of Sonata (>2.3) or just get through every single dependency and check it for PHP req. ?
I am fresh in this subject because so far I used mostly ZF2 and Laravel 3/4/5 and I didn't have so many troubles with starting up the project (even with many dependencies because they were very well optimized for a project). 

Thomas Rabaix

unread,
Jun 8, 2015, 5:52:02 AM6/8/15
to snky1987, sonat...@googlegroups.com
Ok; weird I don't have react on my local machine. You can try to tract which code requires react and change the version to match the one which is compatible with php 5.3

also, share your finding ;)

snky1987

unread,
Jun 8, 2015, 6:07:20 AM6/8/15
to sonat...@googlegroups.com, tho...@rabaix.net
Thanks,

It was very easy to find :) When I searched for "React\Promise" across project I received almost every single file form "guzzlehttp/ringphp" :)
Next vendor lib that require PHP >5.4.0 is "guzzlehttp/streams".

But getting back to issue. guzzlehttp/ringphp is used as dependency by guzzlehttp/guzzle and there is no version of guzzlehttp/ringphp that doesn't require "react/promise ~2.0"

Also I couldn't find "react/promise" version that is compatible with php 5.3

Thomas Rabaix

unread,
Jun 8, 2015, 8:52:18 AM6/8/15
to sonat...@googlegroups.com
You should lower the guzzle version then.

--
You received this message because you are subscribed to the Google Groups "sonata-devs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonata-devs...@googlegroups.com.
To post to this group, send email to sonat...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages