0
votes

I'm trying to install Zend Framework 3, but I don't know why I get ZF 2.51. I've followed the Zend docs https://framework.zend.com/downloads and after I've launched the command to create the project if I go to the home of the project just created, I see "Welcome to Zend Framework 2" Congratulations! You have successfully installed the ZF2 Skeleton Application. You are currently running Zend Framework version 2.5.1. This skeleton can serve as a simple starting point for you to begin building your application on ZF2.

What I have wrong?

composer create-project zendframework/skeleton-application path/to/install

I've update Composer to the latest version 1.8.3, but I still can't use Zend 3. When I try to use: composer create-project zendframework/skeleton-application projectname "3.0" I get this error: [InvalidArgumentException]
Could not find package zendframework/skeleton-application with version ^3.0
.

1
In version 3, Zend\Version class in no longuer used. You can find if you are in version 3 by looking in composer.lock the version number of Zend\Mvc. It must be greter than 3.0 - Alain Pomirol
Given answer should work. However, instead you could download the Skeleton application, which gives you a basic working setup out of the box instead of just the vendor requirements (after you unzip/mount somewhere and run a composer install) - rkeet

1 Answers

0
votes

Try specifying a version number:

composer create-project zendframework/skeleton-application /path/to/install ^3.0

Worked for me. Looks like it automatically pulls an older version.