Closed (fixed)
Project:
Scheduler
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2019 at 10:04 UTC
Updated:
8 Mar 2019 at 12:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jonathan1055 commentedHere's the patch with all the left-over changes. Some things, such as correcting
@var Drupal\schedulerto@var \Drupal\schedulerare easy. But other things need a bit more explanation, e.g. what is the reason for usingEntityTypeManagerinstead ofEntityManagerComment #3
idebr commentedLooks good! I have two minor remarks:
There are similar @var parameters that need a prefix in the \Drupal\scheduler_rules_integration\Event namespace, for example ExistingNodeIsScheduledForPublishingEvent.php:
should be
@var \Drupal\node\NodeInterfaceEach service is typically placed on a new line throughout Drupal core.
Comment #4
thallesThanks for the invite @jonathan1055!
Guys, follow the patch!
Comment #5
idebr commentedThe patch in #4 applies correctly and fixes the remarks in #3.
Comment #6
jonathan1055 commentedGood work, thanks.
From #2 can you tell me
This was introduced by idebr in #12 of the other issue. I am not saying I disagree, I just want to know if there is a benefit in making this change. Scheduler appears to work the same with either version. But I expect there is a good reason to switch, so I would like to learn.
Comment #7
idebr commentedThe entity manager has been split up into different classes, see the change record at https://www.drupal.org/node/2549139
The usage of entity manager is becoming deprecated and will be removed before Drupal 9.0.0, see #2886622: Deprecate all EntityManager methods with E_USER_DEPRECATED
Comment #9
jonathan1055 commentedAh, that makes sense now, why it works the same with both. Thanks @idebr for the explanation and links.
Committed and fixed. Thank you all for this combined effort.
Comment #10
jonathan1055 commentedThe unused use statements were not detected by PHPCS, neither running on d.o. or the Travis test builds. The sniffs were used (see attached), so does anyone know how/why they were not detected?