json_form_widget throws deprecation messages in PHP 8.2 #4129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now that PHP 8.2 is our default testing environment,
10_workflow_transitions.spec.js
fails becausejson_form_widget
adds dynamic properties to classes. It emits a message like this:This PR:
json_form_widget_field_widget_complete_form_alter()
andjson_form_widget_form_alter()
to useFormStateInterface::get()
andset()
to store information rather than the now-deprecated technique of setting a new dynamic property on the form state object.07_admin_dataset_json_form.spec.js
and11_admin_dataset_file_upload.spec.js
to beBrowserTestBase
tests. This way the deprecation shows up in PHP scope. We can't count on Cypress to fail for a deprecation, but they'll stand out in PHPUnit-land.json_form_widget
with group annotation.To manually test:
git checkout 2.x modules/json_form_widget/json_form_widget.module
ddev dkan-phpunit --filter AdminDatasetJsonFormTest
git restore --staged modules/json_form_widget/json_form_widget.module
git restore modules/json_form_widget/json_form_widget.module
ddev dkan-phpunit --filter AdminDatasetJsonFormTest