foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Improve exception message

Open kbond opened this issue 3 years ago • 0 comments
trafficstars

https://github.com/zenstruck/foundry/blob/210faff9429ae8777001b9c89178d4a7c87c3026/src/ModelFactoryManager.php#L33

This should instead explain that the Factory $class isn't registered as a service. Even better, detect if using in unit test, and explain that factories with deps cannot be used in unit tests.

Per @OskarStark.

kbond avatar Nov 12 '22 13:11 kbond