yiisoft / yii-web

Yii web components
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
78 stars 46 forks source link

yii\web\User dependend from Yiisoft\Rbac\CheckAccessInterface #71

Closed Insolita closed 5 years ago

Insolita commented 5 years ago

yii\web\User require implementation of Yiisoft\Rbac\CheckAccessInterface so it force us to install yii-rbac package even we don't want to use it. Also yii-web has'nt yii-rbac as production dependency, so seems something wrong

Additional info

Q A
Yii version 3.0@dev
SamMousa commented 5 years ago

I think the implementation https://github.com/yiisoft/yii2/blob/master/framework/rbac/CheckAccessInterface.php

Should be moved to the core package in yii3; possibly in some kind of contracts or interfaces namespace.

samdark commented 5 years ago

I'd suggest yiisoft/access.

SamMousa commented 5 years ago

@samdark what else would go there? Does it not make more sense to gather contracts that are used by the core (even if it comes with no implementations) in a contracts namespace? (Note i'm not sure that this specific interface is used by the core)

samdark commented 5 years ago

Nothing.

Does it not make more sense to gather contracts that are used by the core (even if it comes with no implementations) in a contracts namespace?

No. That's what Symfony/Laravel did previously. I was slightly grumpy about it there so Symfony is splitting now: https://github.com/symfony/symfony/issues/31567

SamMousa commented 5 years ago

Ah, that makes sense!

samdark commented 5 years ago

https://github.com/yiisoft/access/issues/1

samdark commented 5 years ago

Done.