Closed dusekdan closed 6 years ago
Well, I introduced review changes, but now some tests fail with error originating in DefaultMapper.getProperty(), because 'ELEMENTS' attribute is not present (presumably within Term class).
Stacktrace is as follows:
14) KenticoCloud\Tests\E2E\ModelBindingTest::testHomeModel
Undefined index: elements
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/DefaultMapper.php:80
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:120
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:236
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:164
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:130
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:263
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:168
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:130
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/ModelBinder.php:89
/home/travis/build/Kentico/delivery-sdk-php/src/KenticoCloud/Delivery/DeliveryClient.php:127
/home/travis/build/Kentico/delivery-sdk-php/tests/E2E/ModelBindingTest.php:94
And I just can not see the connection to my changes. For now, anyways. What am I missing?
it's because of unifying the taxonomy term classes. now you expect the /items api to return nested terms ($terms
) which is not the case. please either split the classes again or make one inherit the other...
5th time's the charm.
The taxonomy models are hierarchical.