3.9.0
Fixes
Database\Type\YearType::toDatabase()andmarshal()now actually cast the input toint, matching their?intreturn signature. Previously they returned the raw$value(typically a numeric string) underdeclare(strict_types=1), breaking the declared contract (#124).Model\Table\Table::saveAll()no longer folds per-row save results via bitwise&— that operator coerced the accumulator tointafter the first iteration, so callers using strict comparisons (=== true) saw1instead oftrue. Replaced with a proper bool early-out (#124).View\Widget\DateTimeWidget::_deconstructDate()now reads the AM/PM character from the same source it checked ($value['meridian']) instead of the str-padded copy, eliminating a long-standing decoupling between conditional and read paths (#125).Model\Table\Table::delete()restores the parent's typedarray $optionsparameter. The previous override widened it to bare$optionsplus a runtimeis_array()check that was dead underdeclare(strict_types=1)(#125).LegacyModelAwareTrait::loadModel()now guards_modelFactorieswithproperty_exists(). CakePHP 5.x removedModelAwareTrait, so consumers that don't redeclare the property no longer trip an undeclared-dynamic-property warning under PHP 8.2+ — the lookup falls back cleanly toFactoryLocator::get()(#125).Filesystem\Folder::isAbsolute(),isWindowsPath(), andisRegisteredStreamWrapper()now castpreg_match()results toboolexplicitly so the: boolcontract holds under stricter PHPStan rules. The Windows-path check also moves tostr_starts_with()(#125).Deprecations.phpnow validates theShim.deprecationTypeconfig value against the levelstrigger_error()actually accepts (E_USER_NOTICE/WARNING/DEPRECATED/ERROR), falling back toE_USER_DEPRECATED. A misconfigured value likeE_NOTICEpreviously crashed the shim's own deprecation pathway with aValueErroron PHP 8+ (#125).
Improvements
Controller\Component\RequestHandlerComponent::accepts()andprefers()no longer carry the misleadingdeprecated 4.4.0doc tag inherited from upstream. The shim's purpose is to keep these methods available for consumers who have not yet migrated toContentTypeNegotiation::prefersChoice()/Controller::getViewClasses()— flagging them deprecated inside the shim was misleading IDEs and consumers (#125).Model\Table\Table::record()uses PHP 8 capture-omitcatch (RecordNotFoundException)instead of an emptycatch (RecordNotFoundException $e) {}body that PSR2R / phpcs flagged (#125).TestSuite\TestTrait::invokeMethod()andinvokeProperty()drop the redundant&on theobjectparameter — objects are passed by handle in PHP, so the reference was dead syntax. Subclasses overriding these (e.g.EntityAnnotatorTest) must drop the&from their override signature; updated in this release (#125).Deprecations.phpnow declaresstrict_types=1, matching the rest ofsrc/(#125).
Full Changelog: 3.8.5...3.9.0