fluid-components
fluid-components copied to clipboard
Add component backtrace on invalid argument exception
If an invalid argument is passed to a component an exception is thrown:
The argument "image" defined in "Foo\Bar\FluidComponents\Component\Image" has declared type "SMS\FluidComponents\Domain\Model\Image", but "NULL" was give
Sometimes it's really hard to figure out where the error occurs. It would be very helpful to have a component stack backtrace in the exception.
The argument "image" defined in "Foo\Bar\FluidComponents\Component\Image" has declared type "SMS\FluidComponents\Domain\Model\Image", but "NULL" was give in Foo\Bar\FluidComponents\Module\Layout\Page\Default -> Foo\Bar\FluidComponents\Module\Footer -> Foo\Bar\FluidComponents\Module\LogoBox -> Foo\Bar\FluidComponents\Component\Link -> Foo\Bar\FluidComponents\Component\Image
Good idea! This could be based on #144 which introduces a data structure for component metadata.
Yeah I have a patch ready based on a previous patch of named slots. I can push it one rebased on master