项目连接:PHP致命错误:找不到类'FOS \ Rest \ Util \ Codes'

时间:2012-04-29 22:17:11

标签: php symfony

我正在尝试在osx lion上安装以下项目connect

cd /tmp
git clone git://github.com/dsyph3r/connect
cd connect
git submodule update --init

php bin/vendors install

当我运行以下命令php bin/vendors install时,我收到以下消息:

PHP Fatal error:  Class 'FOS\Rest\Util\Codes' not found in /private/tmp/connect/vendor/bundles/FOS/RestBundle/DependencyInjection/Configuration.php on line 115

Fatal error: Class 'FOS\Rest\Util\Codes' not found in /private/tmp/connect/vendor/bundles/FOS/RestBundle/DependencyInjection/Configuration.php on line 115
PHP Fatal error:  Class 'FOS\Rest\Util\Codes' not found in /private/tmp/connect/vendor/bundles/FOS/RestBundle/DependencyInjection/Configuration.php on line 115

Fatal error: Class 'FOS\Rest\Util\Codes' not found in /private/tmp/connect/vendor/bundles/FOS/RestBundle/DependencyInjection/Configuration.php on line 115

我错过了什么?

P.S。

more app/config/parameters.ini
[parameters]
    database_driver="pdo_mysql"
    database_host="localhost"
    database_port=""
    database_name="connect"
    database_user=""
    database_password=""
    mailer_transport="smtp"
    mailer_host="localhost"
    mailer_user=""
    mailer_password=""
    locale="en"
    secret="xxxx"


more deps | grep FOSRest 
[FOSRest]
    git=git://github.com/FriendsOfSymfony/FOSRest.git
[FOSRestBundle]
    git=git://github.com/FriendsOfSymfony/FOSRestBundle.git

1 个答案:

答案 0 :(得分:0)

HTTP状态代码已在npm i cordova -g 中提供。

Symfony\Component\HttpFoundation\Response

你可以像这样使用它:

//...
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102;            // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
//...