I have a ZF2 based upon the ZF2 Skeleton. How can I find out, which ZF2 version is currently being used?
echo Zend_Version::VERSION; Which will result in something like this: 1.10. 8.
Go to https://github.com/zendframework/ZendSkeletonApplication and click the “Zip” button. This will download a file with a name like ZendSkeletonApplication-master. zip or similar. Unzip this file into the directory where you keep all your vhosts and rename the resultant directory to zf2-tutorial.
As per zend framework official site, version can be retrieved with command
echo Zend_Version::getLatest();
So, to access PHP in Terminal run
php -a
then
echo "Zend engine version: " . zend_version();
and press enter button to get the version information something like
Zend engine version: 2.6.0
Or check VERSION value in file Zend/Version.php if your project is using some specific version of zend framework.
With the Composer's show
command in the root directory of the (ZF2 Skeleton based) project:
$ cd /path/to/project/
$ php composer show --installed
...
zendframework/zendframework 2.1.4 Zend Framework 2
...
If for whatever reason you didn't use composer
to install ZF2 (come on! what's wrong with you, always use composer
:)) you can run your app from the console to check the version:
$ cd <project_root>
$ php public/index.php
This assumes that index.php
is your ZF2 front controller.
This will output something like:
Zend Framework 2.1.4 application
Usage:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With