- Issue created by @dtfabio
- First commit to issue fork.
- Status changed to Needs review
6 months ago 3:42pm 6 July 2024 - Status changed to Needs work
6 months ago 4:34am 7 July 2024
With the integration of GitLab CI from 📌 Add Gitlab CI to V2 of the module Active there is now a report for PHPStan issues at https://git.drupalcode.org/project/activecampaign/-/jobs/2043632
PHPStan - PHP Static Analysis Tool 1.11.6
$ php --version
PHP 8.1.29 (cli) (built: Jun 6 2024 17:38:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.29, Copyright (c) Zend Technologies
with Zend OPcache v8.1.29, Copyright (c), by Zend Technologies
$ echo "Executing php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION"
Executing php vendor/bin/phpstan analyze web/modules/custom/activecampaign --configuration=web/modules/custom/activecampaign/phpstan.neon
$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --error-format=junit > junit.xml || true
0/15 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%
15/15 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress --error-format=gitlab > phpstan-quality-report.json || true
$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
------ -----------------------------------------------------------------------------------------------------------------
Line modules/activecampaign_webform/src/Plugin/WebformHandler/ActiveCampaignFormHandler.php
------ -----------------------------------------------------------------------------------------------------------------
24 Class
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler
extends unknown class Drupal\webform\Plugin\WebformHandlerBase.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
42 Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::create()
calls parent::create() but
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler
does not extend any class.
65 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$webform.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
68 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
79 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
82 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
83 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$configuration.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
87 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
90 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
91 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$configuration.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
94 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
97 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
98 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$configuration.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
104 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
108 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
109 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
111 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$configuration.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
116 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
117 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
122 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$configuration.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
125 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::setSettingsParents().
133 Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::submitConfigurationForm()
calls parent::submitConfigurationForm() but
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler
does not extend any class.
136 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::applyFormStateToConfiguration().
139 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$configuration.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
139 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$configuration.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
146 Parameter $webform_submission of method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::submitForm()
has invalid type Drupal\webform\webformSubmissionInterface.
148 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::getConfiguration().
194 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::getLogger().
198 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::getLogger().
203 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
205 Call to static method encode() on an unknown class
Drupal\webform\Utility\WebformYaml.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
209 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::t().
211 Call to static method encode() on an unknown class
Drupal\webform\Utility\WebformYaml.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
217 Access to an undefined property
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::$renderer.
💡 Learn more:
https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
218 Call to an undefined method
Drupal\activecampaign_webform\Plugin\WebformHandler\ActiveCampaignFormHandler::getLogger().
------ -----------------------------------------------------------------------------------------------------------------
[ERROR] Found 35 errors
$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress --generate-baseline --allow-empty-baseline || true # collapsed multi-line command
[WARNING] Baseline generated with 34 errors.
Some errors could not be put into baseline. Re-run PHPStan and fix
them.
This baseline file is an artifact you can download and use in the project.
https://git.drupalcode.org/project/activecampaign/-/jobs/2043632
Fix the issues and create a merge request.
Review the changes and merge the MR.
Add code and review the changes.
Needs work
2.0
Code