- Issue created by @zniki.ru
- Status changed to Needs work
12 months ago 2:32am 20 November 2023 - 🇷🇺Russia zniki.ru
Draft PR created.
Needs to find how to fix this------ -------------------------------------------------------------------------------------------------------------------- Line src/Feeds/Target/Geofield.php ------ -------------------------------------------------------------------------------------------------------------------- 21 Class Drupal\geofield\Feeds\Target\Geofield extends unknown class Drupal\feeds\Plugin\Type\Target\FieldTargetBase. 💡 Learn more at https://phpstan.org/user-guide/discovering-symbols ------ -------------------------------------------------------------------------------------------------------------------- ------ ------------------------------------------------------------------------------------------------------------------------------------ Line src/Plugin/diff/Field/GeofieldFieldBuilder.php ------ ------------------------------------------------------------------------------------------------------------------------------------ 19 Class Drupal\geofield\Plugin\diff\Field\GeofieldFieldBuilder extends unknown class Drupal\diff\Plugin\diff\Field\CoreFieldBuilder. 💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
These classes from feeds and diff modules.
- 🇮🇹Italy itamair
Please rebase this MR to the last commits in the 8.x-1.x branch. I removed PHPSTAN files and set to Skip the PHPSTAN from the .gitlab-ci.yml, as I am not really aware of it, and those where reporting many errors related to unknown classes refrenced, such as \Geometry and \Point (of course) that are coming from the itamair/geophp library.
BUT ... do we really need to implement PHPStan (with all its eventual exceptions) in the Geofield module.
Aren't we adding to much complexities and overhand in code quality checks?
Isn't phpcs (with Drupal standard) quite enough?? - 🇮🇹Italy itamair
Hey @zniki.ru thanks so much for the great contribution here, but also on the Gilab CI integration, and related PHPCS and EsLint code quality checks ... that I already merged in the dev branch.
I wasn't aware about this PhpStan integration, and well ... yes it might be cool to also enable this in the Geofield module.
I made a couple of attempts / commits to get rid of the remaining errors (screenshot attached) that should be skipped I guess (as they are not errors), but I couldn't really figure out how to amend the phpstan-baseline.neon file to make it happen, and have an all green baseline scenario.You are really welcome if you find a solution for this, also, and if you indeed think / see this is a nice additional quality check integration for the Geofield module, rather than an additional complexity, to slow down the further development of the module.
- 🇷🇺Russia zniki.ru
I am also trying to get familiar with PHPStan and I already asked @mglaman to help on this issue, you can see Matt's feedback in the MR.
Maybe we can try to reach Matt again in order help to finalize this issue.The easiest way to update phpstan-baseline.neon use version from pipeline artifacts, you can find it in https://git.drupalcode.org/project/geofield/-/jobs/393496/artifacts/browse, but looks like you need to merge changes manually.
Or you can use--generate-baseline
argument to update it. - last update
12 months ago 26 pass - last update
12 months ago 26 pass -
itamair →
committed 70d17ce0 on 8.x-1.x authored by
zniki.ru →
Issue #3402434 by itamair, zniki.ru: Fix the issues reported by PHPStan
-
itamair →
committed 70d17ce0 on 8.x-1.x authored by
zniki.ru →
- Status changed to Fixed
12 months ago 12:17am 26 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.