How to download zend-expressive version 2?


#1

Apologies if this is a stupid question, but I can’t figure it out. I’m a junior php developer trying to learn ZF / expressive for my job and tried doing Matthew Setter’s ‘Zend-Expressive-Essentials’ course on Pluralsight. The problem is he’s done the course in Zend-Expressive version 2 and when I create a new expressive skeleton app via composer, I get version 3, which has a lot of differences.

The composer create-project syntax doesn’t seem to allow you to specify a version:

$ composer create-project zendframework/zend-expressive-skeleton expressive

and I can’t see how to get version 2 from github: https://github.com/zendframework/zend-expressive/tree/release-2.2

Any help would be appreciated.


#2

The opposite is the case. Look at the Composer documentation and use:

$ composer create-project zendframework/zend-expressive-skeleton expressive 2.*

https://getcomposer.org/doc/03-cli.md#create-project


#3

Of course, add the version as a third argument! I didn’t think of checking the composer docs rather than the zend docs…which I suppose doesn’t bode well for my coding career…

Thanks very much for your help.