-
-
Notifications
You must be signed in to change notification settings - Fork 827
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
APIv4 - Deprecate unnecessary event #23311
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Standard links)
|
@jensschuppe I confirmed that the unit tests in ECK are still passing after this change. |
This seems fine to me |
unit tests might be on board but the style police aren't.... https://test.civicrm.org/job/CiviCRM-Core-PR/48340/checkstyle/ |
jensschuppe
added a commit
to systopia/de.systopia.eck
that referenced
this pull request
Apr 27, 2022
The "civi.api4.createRequest" event will be removed in CiviCRM Core, see civicrm/civicrm-core#23311. The "civi.api4.entityTypes" event provides all necessary information.
jensschuppe
added a commit
to systopia/de.systopia.eck
that referenced
this pull request
Apr 27, 2022
When civicrm/civicrm-core#23311 is merged, this event listener will be obsolete
colemanw
added a commit
to colemanw/de.systopia.eck
that referenced
this pull request
Apr 27, 2022
Keeping it around for now, but not requiring the class to prevent errors when it gets removed from core. See civicrm/civicrm-core#23311
Before: To implement a virtual API4 entity, an extension must listen to 2 events, one of which is redundant. After: Redundant event no longer used, as the one event returns all necessary data. All the info from `civi.api4.entityTypes` is sufficient to create an APIv4 request. `civi.api4.createRequest` was redundant.
Filtering out component entities at a low level was causing errors when trying to get basic info about an entity from a disabled component. It's better to do the filtering in the Entity.get action instead.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Makes it easier for extensions to hook into APIv4 entities by simplifying the events called.
Before
To implement a virtual API4 entity, an extension must listen to 2 events, one of which is redundant.
After
Redundant event no longer used, as the one event returns all necessary data.
Technical Details
All the info from
civi.api4.entityTypes
is sufficient to create an APIv4 request.civi.api4.createRequest
was redundant.