Problem/Motivation

Webform 6.x should support PHP 8.1.

Steps to reproduce

Switch to PHP 8.1 and run webform's automated tests.

Proposed resolution

Fix all PHP 8.1 tickets in one MR.

Below are the outstanding PHP 8.1 tickets which may be merged into one MR.

Remaining tasks

Research how Drupal core handler PHP 8.1 deprecations.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Issue fork webform-3283614

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

jrockowitz’s picture

For now, I am going to fix all PHP 8.1 notices via the broken tests.
@see https://www.drupal.org/pift-ci-job/2390910

jrockowitz’s picture

Liam Morland’s picture

Issue summary: View changes

Fixed typo

jrockowitz’s picture

Here is a zinger

PHP 8.1: HTML entity en/decode functions process single quotes and substitute by default
https://php.watch/versions/8.1/html-entity-default-value-changes

  • jrockowitz committed 9cd201a on 6.1.x
    Issue #3283614 by jrockowitz, Liam Morland, cilefen, jastraat, drupgirl...
jrockowitz’s picture

Status: Active » Fixed

  • jrockowitz committed 9cd201a on 6.x
    Issue #3283614 by jrockowitz, Liam Morland, cilefen, jastraat, drupgirl...

  • jrockowitz committed 9cd201a on 6.2.x
    Issue #3283614 by jrockowitz, Liam Morland, cilefen, jastraat, drupgirl...

Status: Fixed » Closed (fixed)

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

Rajab Natshah’s picture

Thank you so much for have time to work on this issue.

The commit on the 6.1.x branch
Issue #3283614 by jrockowitz, Liam Morland, cilefen, jastraat, drupgirl: Support PHP 8.1
jrockowitz authored Jun 01, 2022

It was released on the 6.2.x branch, But it's still beta
Hoping for a release on the 6.1.x stable branch.
Thank you, Jacob for the Webform module.

aaronpinero’s picture

I second Rajah's request. This error with preg_match is holding up my move from PHP 7.3 to PHP 8.1 because we depend on a webform that uses regex in the conditional logic.

greggles’s picture

Coming here to say the same thing as comments 17 and 18.

We're also working to upgrade to 6.2.x branch, but that will be a little bit longer before we can do that and we'd like to be on php 8.1 ASAP.

aaronpinero’s picture

I was able to composer require 'drupal/webform: 6.1.4-beta1'. That version also has the PHP 8.1 fixes. I might just move forward with that one while waiting for an officially supported release. So far in my testing this beta is okay.

Rajab Natshah’s picture

Updated this comment after:


Webform 6.1.4 was released 12 Jan 2023 by: jrockowitz
https://www.drupal.org/project/webform/releases/6.1.4


Webform 6.2.0-beta5 was released on: 12 Jan 2023 by: jrockowitz
https://www.drupal.org/project/webform/releases/6.2.0-beta5
Works with Drupal: ^9.4 || ^10
Thank you, Jacob!
  • Issue #3333038: Updated Webform from 6.1.3 to 6.1.4 ( ~6.0 ) and kept needed patches

Better not to move from Stable release to aBeta release on a live production site.

But that is OK for testing and WIP projects.

I'm using "drupal/webform": "~6.0", in my template project. To be sure that developers are only using a stable version on production.

At this time having the following commit patch file

    "patches": {
      "drupal/webform": {
        "Issue #3283614: Support PHP 8.1":
        "https://git.drupalcode.org/project/webform/-/commit/9cd201a.patch"
      }
    }

with "drupal/webform": "6.1.4",
Hoping for a release on the 6.1.x stable branch