Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Prashant.c created an issue. See original summary.

Prashant.c’s picture

Status: Active » Needs review
FileSize
3.88 KB

Patch needs to be tested and reviewed.

Status: Needs review » Needs work

The last submitted patch, 2: deprecated-drupal-set-message-2958710-8.x-2.x-dev-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gbyte’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Priority: Normal » Minor
Status: Needs work » Postponed

Thanks, but I would rather implement this after core 8.6 comes out, as this seems to be a new service which won't work prior to 8.5. Lots of people are still on core < 8.5.

gbyte’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Postponed » Needs work

Feel free to port the patch to 8.x-3.x, I will gladly review and commit.

Prashant.c’s picture

@gbyte.co

I have submitted patch for 8.3.x and tested it locally for installation message which seems to be working fine.
Putting this in Review so that other scenarios can be tested.

gbyte’s picture

Status: Needs review » Needs work
Prashant.c’s picture

@gbyte.co

using use Drupal\Core\Messenger\MessengerInterface instead of use Drupal\Core\Messenger\Messenger

But iam not able to figure out why it throwing error

The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Argument 3 passed to Drupal\simple_sitemap\Logger::__construct() must implement interface Drupal\Core\Messenger\MessengerInterface, none given, called in /var/www/html/drupal/core/lib/Drupal/Component/DependencyInjection/Container.php on line 266 and defined in Drupal\simple_sitemap\Logger->__construct() (line 67 of modules/simple_sitemap/src/Logger.php). 

  • gbyte.co committed 3cad69a on 8.x-3.x
    Issue #2958710 by Prashant.c: Replace usages of the deprecated...
gbyte’s picture

Status: Needs work » Fixed

@Prashant.c It failed because you were trying to inject the new service through the static create function, but that's how you would usually do it in a controller or plugin context. In services you usually inject other services into the constructor through the services file, see the commit above.

  • gbyte.co committed fb1c15b on 8.x-3.x
    Issue #2958710 by Prashant.c: Replace usages of the deprecated...
gbyte’s picture

Forgot to commit the Logger class. :|

Status: Fixed » Closed (fixed)

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