Problem/Motivation

webform_localization shows that webform is failing PHP 8.2 dynamic properties for $export_wordwrap on the webform_exporter class in includes/exporters/webform_exporter.inc

W✓		-createWebformTranslation
✓		-createStringTranslation
✗	
__construct
exception: [Deprecated function] Line 18 of sites/all/modules/webform/includes/exporters/webform_exporter.inc:
Creation of dynamic property webform_exporter_delimited::$export_wordwrap is deprecated

exception: [Deprecated function] Line 18 of sites/all/modules/webform/includes/exporters/webform_exporter.inc:
Creation of dynamic property webform_exporter_delimited::$export_wordwrap is deprecated

....
several times

https://www.drupal.org/pift-ci-job/2569479

Steps to reproduce

See patch

Proposed resolution

See patch

Remaining tasks

See patch

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

I'm not 100% sure if this will fix the glitch however it won't cause a regression.

joseph.olstad’s picture

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned
Liam Morland’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

Testing uses the latest full release tag. That is probably the problem. If this is still a problem after a new full release is made, please re-open.

I do not think this patch does anything because NULL is the default value.

Please do not RTBC your own patches.

joseph.olstad’s picture

I see an RC release, but the automated testing will likely take the full release tag. Kind of surprised it doesn't take the dev. Maybe I can change the webform_localization.info file to use the dev release.

The newest patch fixes the PHP 8.2 error.

joseph.olstad’s picture

Status: Closed (works as designed) » Needs review

@Liam Morland

There's a typeo, my patch 12 fixes it

the property was defined as export_wordrap

it's missing the 'w' in 'wrap' this is why PHP 8.2 is FAILING in the webform_localization automated tests that rely on webform!

This line hasn't changed since 2015 commit was by Dan Chadwick 2015-02-27

fb70bc1850 (Dan Chadwick 2015-02-27 16:50:16 -0500 8) public $export_wordrap;

wordwrap is spelled with a W before the r

joseph.olstad’s picture

commit fb70bc1850d0d5651c97c7e71d297a7f9f5a9919
Author: Dan Chadwick <dan899@gmail.com>
Date:   Fri Feb 27 16:50:16 2015 -0500

    Issue #2420249 by DanChadwick: Added option to force Excel wordwrap.

diff --git a/includes/exporters/webform_exporter.inc b/includes/exporters/webform_exporter.inc
index 670600e02..3de1396f7 100644
--- a/includes/exporters/webform_exporter.inc
+++ b/includes/exporters/webform_exporter.inc
@@ -4,6 +4,7 @@
  */
 class webform_exporter {
   public $options = array();
+  public $export_wordrap;

the property is misspelled.

joseph.olstad’s picture

Related issues: +#3334007: PHP 5.3 fix

Liam Morland’s picture

Status: Needs review » Fixed

It would be nice to have test coverage that would surface this.

joseph.olstad’s picture

webform_localization automated tests surfaced this , so yes there are automated tests

joseph.olstad’s picture

@Liam Morland, just wondering, when is 4.25 going to be tagged and released?

Is the delay on webform 7.x-4.25 going to be two weeks?

It's been one week already.

Next saturday it will be two weeks since 7.x-4.25-rc2

Liam Morland’s picture

I usually make a full release once the RC is two weeks old with no release-blockers.

joseph.olstad’s picture

Looking forward to the release, as maintainer of webfirm_localization , I want the tagged release to get the fixes that resolve the automated test results fixed that are still failing due to the spelling error of export_wordwrap

The automated tests use the previous tagged release that has the bug.

joseph.olstad’s picture

There's also two other automated test fails that are failing due to what appears to be changes between webform releases since 2018
when I triggered tests for PHP 8.2 compatibility fixes, it was the first time webform_localization tests had been run since 21 Mar 2019 at 12:26 EDT when they last succeeded 100%

no code changes were made in webform_localization however two tests failed january 2023 in all versions of PHP.

Previously PHP 5.3 was passing as recently as 21 Mar 2019 at 12:26 EDT however since then PHP 5.3 does not pass.

joseph.olstad’s picture

@Liam Morland, it's been more than two weeks now, can you please push a full release tag including this PHP 8.2 fix?

Status: Fixed » Closed (fixed)

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