我已经使用CodeIgniter一段时间了,但我不记得是安装了版本2还是只是从另一个项目中复制了文件。
有任何想法吗?
我已经使用CodeIgniter一段时间了,但我不记得是安装了版本2还是只是从另一个项目中复制了文件。
有任何想法吗?
请查看文件vendor/doctrine/orm/lib/Doctrine/ORM/Version.php
,其中有一个常量显示版本号。虽然在运行的应用程序中也可以访问该版本号,但这种方法更容易。
php composer.phar show --installed
或者
php composer.phar show -i | grep doctrine
输出将会是类似这样的内容:
doctrine/annotations v1.1.2 Docblock Annotations Parser
doctrine/cache v1.3.0 Caching library offering an object-oriented API for many cache backends
doctrine/collections v1.2 Collections Abstraction library
doctrine/common v2.4.1 Common Library for Doctrine projects
doctrine/data-fixtures v1.0.0 Data Fixtures for all Doctrine Object Managers
doctrine/dbal 2.3.4 Database Abstraction Layer
doctrine/doctrine-bundle v1.2.0 Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle v2.2.0 Symfony DoctrineFixturesBundle
doctrine/inflector v1.0 Common String Manipulations with regard to casing and singular/plural rules.
doctrine/lexer v1.0 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/orm 2.3.5 Object-Relational-Mapper for PHP
php composer.phar show --installed
给出了错误 Could not open input file: composer.phar
(我是从仓库顶层文件夹运行的)。我不得不运行 composer show --installed | grep doctrine
。 - SteveExdiaVendor/doctrine/orm/lib/Doctrine/ORM/Version.php
core.php
:
class Doctrine_Core
{
/**
* VERSION
*/
const VERSION = '1.2.4';
...
针对Windows用户:
在您的Symfony2项目中:
\vendor\doctrine\orm\lib\Doctrine\ORM\Version.php
/**
* Current Doctrine Version
*/
const VERSION = '2.4.6';
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
doctrine/orm v2.5.14 Object-Relational-Mapper for PHP
| grep
部分;如果你删除它,你将会看到项目中从 composer 安装的所有东西。你可以使用 | grep doctrine
来查看所有与 Doctrine 相关的已安装包版本。对于 Doctrine 版本 1.*,打开文件 /doctrine/Doctrine/Core.php
应该在开头看到版本号。
vendor/doctrine/orm/lib/Doctrine/ORM/Version.php
,我从我的项目文件夹中运行:cd vendor/doctrine/orm/ && grep -rn VERSION
。 - undefined