kaliop-uk / ezmigrationbundle

This bundle makes it easy to handle eZPlatform / eZPublish5 content upgrades/migrations
GNU General Public License v2.0
53 stars 81 forks source link

Allow all matchers to be lenient if conditions match no items #235

Closed gggeek closed 4 years ago

gggeek commented 4 years ago

It is currently possible to use a location/load step to set a reference to a number of locations, if we use a matcher such as parent-location-id. In case the location specified as parent does not exist, the reference value will be an empty array. But if we use content-id or location-id match conditions instead of parent-location-id, there is no way to catch the exception that will be thrown by the matcher in case of a miss

gggeek commented 4 years ago

Note that most matchers apart from Location and Content ones (and possibly Tag and User) do throw an error when nothing is matched, as they only can match by Id and Identifier. This means that

gggeek commented 4 years ago

Changes in 5.13:

gggeek commented 4 years ago

Further changes (to be in 5.13) related to this problem: fix match of not(id) and not(identifier) which would trigger an error (for non content/location matches) when the requested id/identifier was not found

gggeek commented 4 years ago

Final fix: allow the user to specify 'lenient match' mode via yaml element match_tolerate_misses