- Issue created by @Liam Morland
- π¨π¦Canada Liam Morland Ontario, CA π¨π¦
The commit adding
drupal:views_ui
totest_dependencies
was intended to fix this error: "Function views_ui_build_form_url not found." It does not fix it.The other phpstan issues are all about adding dependency injection.
- πΊπΈUnited States bluegeek9
I have a question about: src/Form/ChartsConfigForm.php
Is the form referenced in other projects? I only see the form used once. I am not sure how it could be called and the services would be null.
$this->chartPluginManager = $chart_plugin_manager ?: \Drupal::service('plugin.manager.charts'); $this->chartTypePluginManager = $chart_type_plugin_manager ?: \Drupal::service('plugin.manager.charts_type'); $this->moduleExtensionList = $module_extension_list ?: \Drupal::service('extension.list.module');
- π¨π¦Canada nikathone Ontario
@bluegeek9 we did that to make the config form backwards compatible in case another user/module have extended the module before we add those dependencies.
In the future major version upgrade of chart we will remove the ternary operators.
- πΊπΈUnited States andileco
@bluegeek9, I see everything is green. Is there more you wanted to do on this, or is it ready for review?
- πΊπΈUnited States bluegeek9
I want to add tests. I also want to add the file system service as a dependency to the form. I want to replace file_exists with the service so it can be mocked/tested.
It should need review by end of day.
P.S. I was able to resolve "Function views_ui_build_form_url not found." by adding views_ui to the phpstan.neon. It worked locally, but to work in gitlab it needed the full, not relative path. The full path changes with each issue. I resorted to using phpstan-ignore.
-
andileco β
committed dbd50ba8 on 5.1.x authored by
liam morland β
Issue #3518027 by bluegeek9, liam morland, nikathone: Fix issues raised...
-
andileco β
committed dbd50ba8 on 5.1.x authored by
liam morland β