Problem/Motivation

Patch updating code and states based on update status audit.

Proposed resolution

================================================================================
A11Y: Form Helpers, 2.0.1
Scanned on Mon, 08/19/2024 - 15:28

FILE: modules/contrib/a11y_form_helpers/a11y_form_helpers.module

STATUS LINE MESSAGE
--------------------------------------------------------------------------------
Check manually 136 Call to deprecated function watchdog_exception(). Deprecated
in drupal:10.1.0 and is removed from drupal:11.0.0. Use Use
Drupal\Core\Utility\Error::logException() instead.
--------------------------------------------------------------------------------
Check manually 178 Call to deprecated function watchdog_exception(). Deprecated
in drupal:10.1.0 and is removed from drupal:11.0.0. Use Use
Drupal\Core\Utility\Error::logException() instead.
--------------------------------------------------------------------------------

FILE: modules/contrib/a11y_form_helpers/a11y_form_helpers.info.yml

STATUS LINE MESSAGE
--------------------------------------------------------------------------------
Check manually 4 Value of core_version_requirement: ^9 || ^10 is not
compatible with the next major version of Drupal core. See
https://drupal.org/node/3070687.
--------------------------------------------------------------------------------

Patch attached for updating code.

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

emptyvoid created an issue. See original summary.

rajan kumar@2026 made their first commit to this issue’s fork.

rajan kumar@2026’s picture

Status: Active » Needs review
StatusFileSize
new15.29 KB

Hi @emptyvoid

I have applied the above patch successfully and created a (MR). I tested it in the local environment and also checked the Drupal Upgrade Status module for compatibility with Drupal 11. A screenshot is attached for reference. Thank you.

marty2081’s picture

Version: 2.0.1 » 2.0.x-dev
Status: Needs review » Needs work

The patch is incorrect. The following code will fail:

Error::logException('a11y_form_helpers', $exception);

The logException() method requires the first argument to be a class that implements the LoggerInterface and not a string. See https://www.drupal.org/node/2932520

The code should be:

   $logger = \Drupal::logger('a11y_form_helpers');
  Error::logException($logger, $exception);

The second question is why catching the PluginException is replaced by catching Exception?

marty2081’s picture

StatusFileSize
new1.45 KB

And here is an updated patch.

marty2081’s picture

Status: Needs work » Needs review
marty2081’s picture

marty2081’s picture

StatusFileSize
new2.92 KB

Scratch my previous patch. I found out the first try/catch was useless anyway, so this new patch removes that and also makes sure an empty array is returned when there is no purpose.

Here is an updated patch.

tessa bakker’s picture

Version: 2.0.x-dev » 2.1.0
Status: Needs review » Fixed

Thanks all!

Status: Fixed » Closed (fixed)

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