yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.23k stars 6.91k forks source link

Class 'yii\rbac\PhpManager' not found #5113

Closed asofter closed 10 years ago

asofter commented 10 years ago

Hi, I've just updated yii2 with composer and I don't have yii\rbac\PhpManager file, so I have an error

Class 'yii\rbac\PhpManager' not found
"minimum-stability": "dev",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "*",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*",
        "yiisoft/yii2-authclient": "*",
        "yiisoft/yii2-imagine": "*",
        "asofter/yii2-imperavi-redactor": "*",
        "yiisoft/yii2-jui": "*",
        "asofter/yii2-tagsinput": "*",
        "2amigos/yii2-file-upload-widget" : "*",
        "2amigos/yii2-file-input-widget" : "*"
    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*"
    },
githubjeka commented 10 years ago

Just do not use the beta version. See https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#installing-via-composer-

asofter commented 10 years ago

how I can move to the normal version without reinstalling the whole project?

qiangxue commented 10 years ago

Run this command php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta1" first, and then composer update.

`

asofter commented 10 years ago

still have problem

now my composer json looks like

"minimum-stability": "dev",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "2.0.0-beta",
        "yiisoft/yii2-bootstrap": "2.0.0-beta",
        "yiisoft/yii2-swiftmailer": "2.0.0-beta",
        "yiisoft/yii2-authclient": "2.0.0-beta",
        "yiisoft/yii2-imagine": "2.0.0-beta",
        "yiisoft/yii2-jui": "2.0.0-beta",
        "asofter/yii2-tagsinput": "*",
        "2amigos/yii2-file-upload-widget" : "*",
        "2amigos/yii2-file-input-widget" : "*",
        "asofter/yii2-imperavi-redactor": "*"
    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*"
    },
qiangxue commented 10 years ago

Why do you change the version to 2.0.0-beta?

asofter commented 10 years ago

because dev version doesn't have class which I need

Class 'yii\rbac\PhpManager' not found
qiangxue commented 10 years ago

Did you run this command first? php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta1"

asofter commented 10 years ago

yes, but now it's not downloading assets to bower

qiangxue commented 10 years ago

Please following the first point in the UPGRADE guide: https://github.com/yiisoft/yii2/blob/master/framework/UPGRADE.md#upgrade-from-yii-20-beta

asofter commented 10 years ago

I followed, but now asset plugin is not working... I completely deleted and installed composer again

githubjeka commented 10 years ago

Dev version have class which you need https://github.com/yiisoft/yii2/blob/master/framework/rbac/PhpManager.php

Read guide.

asofter commented 10 years ago

Done Thanks