Skip to content

3.15.0

Latest
Compare
Choose a tag to compare
@roxblnfk roxblnfk released this 24 Jan 15:58
· 1 commit to master since this release
3.15.0
93cc1f9

What's Changed

Core

  • AppEnvironment enum: added aliases for production and test environments (#1170).
  • Added a new option in the container to control default behavior when rebinding singletons (#1199).
    In the future, the container will be stricter by default, so it's recommended to set allowSingletonsRebinding to false right away.
  • Fixed resolving of scoped Autowire objects (#1175).

Cache

  • Added events that are dispatched before cache operations like KeyWriting, CacheRetrieving, KeyDeleting and failed operations like KeyWriteFailed, KeyDeleteFailed (#1156).
  • Optimized operations with multiple cache records (#1194).
  • Added an ability to set custom cache storage (#1142).

Router

  • The ServerRequestInterface object is now passed into the call context of interceptors (#1168)
  • Added a new middleware pipeline LazyPipeline (#1168)
    The pipeline resolves middleware from the container right before execution to avoid ignoring container scopes.
    \Spiral\Http\Pipeline is deprecated now.
  • Added strict mode for UriHandler (#1192)
    Strict mode ensures all required URI segments are validated. If any are missing, an exception is thrown.
    $handler = $container->get(\Spiral\Router\UriHandler::class);
    $handler->setStrict(true);

Telemetry

Optimized the telemetry component (#1168): it no longer opens a container scope each time in the AbstractTracer::runScope() method.

spiral/otel-bridge v1.2.2 has been released, which includes normalization of values for OTEL data types.

Changes in telemetry operation in the router:

  • A new Span is no longer created for each Middleware: the pipeline fills the list with called middlewares in one span. The number of pipelines equals the number of spans.
  • The http.response_content_length field is no longer filled.

Code quality improvements:

We are preparing to start the 4.x branch.
This means it's time to "tidy up" the codebase: update all the code so that the difference between 3.x and 4.x is minimal.
This way, fixes from 4.x can be easily applied to 3.x.

Pull requests using Rector from @samsonasik are very timely here:

  • Bump to Rector ~2.0.0 in #1155, #1159, #1177
  • Update to use PHPUnit 10 syntax in #1163
  • Fix @template-covariant usage on Target and TargetInterface in #1164
  • Add closure void return type in tests in #1180, #1181
  • Add typed MockObject in tests in #1182
  • Add ArrowFunction and Closure return type in #1183, #1184, #1201
  • Add property types on tests classes in #1185
  • Enable phpunit code quality set for rector in #1186
  • Run Rector on submodule under src/Bridge as well in #1189
  • Add typed on private property based on assigns in #1200
  • Set setUp()/tearDown() method modifier protected on tests in #1202

And Code Style improvements:

Pull requests

Full Changelog: 3.14.6...v3.15.0