zendframework / zend-servicemanager

ServiceManager component from Zend Framework
BSD 3-Clause "New" or "Revised" License
188 stars 89 forks source link

ReflectionBasedAbstractFactory should not be expected to instantiate private constructors #268

Closed asgrim closed 5 years ago

asgrim commented 6 years ago

I noticed that when using the ReflectionBasedAbstractFactory, it chokes when classes with private constructors are used. These types of classes should be ignored from the start, so I've updated canCreate to return false where any class has a private constructor.

asgrim commented 6 years ago

@webimpress thanks for review! updated

GeeH commented 5 years ago

Can this be merged now @weierophinney

Ocramius commented 5 years ago

@GeeH @asgrim we need this to re-target develop, since it is a bug fix

weierophinney commented 5 years ago

Um... Bugfixes target master, features/improvements target develop; can you clarify what you meant please, @Ocramius?

On Fri, Dec 14, 2018, 6:39 AM Marco Pivetta <notifications@github.com wrote:

@GeeH https://github.com/GeeH @asgrim https://github.com/asgrim we need this to re-target develop, since it is a bug fix

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zendframework/zend-servicemanager/pull/268#issuecomment-447313350, or mute the thread https://github.com/notifications/unsubscribe-auth/AABlVxGhQyAss6hGv6NwxJpkcIGpaCnJks5u45vygaJpZM4T2hee .

Ocramius commented 5 years ago

ReflectionBasedAbstractFactory currently crashes hard when a ctor is private: I re-labeled this as bug.