Closed EtienneBruines closed 5 years ago
Hello @akondas, thank you for your code review. It is much appreciated.
As per your suggestion, I changed !is_array
to is_object
. Additionally, I added a check to verify that if it's not an object, it should at least be an array - otherwise the code will crash in a weird manner anyways. Now a more useful error message is thrown.
Two tests were added:
testThrowExceptionWhenComponentHasInvalidValue
to verify the exception is thrown when the component value was invalid (e.g. a numeric value)testItLoadsServicesAndComponents
(updated) to verify that the additional component customInitializedComponent
is recognized.I wasn't quite sure what the getComponentIdentityClassById
method was supposed to do, so I didn't change it. I had to add a special condition for getComponentClassById
to make it perform as expected.
If you have any points of improvements, don't hesitate to mention them :smile:
Great, thanks for tests :+1:
Sometimes the components within the configuration may already be configured.
This change adds support for following config syntax: