Problem/Motivation

The procedural watchdog_exception() function has been deprecated in drupal 10.1.0 and is removed from drupal:11.0.0.
See: https://www.drupal.org/node/2932520

Proposed resolution

Use Error::logException instead

use \Drupal\Core\Utility\Error;

        catch (\Exception $e) {
          Error::logException($this->logger, $e);
        }

Note that this change requires Drupal 10.1, so it can't be merged into older branches.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork linkit-3422683

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

solideogloria created an issue. See original summary.

sarwan_verma’s picture

Status: Active » Needs review
StatusFileSize
new923 bytes

Hi @solideogloria

created patch please review,Thanks

Status: Needs review » Needs work

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

chandreshgiri gauswami’s picture

StatusFileSize
new2.51 KB

Created patch with DI to fix coding standard test failure.

solideogloria’s picture

solideogloria’s picture

Issue summary: View changes

solideogloria’s picture

Status: Needs work » Needs review

Please ignore MR !40. MR 41 is the correct one.

mark_fullmer’s picture

Title: watchdog_exception() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0 » [Drupal 11] watchdog_exception() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0
Version: 6.1.x-dev » 7.x-dev

  • mark_fullmer committed 267d91dc on 7.x
    Issue #3422683 by solideogloria, sarwan_verma, Chandreshgiri Gauswami: [...
mark_fullmer’s picture

Status: Needs review » Fixed

The merge request didn't apply against the latest changes in 7.x, but I've credited everyone in the commit message. Thanks for the work, folks!

solideogloria’s picture

Can you merge it into 6.x as well? There's no release for 7.x yet. Or are you planning to just leave the deprecated code in 6.x?

mark_fullmer’s picture

Can you merge it into 6.x as well? There's no release for 7.x yet. Or are you planning to just leave the deprecated code in 6.x?

The 7.x branch is the target branch for Drupal 11 compatibility; I don't plan to make the 6.x branch Drupal 11 compatible. Therefore, I don't think there's a need to change this deprecated code in the 6.x branch.

I do expect an alpha release of the 7.x branch in the coming weeks, FYI.

Status: Fixed » Closed (fixed)

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