Problem/Motivation
Get ride of the php deprecated message
Steps to reproduce
Whenever we use the command drush for the marketwebsite project we get the error message below :
Deprecated: Optional parameter $mapping declared before required parameter $form_state is implicitly treated as a required parameter in /var/www/html/web/modules/contrib/hubspot_integration/src/Form/HubspotMappingForm.php on line 157
Deprecated: Optional parameter $mapping declared before required parameter $form_state is implicitly treated as a required parameter in /var/www/html/web/modules/contrib/hubspot_integration/src/Form/HubspotMappingForm.php on line 176
PHP Deprecated: Optional parameter $mapping declared before required parameter $form_state is implicitly treated as a required parameter in /var/www/html/web/modules/contrib/hubspot_integration/src/Form/HubspotMappingForm.php on line 157
PHP Deprecated: Optional parameter $mapping declared before required parameter $form_state is implicitly treated as a required parameter in /var/www/html/web/modules/contrib/hubspot_integration/src/Form/HubspotMappingForm.php on line 176
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | cleanup-unused-functions-parameters-3310390-7.patch | 1.88 KB | j0s3 |
| #5 | hubspot_integration_PHP8_deprecated.patch | 1.68 KB | nichal |
| #3 | fix-deprecated-warning-mapping-3310390-3.patch | 1.38 KB | j0s3 |
Issue fork hubspot_integration-3310390
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
Comment #2
avpadernoComment #3
j0s3 commentedThis patch fix the Deprecated warnings about function parameters order.
Comment #4
avpadernoComment #5
nichal commentedHello I am submitting a new fix for this issue since the fix fix-deprecated-warning-mapping-3310390-3.patch is not enough (we should change the way we call the function, the parameter order since we change the definition of the function.)
Comment #6
avpadernoInstead of changing the parameters order,
$mappingshould be made a required parameter (remove=NULL).Comment #7
j0s3 commentedActually, this function parameters are unused so can be cleaned up.
Comment #10
romainj commentedComment #12
romainj commented