Summary
CI pipeline has three independent failures across three separate jobs:
- PHPStan Analysis (PHP 8.3, current stack) — 5 static analysis errors.
- PHPStan Analysis (next major) (PHP 8.5, Drupal 12.0-dev stack) — 3 static analysis errors, a subset of #1.
- phpunit (next major) (PHP 8.5, Drupal 12.0-dev) — functional tests pass, but the job fails because deprecation warnings are treated as errors.
These are independent problems in independent jobs; fixes below cover all three.
1. PHPStan errors
1a. PHPStan Analysis (PHP 8.3, current stack) — 5 errors
src/Plugin/Field/FieldFormatter/IpAddressPostgreSqlFormatter.php:41
src/Plugin/Field/FieldWidget/IpAddressPostgreSqlWidget.php:37
dependencySerializationTraitProperty.unsupportedPrivatePropertydependencySerializationTraitProperty.unsupportedReadOnlyProperty
DependencySerializationTrait (used by the parent base class) does not support private or readonly promoted constructor properties. The readonly restriction only applies on PHP < 8.4, which is why it doesn't appear in the PHP 8.5 job below.
tests/src/Functional/IpAddressFieldTestBase.php:14
nonAbstractTestClass.NameNoSuffixTest — base test class is missing the abstract modifier.
1b. PHPStan Analysis (next major) (PHP 8.5) — 3 errors
Same underlying issues, minus the PHP-version-specific readonly check:
IpAddressPostgreSqlFormatter.php:41—unsupportedPrivatePropertyIpAddressPostgreSqlWidget.php:37—unsupportedPrivatePropertyIpAddressFieldTestBase.php:14—nonAbstractTestClass.NameNoSuffixTest
Fix (covers both jobs)
- [ ] In
IpAddressPostgreSqlFormatterandIpAddressPostgreSqlWidget: change the injected service property fromprivate readonlytoprotected(or adduse DependencySerializationTrait;directly in the class ifreadonlymust be kept). - [ ] In
IpAddressFieldTestBase: add theabstractmodifier to the class declaration.
One fix per file resolves the corresponding errors in both the PHP 8.3 and PHP 8.5 jobs. Do not commit a phpstan-baseline.neon as a workaround — these are three small, legitimate fixes, not legacy debt to suppress.
2. Next-major (Drupal 12) deprecations — phpunit (next major) job
Runs against PHP 8.5 / Drupal 12.0-dev (main-dev branch) with deprecations treated as failures. All 13 + 11 test datasets pass functionally (OK, but there were issues!), but the following module-owned deprecations need fixing before Drupal 12 ships (week of Dec 7, 2026):
- [ ]
field_ipaddress_pgsql_requirements()needs#[LegacyRequirementsHook]attribute (.modulefile) - [ ]
@FieldTypeannotation →#[FieldType]attribute foripaddress_pgsqlandipaddress_mysqlfield item classes - [ ]
@FieldWidgetannotation →#[FieldWidget]attribute foripaddress_pgsqlandipaddress_mysqlwidgets - [ ]
@FieldFormatterannotation →#[FieldFormatter]attribute foripaddress_pgsqlandipaddress_mysqlformatters - [ ]
@Constraintannotation →#[Constraint]attribute forPostgreSqlFormatandMySqlFormatconstraint plugins - [ ]
ConstraintValidator::initialize()deprecated — migratePostgreSqlFormatValidator/MySqlFormatValidatortovalidateInContext()
Note: these deprecation messages reference removal in "drupal:13.0.0" — this is expected. Drupal core policy deferred actual removal of several 11.3-deprecated APIs from 12.0 to 13.0 for a smoother upgrade path, but the deprecation notices already fire on 12.0-dev.
Remaining deprecations in the log (cache.backend.memory, cache.static, Symfony DI tagged locators, SYMFONY_DEPRECATIONS_HELPER) are Drupal core/vendor-owned and out of scope for this module.
Acceptance criteria
- [ ]
PHPStan Analysisjob passes with 0 errors, no baseline committed - [ ]
PHPStan Analysis (next major)job passes with 0 errors - [ ]
phpunit (next major)job passes (or at minimum triggers 0 module-owned deprecations) - [ ] Standard
phpunitjob continues to pass
Comments
Comment #3
wombatbuddy commentedLooked at the failing GitLab CI job. This doesn't look like a bug in the module.
Both test classes actually pass 100% of assertions (13/13 and 11/11). The job is marked as failed only because PHPUnit reports "OK, but there were issues!" due to 9 triggered deprecation notices, and Drupal's test runner treats any deprecation as a job failure regardless of whether the assertions passed.
All 9 deprecations trace back to Drupal core / Symfony vendor code (DependencyInjection Container, cache.backend.memory, cache.static, ConstraintValidator::initialize(), TestHttpClientMiddleware) — none of them point to any file in this module's src/ tree.
The pipeline runs against DRUPAL_CORE: main-dev (12.0-dev), which is currently mid-migration toward several new internal APIs and produces this deprecation noise for any module tested against it right now.
Suggested fix is CI config, not module code: either pin the required job to a stable core version the module declares support for (e.g. 11.3.x), or mark the main-dev job as allow_failure: true so nightly-core deprecations don't block the pipeline.
Comment #5
wombatbuddy commented