- PHPCS — Missing declare(strict_types=1) and @file docblock | Severity: Major | Files: entity_phone_field.install, src/Plugin/Field/FieldWidget/CountryPhoneWidget.php, src/Service/CountryService.php
- PHPCS — Missing method docblocks and return types | Severity: Major | Files: CountryPhoneWidget.php (formElement, massageFormValues), CountryService.php (getCountries), entity_phone_field.install (both functions)
- PHPCS — \Drupal::service() static calls in OOP classes | Severity: Major |Files: CountryPhoneWidget.php (lines 20, 49), entity_phone_field.install (line 43)
- DI — CountryService not injected into CountryPhoneWidget | Severity: Major | File: CountryPhoneWidget.php — widget must implement ContainerFactoryPluginInterface and inject the service via constructor instead of using \Drupal::service()
- Services — Not using FQCN and autowire: true | Severity: Normal | File: entity_phone_field.services.yml — service id should be the FQCN, autowire: true should replace manual arguments:
- Hooks — No OOP hook class | Severity: Normal | Missing src/Hook/EntityPhoneFieldHooks.php with #[Hook] attribute; procedural functions in .install need #[LegacyHook] shims
- info.yml — core_version_requirement too broad, missing package | Severity: Normal | File: entity_phone_field.info.yml — must be ^10.3 || ^11, add package: Field types
- Missing composer.json | Severity: Normal — needs name, require, authors, support sections with "drupal/core": "^10.3 || ^11"
- Missing project files: .gitignore, .cspell.json, .gitlab-ci.yml | Severity: Normal
- Missing config schema and settings files | Severity: Normal — config/schema/entity_phone_field.schema.yml and config/install/entity_phone_field.settings.yml required for the settings form defined in routing
-
Routing references non-existent PhoneSettingsForm class | Severity: Major| File: entity_phone_field.routing.yml —
\Drupal\entity_phone_field\Form\PhoneSettingsForm does not exist in the codebase - README — Does not follow drupal.org template | Severity: Minor | File: README.md — missing ## headings, Requirements/Maintainers sections, fenced code blocks; also has a typo ("E.+91")
Comments
Comment #5
zeeshan_khan commented