Problem/Motivation

Is Webform compatible with PHP 8?

CommentFileSizeAuthor
#9 3189960-9.patch991 bytesjrockowitz

Issue fork webform-3189960

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

Universaldenker created an issue. See original summary.

jrockowitz’s picture

Version: 6.0.0-beta3 » 6.x-dev
Category: Feature request » Task
necalex’s picture

The data in the forms are saved on the site, but do not go by email to admin
Drupal 9.1.0, PHP 8.0 , Webform 6.0.0

jrockowitz’s picture

jrockowitz’s picture

Status: Active » Needs work

I could not get php-compatibility check working but this could help confirm that Webform is compatible with PHP8.

jrockowitz’s picture

Drupal test bot now supports PHP 8. @see https://www.drupal.org/pift-ci-job/2000439

I think someone could create an issue forks, run the test bot to catch all the PHP 8 issues, and then fix them.

Let's see what happens with the current test run.

paulocs made their first commit to this issue’s fork.

cilefen’s picture

@jrockowitz A standalone PHP-Compatibility scan finds nothing on 6.x. That's not a guarantee of success, but it's something.

~/Downloads/webform [6.x] $ phpcs --runtime-set testVersion 8.0 --standard=~/.composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility --extensions=php,module,install,inc,theme .
~/Downloads/webform [6.x] $
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new991 bytes

@cilefen Thanks for doing the scan. I did not know that PHP Code Sniffer supported this feature.

It seems helpful to add PHP version compatibility checking to RELEASE-NOTE.md.

Once I commit the attached patch we should close this ticket.

  • jrockowitz authored eb2808a on 8.x-5.x
    Issue #3189960 by jrockowitz, paulocs: Webform on PHP 8
    

  • jrockowitz authored eb2808a on 6.x
    Issue #3189960 by jrockowitz, paulocs: Webform on PHP 8
    
jrockowitz’s picture

jrockowitz’s picture

Status: Needs review » Fixed
paulocs’s picture

Status: Fixed » Needs work

This issue is not fixed yet.
If you run a drush command like drush webform-export with PHP 8, the error bellow is displayed:
Error: Unknown named parameter $webform in call_user_func_array()
See: https://www.php.net/manual/en/function.call-user-func-array.php#125953
I'll open a follow-up issue to fix it.

paulocs’s picture

Btw phpcs does only a static validation.

cilefen’s picture

@paulocs Sounds good, thank you. The compatibility scanner is not comprehensive.

jrockowitz’s picture

Status: Needs work » Fixed

Marking this fixed because the known PHP 8 issue was resolved in a new ticket

Status: Fixed » Closed (fixed)

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