Skip to main content

1.10.0 Summary

This is a release focused mostly on type safety & static analysis. We have made comprehensive improvements to PHPDoc annotations, generic types, null-safety, and PHP 8.3+ compatibility.

✨ Features & Improvements

Type Safety Enhancements (All Packages)

  • Generic Type Support: Added comprehensive @template, @param, and @return PHPDoc annotations across collections, operators, and state processors
  • PHP 8.3+ Compatibility: Added #[\Override] attributes to 300+ method implementations for compile-time verification
  • Strict Type Checking: Applied strict_types=1 declarations and strict comparison operators throughout
  • Callable Signatures: Enhanced PHPDoc with precise callable type hints (e.g., callable(Section): bool)

Null-Safety Improvements

  • schema: Fixed nullable type handling in TypeDetails, SignatureField, and reflection classes
  • instructor: Better null handling in deserialization layer (CustomObjectNormalizer, FlexibleDateDenormalizer)
  • messages: Fixed null pointer issues in Messages::firstRole(), Messages::lastRole(), and filter operations
  • auxiliary: Added type guards in Codebase::getMethodParams() and RawHtml::convertToAbsoluteUrls()
  • dynamic: Explicit null initialization for Field::$value and Field::$validator properties

Collection API Standardization (utils)

  • Renamed ArrayList::get()ArrayList::itemAt() for interface consistency
  • Added comprehensive generic type annotations to ArrayList, ArrayMap, ArraySet
  • Improved TagMap type safety with proper tag storage annotations

Result Monad Enhancements (utils)

Helper methods for batch operations:
Result::tryAll(callable ...$operations): Result  // Execute all, aggregate errors
Result::tryUntil(callable ...$operations): Result  // Execute until first success
Improved error aggregation via CompositeException for better debugging.

State Processing (addons)

  • Added forceThrowOnFailure parameter to Chat class for graceful error handling
  • Enhanced generic type constraints in StateProcessors, ContinuationCriteria, and middleware chains
  • Added ChatFactory::defaultProcessors() helper method

🐛 Bug Fixes

File Operations

  • doctor: Fixed glob() returning false instead of empty arrays (multiple files)
  • doctor: Fixed unhandled false returns from file_get_contents(), realpath(), and preg_replace()
  • instructor: Fixed file operation error handling with runtime exceptions

Type Safety

  • auxiliary: Fixed null safety in parameter extraction and DOM element handling
  • dynamic: Fixed schema immutability violations in Field::withName() and Field::withDescription()
  • messages: Added runtime exceptions for empty collection operations instead of returning null
  • schema: Improved nullable type handling with proper null coalescing and type guards
  • pipeline: Better null handling in StepTimingTag::startDateTime()

Array Operations

  • evals: Fixed array key conflicts in MakeObservations and SelectObservations using array_values()
  • schema: Added strict type comparisons to all in_array() calls