Support from Acquia helps fund testing for Drupal Acquia logo

Comments

penyaskito created an issue. See original summary.

Satyanarayan Reddy’s picture

Status: Active » Needs review
FileSize
1.46 KB

Apply patch deprecated usage

penyaskito’s picture

@Satyanarayan Reddy Thanks!!!

penyaskito’s picture

penyaskito’s picture

Status: Needs review » Needs work
Issue tags: +Novice

We are missing url(), let's do those in the same patch

penyaskito’s picture

Let's add credit to @Munavijayalakshmi who worked on #2875917: Replace deprecated entity->urlInfo() method with entity->toUrl()., and let's use this issue instead of that one.

aleevas’s picture

Status: Needs work » Needs review
FileSize
10.12 KB
9.99 KB

Here is my patch.
It includes changes for both deprecated functions: url() and urlInfo()

Status: Needs review » Needs work

The last submitted patch, 8: 3066861-8.patch, failed testing. View results

rpayanm’s picture

Status: Needs work » Needs review
FileSize
10.13 KB
15.01 KB

Status: Needs review » Needs work

The last submitted patch, 10: 3066861-10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

rpayanm’s picture

Status: Needs work » Needs review
FileSize
2.17 KB
15.03 KB

Status: Needs review » Needs work

The last submitted patch, 12: 3066861-12.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

rpayanm’s picture

Status: Needs work » Needs review
FileSize
1.09 KB
15.06 KB

Status: Needs review » Needs work

The last submitted patch, 14: 3066861-14.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

rpayanm’s picture

Status: Needs work » Needs review
FileSize
1.12 KB
15.06 KB

Status: Needs review » Needs work

The last submitted patch, 16: 3066861-16.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

aleevas’s picture

Here is my patch

aleevas’s picture

FileSize
14.9 KB
3.8 KB

Next turn :)

aleevas’s picture

FileSize
15.02 KB
3.8 KB

Never mind, keep doing...
(I'm just lazy to properly configure the phpunit stuff :)

aleevas’s picture

Status: Needs work » Needs review
penyaskito’s picture

Status: Needs review » Needs work

This looks great, thanks!
Only a couple of change requests:

  1. +++ b/src/Moderation/LingotekContentModerationSettingsForm.php
    @@ -62,8 +70,10 @@ class LingotekContentModerationSettingsForm implements LingotekModerationSetting
    +  public function __construct(ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, LingotekModerationConfigurationServiceInterface $moderation_configuration, EntityTypeBundleInfoInterface $entity_type_bundle_info, ContainerInterface $container, UrlGeneratorInterface $url_generator) {
    
    @@ -73,6 +83,7 @@ class LingotekContentModerationSettingsForm implements LingotekModerationSetting
    +    $this->urlGenerator = $url_generator;
    

    For backwards compatibility, $url_generator should be NULL by default and we should trigger an error.

    Like:

        if (!$entity_type_manager) {
          @trigger_error('The entity_type.manager service must be passed to LingotekConfigSubscriber::__construct, it is required before Lingotek 9.x-1.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
          $entity_type_manager = \Drupal::service('entity_type.manager');
        }
    
  2. +++ b/src/Moderation/LingotekWorkbenchModerationSettingsForm.php
    @@ -50,8 +58,10 @@ class LingotekWorkbenchModerationSettingsForm implements LingotekModerationSetti
    -  public function __construct(ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, LingotekModerationConfigurationServiceInterface $moderation_configuration, ContainerInterface $container) {
    +  public function __construct(ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, LingotekModerationConfigurationServiceInterface $moderation_configuration, ContainerInterface $container, UrlGeneratorInterface $url_generator) {
    
    @@ -60,6 +70,7 @@ class LingotekWorkbenchModerationSettingsForm implements LingotekModerationSetti
    +    $this->urlGenerator = $url_generator;
    

    Same here.

aleevas’s picture

Status: Needs work » Needs review
FileSize
15.58 KB
5.26 KB

@penyaskito
here my fixed patch

Status: Needs review » Needs work

The last submitted patch, 23: 3066861-23.patch, failed testing. View results

penyaskito’s picture

Status: Needs work » Reviewed & tested by the community

That looks really good, thanks! Re-testing as those test errors are unrelated.

penyaskito’s picture

Status: Reviewed & tested by the community » Fixed

Committed 46920a6 and pushed to 8.x-2.x. Thanks all involved!

  • penyaskito committed 46920a6 on 8.x-2.x authored by aleevas
    Issue #3066861 by aleevas, rpayanm, Satyanarayan Reddy,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.