Problem/Motivation

A recent download of webform gave the following error due to changes in the WebformSubmissionStorage class that we extend in WebformEncryptSubmissionStorage.php

Error: Uncaught ArgumentCountError: Too few arguments to function Drupal\webform_encrypt\WebformEncryptSubmissionStorage::__construct(), 7 passed in C:\dev\sites\example\web\modules\contrib\webform_encrypt\src\WebformEncryptSubmissionStorage.php on line 68 and exactly 8 expected in C:\dev\sites\example\web\modules\contrib\webform_encrypt\src\WebformEncryptSubmissionStorage.php:51

Proposed resolution

The new arguments/injected dependencies need to be added to webform_encrypt, specifically the $access_rules_manager

Comments

Rob Holmes created an issue. See original summary.

rob holmes’s picture

StatusFileSize
new2.04 KB

Backwards compatibility will be an issue here but here are new parameters.

t-lo’s picture

Status: Active » Needs review

patch at #2 applies cleanly and resolves this issue for me.

SlayJay’s picture

StatusFileSize
new19.44 KB

Looks like they've yet again changed the constructor in the latest version.

I've attached a new patch incorporating the changes from the old patch here, plus the new changes.

Status: Needs review » Needs work

The last submitted patch, 4: 3007450-2.patch, failed testing. View results

marty2081’s picture

The patch from #2 applies fine in combination with Webform 8.x-5.1 and resolves the issue.

manuel garcia’s picture

Priority: Normal » Major

I feel this should at least be major. Thanks for reporting, and glad to see tests are catching it at the HEAD.

manuel garcia’s picture

Release notes for 5.0-rc22: https://www.drupal.org/project/webform/releases/8.x-5.0-rc12

Webform is itself already working on 5.2 though...

manuel garcia’s picture

Status: Needs work » Needs review
StatusFileSize
new2.84 KB

Here's a go at this against webform 8.x-5.x

Status: Needs review » Needs work

The last submitted patch, 9: 3007450-9.patch, failed testing. View results

manuel garcia’s picture

Status: Needs work » Needs review
StatusFileSize
new2.57 KB
new2.31 KB

Looks like on d.org ci its installing drupal/webform (5.1.0), which makes sense since that is the recommended version at the moment.

That said, it also has a BC breaking change in the WebformSubmissionStorage constructor so we should fix that here for now.

Once webform 5.2 stable is released we'll have to revisit this.

Status: Needs review » Needs work

The last submitted patch, 11: 3007450-11.patch, failed testing. View results

manuel garcia’s picture

Status: Needs work » Needs review

Opened up #3037909: 5.1 and 5.2 break backwards compatibilty on the webform issue queue.

manuel garcia’s picture

Status: Needs review » Needs work

OK now we just seem to be missing schemas for test_wizard_encryption:
webform.webform.test_wizard_encryption:settings.form_login missing schema, webform.webform.test_wizard_encryption:settings.form_login_message missing schema, webform.webform.test_wizard_encryption:settings.submission_login missing schema, webform.webform.test_wizard_encryption:settings.submission_login_message missing schema

manuel garcia’s picture

Status: Needs work » Needs review
StatusFileSize
new965 bytes
new3.25 KB

On #2943879: How to display alternate text when the user is not allowed to create a Webform ? they changed these configurations so our exported test webform needs updating. See webform_update_8143()

  • vijaycs85 committed 99669df on 8.x-1.x
    Issue #3007450 by Manuel Garcia, Rob Holmes, SlayJay: Incompatible with...
vijaycs85’s picture

Thanks all!

vijaycs85’s picture

Status: Needs review » Fixed
vijaycs85’s picture

Status: Fixed » Needs review
StatusFileSize
new341 bytes

Follow up to update the version constraint in the composer.json

Status: Needs review » Needs work

The last submitted patch, 19: 3007450-19.patch, failed testing. View results

manuel garcia’s picture

Just to update the status here, the maintainer of webform module was kind enough to fix the new BC breaking change on 5.2 (see #3037909: 5.1 and 5.2 break backwards compatibilty), which is great.

It also means we should be safe with the update to composer.json proposed on #19.

rob holmes’s picture

Thanks for taking this further... Lets get the version constraint added as there is no way to support the old constructor in conjunction with the new.

vijaycs85’s picture

Status: Needs work » Needs review

Just checking it locally:

➜  drupal8 git:(2880152) ✗ composer require "drupal/webform:>=5.0.0-rc22"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing drupal/webform (5.1.0): Downloading (100%)

If I install with this condition, we would get 5.1.0 for new projects and for existing installs with < 5.0.0-rc22, would update to 5.1.0 and existing installs with higher versions (e.g. 5.0.0-rc23) would stay same.

manuel garcia’s picture

Status: Needs review » Reviewed & tested by the community

I agree we should not force existing sites to upgrade to webform 1.0, and using >=5.0.0-rc22 if an existing site is requiring exactly the 5.0.0-rc22 version of webform, it would not throw a requirements error.

  • vijaycs85 committed 8ff8b4f on 8.x-1.x
    Issue #3007450 by Manuel Garcia, vijaycs85: Incompatible with webform 8....
vijaycs85’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, @Manuel Garcia

Status: Fixed » Closed (fixed)

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