-
-
Notifications
You must be signed in to change notification settings - Fork 181
Change order of $factories #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👍 I'll test. |
@B3njamin could you rebase your branch against the master to avoid these extra commits? Thanks |
e13ea11
to
3348ee5
Compare
Sure - done :) |
@miniche could you test that? |
- Allows users to use the service container across other factories, for example in the session storage factory
3348ee5
to
60aeedc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trade that we can do currently without a refactoring for factories it just to get the depending service outside of the constructor.
|
||
// available list of factories | ||
$factories = array('view_cache_manager', 'logger', 'i18n', 'controller', 'request', 'response', 'routing', 'storage', 'user', 'view_cache', 'mailer', 'service_container'); | ||
$factories = array('service_container', 'view_cache_manager', 'logger', 'i18n', 'controller', 'request', 'response', 'routing', 'storage', 'user', 'view_cache', 'mailer'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service container depends on user
and routing
(e.g; sfContext::getServiceContainer()
).
For example try to get a service
that depend on user
inside the constructor of the response
class.
You will caught that the sfContext::getInstance()->getUser()
return null
.
Another topic but it would be good to provide at least i18n
and mailer
as service.
example in the session storage factory