-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to customize which identifiers to enqueue #5
Comments
A quick but not so clean way to do this is to dispatch an event in the @webgriffe/wg-devs @aleho what do you think? |
This would certainly be a quick win without having to BC break the importer / API client. On the other hand using the official API client is much more fun and should prove a stable investment in the long run. (I personally don't really enjoy using too many event handlers because that tends to get very messy and needs tidy documentation and developers.) |
Hi @aleho I agree that switching to the official would be much better and we already have it ready in the #20 PR. Anyway it brings too many BC breaks and we can merge it in 2.0 only. I also agree that events are messy especially when debugging, anyway they are good for providing extension points which is the goal of the issue. |
Adding the event dispatcher to the ApiClient sounds too messy. Moreover it's very hard to test this behavior. After thinking about this I figured that it's better to wait the 2.0. In 1.x users can still decorate the ApiClient to customize the filter. |
Now that we have the official Akeneo API client we decided to dispatch an event in |
Currently the responsibility to find which are the identifiers to enqueue is given to the importer which have to implement the method
\Webgriffe\SyliusAkeneoPlugin\ImporterInterface::getIdentifiersModifiedSince()
.So if one wants to customize that logic (for example adding some kind of filter) he needs to replace the entire importer.
So I suggest to isolate the responsibility of finding identifiers that have been modified since a given date to a dedicated interface.
The text was updated successfully, but these errors were encountered: