You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Fatal error: Using $this when not in object context in /Users/cmcnulty/spies-error/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php(49) : eval()'d code on line 17
The text was updated successfully, but these errors were encountered:
I guess what I'd like to happen is for prophecy to disallow invoking the message with a sensible error, but I'm not sure if that stops any legitimate use-cases?
I just run into this, get the same error. PHP allows us to call static methods from instances of the class and considers this a valid case? See http://php.net/manual/en/language.oop5.static.php. A property declared as static cannot be accessed with an instantiated class object **(though a static method can)**.
This would be useful to be able to inject and Factory type classes.
This is an invalid case but should be handled better
Spec:
Object:
Output:
The text was updated successfully, but these errors were encountered: