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
The recent change to add support for callables in model factories attributes broke our testsuite. #20692
I filtered the problem down to the change made in this commit 91765f5 where it checks if the attribute you give the factory is a callable.
In one of our factories, a possible value of an attribute is DIR, and it PHP will tell you this is callable (the dir() global function). So it will try to call dir() and pass it the attributes array, which will result in an exception: dir() expects parameter 1 to be a valid path, array given
Steps To Reproduce:
Create a model factory
Set one of the attributes to some global function name
Try to use the factory and see it fail
The text was updated successfully, but these errors were encountered:
Description:
The recent change to add support for callables in model factories attributes broke our testsuite. #20692
I filtered the problem down to the change made in this commit 91765f5 where it checks if the attribute you give the factory is a callable.
In one of our factories, a possible value of an attribute is
DIR
, and it PHP will tell you this is callable (thedir()
global function). So it will try to calldir()
and pass it the attributes array, which will result in an exception:dir() expects parameter 1 to be a valid path, array given
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: