- Merge request !52Issue #3305392: [PP-1] Compatibility with new `EntityInterface::[get|set]OriginalDefaultRevision()` β (Merged) created by bradjones1
- π¦πΉAustria drunken monkey Vienna, Austria
Thanks a lot for notifying me about this change. Letβs see if/when it will get merged in Core.
- πΊπΈUnited States bradjones1 Digital Nomad Life
Updated method name to match the core patch. It's... close?
- First commit to issue fork.
- Status changed to Needs review
5 months ago 11:56am 19 December 2024 - π¨πSwitzerland berdir Switzerland
This has been merged now into core.
I updated setOriginal() directly in the merge request but didn't manually verify the definition is valid.
- π¦πΉAustria drunken monkey Vienna, Austria
Thanks, berdir!
This will have to wait until we depend on Drupal 11.2, but great to have it ready for that already. - π¨πSwitzerland berdir Switzerland
No it doesn't. This is a hard break on 11.2, but you can add it now, it's just an extra method that isn't actually there yet on the interface.
- π¨πSwitzerland berdir Switzerland
The problem is that search_api implements EntityInterface without extending from EntityBase, so new methods on the interface result in a fatal error.
This is a pattern copied from views module in core, I'm still not quite sure why it's necessary but would be nice to avoid doing that in the future I think, but that's out of scope, this is just about preparing for 11.2.
-
drunken monkey β
committed 86953087 on 8.x-1.x authored by
bradjones1 β
Issue #3305392 by bradjones1, berdir, drunken monkey: Added the new...
-
drunken monkey β
committed 86953087 on 8.x-1.x authored by
bradjones1 β
- π¦πΉAustria drunken monkey Vienna, Austria
Ah, of course, sorry! I had just created π Make use of the new EntityInterface::getOriginal() method Postponed for actually using the new methods (which of course needs the 11.2 dependency) so I was thinking about that when seeing this issue. But yes, we can and should of course fix that fatal error right away, thanks!
Now that I merged the latest HEAD into the fork the pipelines are also passing. So, merged.
Thanks again, everyone! - π¦πΉAustria drunken monkey Vienna, Austria
Come to think of it (a little late), we might also have made both methods throw a
\RuntimeException
since, logically, you shouldnβt ever pass or receive anUnsavedIndexConfiguration
object in an entity update hook, so making this cause a fatal error might have actually been a better idea.
But probably not worth the additional effort now (or at all), should almost definitely be fine as-is. Automatically closed - issue fixed for 2 weeks with no activity.