测试使用pear安装,官方建议使用Composer安装
1. 添加doctrine初始化通道
1
2
3
|
pear channel-discover pear.symfony.com
//这个是doctrine所依赖的
pear channel-discover pear.doctrine-project.org
|
2. 安装doctrine核心包
1
2
3
4
5
6
7
8
9
|
//DoctrineCommon是其他核心包的依赖
pear install pear.doctrine-project.org/DoctrineCommon-2.2.3
pear install pear.doctrine-project.org/DoctrineORM-2.2.3
//此时会安装一下4个包
//install ok: channel://pear.symfony.com/Console-2.1.0
//install ok: channel://pear.symfony.com/Yaml-2.1.0
//install ok: channel://pear.doctrine-project.org/DoctrineDBAL-2.2.2
//install ok: channel://pear.doctrine-project.org/DoctrineORM-2.2.3
|
3. 此时在php的lib目录下会增加Doctrine/和Symfony/,由于在使用doctrine中需要使用Symfony/,所以将Symfony/移动至Doctrine/下