Closed (fixed)
Project:
Entity API
Version:
8.x-1.x-dev
Component:
Code - misc
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2021 at 10:55 UTC
Updated:
14 Apr 2022 at 20:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
aardwolf commentedComment #3
tr commentedComment #4
tr commentedThe D9 test failures are branch failures not related to this patch.
The D8 test failures are because this patch is incompatible with D8 (and with D9.0).
I would suggest postponing this issue for a few months until D9.1 is the lowest-supported version of Drupal core, that way this fix won't break any existing sites.
Comment #5
tr commentedWhere did you see this deprecation error? I don't see it in any of the test output. I do see a similar warning when running drupal-check though.
Why did you do this:
instead of the backwards-compatible:
which is described in the change record?
The biggest problem with these changes to events is the backwards compatibility with all currently-supported versions of Drupal and with contrib. We should try to take advantage of the BC layer when possible.
Here is a new check. It removes the drupal-check warning for me.
Comment #7
tr commentedThe results of #5 are the same as the branch test. But since these deprecations don't show up in the Drupal CI test results I wouldn't expect to see any differences when using the patch ...
Comment #8
aardwolf commentedhttps://api.drupal.org/api/drupal/vendor%21symfony%21event-dispatcher%21...
@deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead
Comment #9
tr commentedThe relevant document is the change record at https://www.drupal.org/node/3159012 (including the references in the CR) which explains how Drupal is handling the changes between Symfony 4 and Symfony 5, and the plan for keeping backwards compatibility with existing code until Drupal 10.
Comment #10
berdirAll D10 deprecations have been fixed in #3267595: Support Drupal 10, the module is passing test against D10 now.
Comment #11
tr commentedAnd that D10 issue was done without reference to any of what I wrote above, so it did the wrong thing. This really should have been handled here where the discussion was.
The patch used the Contracts version of Event rather than the Drupal BC layer like the change record recommended:
Comment #12
tr commentedRe-roll of #5 to apply after the changes from #3267595: Support Drupal 10
Comment #13
mglamanI missed that the other issue didn't use Drupal's compatibility layer for the event. +1 for this
Comment #15
mglamanCommitted, thanks @TR