Failed installation of zend-escaper with Composer

275 views Asked by At

I'm trying to install zend-escaper but I'm getting this error:

enter image description here

This is strange as my PHP version (from phpinfo()) is 5.5.19, the message claims it is 5.3.5(!) which should satisfy the requirement anyway.

My ZF version is 1.12.13 I'm using PHP Storm

Can anyone help please?

Thanks Tomasz

1

There are 1 answers

1
Sven On BEST ANSWER

The PHP version on the command line can be a different executable than the PHP running inside the web server. It also can use a different pho.ini configuration file.

So if Composer states the PHP it is using is 5.3.5, this is correct because Composer is directly asking the PHP it is running on for its version. The problem is when this PHP version on the command line is way older then the PHP version in the web server.

Try to update your command line PHP.

Some more things to say: the version 5.3.5 is lower than the required 5.3.23, because the last number in the version is 5 compared with 23, and 5 is less than 23. So the version you are using is below the minimum requirement for zend escaper - at least in the version 2.5.1 you try to use. Such an old PHP was last supported in the 2.2 framework versions, so you might as well try to depend on ~2.2. However this will simply be a workaround for the old cli version.

One other note: You are in the process of installing a zend framework 2 component - don't expect your installed zend framework 1 to support any fancy stuff on its own. It is possible to mix classes with namespaces and without, and even use zf2 things together with zf1, but zf1 won't offer any automatic functionality to use these.