简体   繁体   English

Zend Framework - 安装旧版本

[英]Zend Framework - Install an older version

I've already install ZF3. 我已经安装了ZF3。 But I'm working in a company that use only ZF2, and I must be able to use Doctrine too. 但我在一家只使用ZF2的公司工作,我也必须能够使用Doctrine。 Since the version 3 can't work with doctrine, I have to either downgrade it, or install an older version. 由于版本3无法使用doctrine,因此我必须降级它,或者安装旧版本。

But I can't see how to do it since http://framework.zend.com/download/archives does not exist anymore ? 但是,由于http://framework.zend.com/download/archives不再存在,我无法看到如何做到这一点?

I've tried to use composer install and change the composer.json to this: 我尝试使用composer install并将composer.json更改为:

{   
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
    "framework",
    "zf2"
],
"homepage": "http://framework.zend.com/",
"repositories": [
    {
    "type": "composer",
    "url": "https://packages.zendframework.com/"
}
],
"require": {
    "php": ">=5.4",
    "zendframework/zendframework": "2.*",
    "doctrine/doctrine-orm-module": "0.*"
}
}

But then I only got the vendor and composer.lock, and I can't create the project in the same folder since it is not empty. 但后来我只得到了供应商和composer.lock,我无法在同一个文件夹中创建项目,因为它不是空的。

How do I do this ? 我该怎么做呢 ?

Thank you in advance for your time! 提前谢谢您的时间!

PS: PS:

I'm using php 5.6, with Apache 2.2 我正在使用Apache 5.6,Apache 2.2

I found https://framework.zend.com/downloads/archives and could download version 2.4.9 but I'm a bit lost about how to install it correctly. 我找到了https://framework.zend.com/downloads/archives并可以下载2.4.9版本,但我对如何正确安装它有点迷茫。 By the way, I'm only looking for the Skeleton Application. 顺便说一句,我只是在寻找Skeleton Application。

SOLUTION: Just add the version number (here 2.5) at the end of the command : 解决方案:只需在命令末尾添加版本号(此处为2.5):

composer create-project -sdev --repository-url="https://packages.zendframework.com" zendframework/skeleton-application ./ 2.5

您也可以通过composer命令直接安装:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM