Closed (outdated)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
1 Jun 2019 at 14:06 UTC
Updated:
21 Dec 2019 at 02:10 UTC
Jump to comment: Most recent, Most recent file
This is a followup to #2985600: [Drupal 8.6.x] EntityManager has been split into 11 classes.
We're still using the 'entity.manager' service in quite some of our classes, leading at least to quite some deprecation notices.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3058878_12-13_interdiff.txt | 825 bytes | pancho |
| #13 | webform_entity_manager_3058878-13.patch | 17.11 KB | pancho |
| #12 | 3058878_11-12_interdiff.txt | 4.54 KB | pancho |
| #12 | webform_entity_manager_3058878-12.patch | 17.12 KB | pancho |
| #11 | 3058878-11.patch | 17.01 KB | jrockowitz |
Comments
Comment #2
panchoEnclosed patch should fix all of them, while striving to be BC not just for callers, but also for extending classes.
Most probably we'll still see one or the other test fail, but Webform tests are too heavy to be run on my local machine.
Comment #3
panchoOh wow, this looks massive. Let's untangle it one by one, though.
Most certainly, there's more, but this one should already be significantly better.
Comment #4
panchoNice. At least D8.8 is green now.
Same for WebformSubmissionViewBuilder and EntityViewBuilder.
Also, more reverts in WebformSubmissionStorage... :/
Comment #5
panchoSame for WebformSubmissionViewController and EntityViewController.
Also, yet another revert in WebformSubmissionStorage.
We should be getting closer, but it might still take one or the other iteration.
Comment #6
panchoNot too many remaining test failures. One more revert, and this patch might test green.
Note however that the PHP 5.6 failures are because webform 5.x is already broken on PHP 5.6.
Comment #7
panchoFound a much better solution for WebformSubmissionStorage.
So if it still tests green, I think we're finally ready for review.
Comment #8
panchoWe currently don't really need the
$entityFieldManagerin WebformSubmissionStorage.Instead, we may (and should) use
SqlContentEntityStorage::getFieldStorageDefinitions(). While it is deprecated as well in D8.7, replacing it by entityFieldManager's getActiveFieldStorageDefinitions() should be a separate issue. I therefore filed #3058902: [Drupal 8.7.x] Replace the deprecated SqlContentEntityStorage::getFieldStorageDefinitions() as a followup.Also fixed the issue causing the test fails in #7. Are we green again now?
Comment #9
panchoTests are green, except for PHP 5.6, which is due to #3058899: Unpredictable order of confirmation and notification mails breaks tests on PHP5.
Ready for review.
Comment #10
panchoComment #11
jrockowitz commentedRe-rolling patch
Comment #12
panchoSome minor fixes.
Comment #13
panchoFixing another CS issue.
Comment #14
jrockowitz commentedThis patch should just target #3055154: [meta] Require Drupal 8.7.x..
Comment #15
jrockowitz commentedComment #16
jrockowitz commentedComment #17
panchoSorry, but I don't see why it should. At least not in its entirety.
Why do we want to keep using deprecated Core functions without any necessity?
The argument might be that you're not willing to add any BC band-aid code only to remove it in December. That'd be understandable.
A solution might be: fix now, what may be finally fixed; fix in December, whatever we can't fully fix now.
Comment #18
jrockowitz commentedI would rather, we set up and commit a single patch that resolves the issue completely. I just updated the issue queue test bot to use 8.7.x instead of 8.6.x.
Comment #19
panchoThere’s no “resolving the issue completely.” For each Core version, there are new deprecations, as you know.
We may only fix whatever may be fixed for particular Core versions we’re continuing to support.
As of 8.6, there’s more we can fix than we’ve done. #2985600: [Drupal 8.6.x] EntityManager has been split into 11 classes was a nice start, but remains incomplete.
Let me show you in another patch what may be done now without adding any BC band-aid. If you don’t like it, we may still push it to December.
Comment #20
jrockowitz commentedAfter Drupal 8.8.0 is released on December 4, 2019, no more APIs will be deprecated.
Personally, I don't want to commit a patch that says in six months someone (possibly me) has to do more work.
Comment #21
jrockowitz commentedComment #22
seanrNow that 8.8.1 is out, I suggest reopening this (and have done so).
Comment #23
jrockowitz commentedThe patch and approach from #3067546: [Webform 6.x] Fix subclassing and stop overriding constructors is the best way to resolve this issue.
Please review the patch from #3067546: [Webform 6.x] Fix subclassing and stop overriding constructors and read https://www.jrockowitz.com/blog/webform-road-to-drupal-9