8

I can't find a standalone system that I can use for user management (authentication,authorization, register, password reminders...).

The closest it gets is using Symfony and FOSUserBundle but because it's a Symfony Bundle it seem to be dependant on the framework. Is there a way to separate these or at least to load only few components of symfony?

I've used symfony before and I like it; I just don't need the entire framework for the current project.

I couldn't find other solutions.

4

2 回答 2

3

老实说,大多数项目都有自定义需求。即使使用 FOSUserBundle 之类的东西,您也必须重新实现或编辑其中的很大一部分。

如果您的项目不是“时间攻击”项目,请花大约一周的时间来构建您自己的库。我并不是说你应该重新发明轮子——以现有代码为基础——但我认为大多数时候,真正花时间在开始项目之前进行设计的人是在足以证明其合理性的项目中这种自定义实现。

于 2011-10-26T23:43:19.423 回答
1

您可以尝试https://github.com/symfony/Security它的 Symfony2 组件,但可以“独立”使用。

来自 composer.json 文件的依赖 (https://github.com/symfony/Security/blob/master/composer.json#L19-24)

"symfony/event-dispatcher": ">=2.1",
"symfony/http-foundation": ">=2.1",
"symfony/http-kernel": ">=2.1"
于 2011-10-24T12:47:54.540 回答