NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2951 most downloaded on Packagist
Spiral, High-Performance PHP/Go Framework
Latest stable
3.18.2
Last release 13 days ago
09 Nov 2026
Release timing varies
gaps range from 9 days to 8 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
184 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
http: respond 400 on scalar JSON payload in JsonPayloadMiddleware
queue: make Job push telemetry span scoped
Your coding agent can read these notes before it upgrades. Set up the MCP server →
The middleware spans of the deprecated Pipeline get the same status and response attribute changes.
QUERY HTTP verbThe router supports the QUERY method from RFC 10008: a safe, idempotent request that carries its query in the body. Routes without explicit verbs accept it too, and route:list shows it in its own color.
use Spiral\Router\Annotation\Route;
#[Route(route: '/products/search', methods: ['QUERY'])]
public function search(ServerRequestInterface $request): array
{
// the search criteria come in the request body
}
QUERY is not in CsrfFirewall::ALLOW_METHODS, so such requests still require a CSRF token.
by @gam6itko in https://github.com/spiral/framework/pull/1314
The server span written by spiral/http now uses the stable HTTP semantic conventions, so tracing backends (Jaeger, Tempo, Grafana, Datadog, Honeycomb, …) recognise it in their HTTP views and RED metrics.
GET) instead of the full URL, which removes unbounded span-name cardinality.http.headers) are no longer exported, so Authorization and Cookie values do not reach the tracing backend.OK; a 5xx sets ERROR and error.type.| Before | Now |
|---|---|
http.method |
http.request.method |
http.url |
url.scheme, url.path, url.query, server.address, server.port |
http.status_code |
http.response.status_code |
http.response_content_length |
http.response.body.size |
http.headers |
removed |
| — | client.address, user_agent.original, network.protocol.version |
The middleware spans of the deprecated Pipeline get the same status and response attribute changes.
by @roxblnfk in https://github.com/spiral/framework/pull/1312
MailerInterface can be overridden or decoratedMailerBootloader used to bind MailerInterface from its boot() method, which runs after every bootloader has registered its bindings, so an application binding of the mailer was always overwritten. The binding now lives in the singleton map next to an explicit MailQueue binding, and the usual last-registration-wins order applies:
final class AppMailerBootloader extends Bootloader
{
protected const SINGLETONS = [
MailerInterface::class => [self::class, 'mailer'],
];
private function mailer(MailQueue $queue, LoggerInterface $logger): MailerInterface
{
return new LoggingMailer($queue, $logger);
}
}
by @gam6itko in https://github.com/spiral/framework/pull/1302
OK need to switch to the new keys. There is no dual-emission mode; if you need a transition period, rename the attributes in your OpenTelemetry Collector (transform processor).MailerBootloader::boot() no longer takes BinderInterface; a subclass overriding boot() must drop that parameter. An application binding of MailerInterface now takes effect instead of being silently replaced by MailQueue.sendit:builder. Outlook conditional comments and the content of <style>, <script>, <textarea> and <title> are kept.master is renamed to 3.x in spiral/framework and in every split package, and the dev-master branch aliases are gone. If you require a development version, replace dev-master with 3.x-dev.EventDispatcher into the HTTP core by @roxblnfk in https://github.com/spiral/framework/pull/1292Full Changelog: https://github.com/spiral/framework/compare/3.17.2...3.18.0
QUERY HTTP verb; routes without explicit verbs accept it too (#1314) (706dd09)MailQueue explicitly in MailerBootloader, so applications can override or decorate MailerInterface (#1302) (706dd09)[Stempler] Encode on* attribute output as a JavaScript literal by @roxblnfk in https://github.com/spiral/framework/pull/1299
Full Changelog: https://github.com/spiral/framework/compare/3.17.1...3.17.2
Fix session id validation and file handler path containment by @roxblnfk in https://github.com/spiral/framework/pull/1291
Full Changelog: https://github.com/spiral/framework/compare/3.17.0...3.17.1
The #[AsCommand] attribute now accepts an aliases parameter, allowing a console command to be registered and invoked under several names. The scaffold
#[AsCommand]The #[AsCommand] attribute now accepts an aliases parameter, allowing a console command to be registered and invoked under several names. The scaffolder was also updated to generate commands with aliases out of the box.
Example Usage:
use Spiral\Console\Attribute\AsCommand;
#[AsCommand(name: 'app:user:create', aliases: ['user:new', 'user:add'])]
final class CreateUserCommand extends Command
{
// ...
}
by @gam6itko in https://github.com/spiral/framework/pull/1252
CsrfMiddleware cookie missing the Path attribute by adding a configurable path option (default /) by @roxblnfk in https://github.com/spiral/framework/pull/1257route:list command crash on LINK/UNLINK verbs by @gam6itko in https://github.com/spiral/framework/pull/1254Paginator limit handling and documented the component by @gam6itko in https://github.com/spiral/framework/pull/1255Full Changelog: https://github.com/spiral/framework/compare/3.16.2...3.17.0
#[AsCommand] attribute and the scaffolder (#1252)CsrfMiddleware cookie missing the Path attribute (#1257)route:list command crash on LINK/UNLINK verbs (#1254)Paginator limit handling and documented the component (#1255)[spiral/boot] Fix Bootloader::init methods sorting by @gam6itko in https://github.com/spiral/framework/pull/1251
Bootloader::init methods sorting by @gam6itko in https://github.com/spiral/framework/pull/1251Kernel::defineAppBootloaders method by @gam6itko in https://github.com/spiral/framework/pull/1249Full Changelog: https://github.com/spiral/framework/compare/3.16.1...3.16.2
Bootloader::init methods sortingKernel::defineAppBootloaders methodFix code style by @roxblnfk in https://github.com/spiral/framework/pull/1248
Full Changelog: https://github.com/spiral/framework/compare/3.16.0...3.16.1
Fixes deprecation warnings when using Symfony Console 7.4+ and adds support for Symfony 8. Replaced deprecated add() method with addCommand() for Symf…
The most significant addition in this release is comprehensive support for PHP attributes in bootloaders, providing a modern, type-safe approach to application bootstrapping. You can now use attributes like #[SingletonMethod], #[BindMethod], #[BindScope], and priority-based lifecycle methods for cleaner and more expressive bootloader configuration.
Major performance improvements to the container's dependency resolution with iterative scope resolution, eliminating recursive overhead and reducing exception handling for faster dependency injection.
Full support for PHP 8.4, Psalm v6, Symfony Console 8, and migration to PHPUnit attributes for a modern development experience.
This major feature adds PHP attributes for configuring bootloaders, providing a more expressive and type-safe approach to application bootstrapping.
Available Attributes:
#[BindMethod] - Container bindings that create new instances#[SingletonMethod] - Container bindings that create shared instances#[InjectorMethod] - Custom injector methods#[BindAlias] - Multiple aliases for bindings#[BindScope] - Scoped bindings#[InitMethod] - Initialization phase methods with priority control#[BootMethod] - Boot phase methods with priority controlExample:
class DatabaseBootloader extends Bootloader
{
#[SingletonMethod]
#[BindScope('http')]
public function createConnection(): ConnectionInterface
{
return new Connection(...);
}
#[InitMethod(priority: 100)]
public function registerCoreServices(Container $container): void
{
// Register core services first
}
}
Benefits:
PR #1190 | Author: @butschster
Extends HTTP method support to include LINK and UNLINK verbs as specified in RFC 2068 and RFC 5988, allowing applications to handle specialized HTTP verbs for managing relationships between resources.
Adds support for the Reply-To email header in the SendIt mailer component. Email messages can now properly set and handle Reply-To headers, allowing recipients to reply to a different address than the sender.
PR #1232 | Author: @burn1ngbear
Adds event hooks to the email rendering process for better extensibility:
Pre-render event: Triggered before email template renderingPost-render event: Triggered after email template renderingThis allows modification of email content before rendering and enables logging, validation, or transformation after rendering.
PR #1233 | Author: @burn1ngbear
Adds missing methods to the Reactor component for working with constant types, improving the code generation capabilities when managing constant type information in generated PHP code.
PR #1220 | Author: @butschster
Major performance optimization for the container's dependency resolution and scope handling:**
Invoker::invoke() to avoid unnecessary class instantiation when calling static functionsFactory::make() callsThe iterative scope resolution eliminates recursive overhead and reduces exception handling, resulting in significantly faster dependency resolution.
Optimizes telemetry trace naming for queue job processing by removing job IDs from span names. This reduces cardinality and allows proper grouping of traces by job type in observability tools, resulting in better trace aggregation, easier performance pattern identification, and reduced storage overhead.
PR #1215 | Author: @rauanmayemir
Fixes a bug where route group prefixes were not being automatically applied to routes in the group. Previously, developers had to manually include the prefix in each route path or add it explicitly, which was counter-intuitive. Now group prefixes are automatically applied to all routes in the group as expected.
PR #1219 | Author: @butschster | Closes: #1217
Critical bug fix for the telemetry component that was preventing trace context from being added to log records. The tracer was not using the scoped proxy container, resulting in empty trace context. Fixed by ensuring TelemetryProcessor uses the scoped container properly.
PR #1212 | Author: @rauanmayemir
Fixes an issue where TracerInterface was overwriting trace context every time it was accessed, causing traces to be lost frequently. The solution binds current TracerInterface as singleton for consistent trace context within request scope and fixes scope handling in AbstractTracer::runScope method.
Benefits:
PR #1214 | Author: @rauanmayemir
static Return Type in Proxy GeneratorFixes a critical bug in the proxy class generator that caused failures when proxying interfaces with static return types. The generator now properly handles static return type, preventing failures in dependency injection and scoped bindings. Also adds resolving trace to resolver exceptions for better debugging.
Fixes deprecation warnings when using Symfony Console 7.4+ and adds support for Symfony 8. Replaced deprecated add() method with addCommand() for Symfony 7.4+ while maintaining backward compatibility with Symfony 6.4. Updated version constraints to ^6.4.17 || ^7.2 || ^8.0.
Corrects the return type annotation for the getDelay() method to match actual behavior and improve static analysis accuracy.
nikic/php-parser v5General maintenance update including dependency updates, code cleanup, and minor improvements across the framework.
Full Changelog: https://github.com/spiral/framework/compare/3.15.0...3.16.0
A huge thank you to all contributors who made this release possible:
Hotfixes by @roxblnfk in https://github.com/spiral/framework/pull/1226
SpanInterface singleton rebinding in the Telemetry component (see https://github.com/spiral/app/issues/157)Full Changelog: https://github.com/spiral/framework/compare/3.15.7...3.15.8
SpanInterface singleton rebindingFixed proxy class generator failure when the proxied interface contains static return type by @roxblnfk in https://github.com/spiral/framework/pull/12
static return type by @roxblnfk in https://github.com/spiral/framework/pull/1222
Also added resolving trace to Resolver exceptionsFull Changelog: https://github.com/spiral/framework/compare/3.15.6...3.15.7
Optimize container and fix invoker by @roxblnfk in https://github.com/spiral/framework/pull/1221
Full Changelog: https://github.com/spiral/framework/compare/3.15.5...3.15.6
[spiral/router] Fix issue when group prefix is not applied to routes by @butschster in https://github.com/spiral/framework/pull/1219
Bug Fixes
Full Changelog: https://github.com/spiral/framework/compare/3.15.0...3.15.6
Telemetry: removed ID from a consumed job span by @rauanmayemir in https://github.com/spiral/framework/pull/1215 It allows proper grouping of traces b
Full Changelog: https://github.com/spiral/framework/compare/3.15.3...3.15.4
Fixed scoped TracerInterface in the AbstractTracer::runScope method by @roxblnfk and @rauanmayemir in https://github.com/spiral/framework/pull/1214
TracerInterface in the AbstractTracer::runScope method by @roxblnfk and @rauanmayemir in https://github.com/spiral/framework/pull/1214\Spiral\Core\Scope is public nowFull Changelog: https://github.com/spiral/framework/compare/3.15.2...3.15.3
TracerInterface in the AbstractTracer::runScope method\Spiral\Core\Scope is public nowFix a bug with telemetry info not propagating into log records by @rauanmayemir in https://github.com/spiral/framework/pull/1212
Full Changelog: https://github.com/spiral/framework/compare/3.15.0...3.15.2
Maintenance by @roxblnfk and @msmakouz in #1205
nikic/php-parser v5Full Changelog: https://github.com/spiral/framework/compare/3.15.0...3.15.1
nikic/php-parser v5…container scopes. \Spiral\Http\Pipeline is deprecated now.
AppEnvironment enum: added aliases for production and test environments (#1170).allowSingletonsRebinding to false right away.KeyWriting, CacheRetrieving, KeyDeleting and failed operations like KeyWriteFailed, KeyDeleteFailed (#1156).ServerRequestInterface object is now passed into the call context of interceptors (#1168)LazyPipeline (#1168)\Spiral\Http\Pipeline is deprecated now.UriHandler (#1192)$handler = $container->get(\Spiral\Router\UriHandler::class);
$handler->setStrict(true);
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:
http.response_content_length field is no longer filled.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:
setUp()/tearDown() method modifier protected on tests in #1202And Code Style improvements:
production and test environments by @roxblnfk in #1170Full Changelog: https://github.com/spiral/framework/compare/3.14.6...v3.15.0
AppEnvironment enum: added aliases for production and test environments by @roxblnfk.allowSingletonsRebinding to false right away.KeyWriting, CacheRetrieving, KeyDeleting
and failed operations like KeyWriteFailed, KeyDeleteFailed.ServerRequestInterface object is now passed into the call context of interceptorsLazyPipeline.
The pipeline resolves middleware from the container right before execution to avoid ignoring container scopes.\Spiral\Http\Pipeline is deprecated now.UriHandler. Strict mode ensures all required URI segments are validated.
If any are missing, an exception is thrown.AbstractTracer::runScope() method does not open a container scope anymore.http.response_content_length field is no longer filled.[spiral/telemetry] Improve types for SpanInterface
What was changed
Bug Fixes
SpanInterface (#1206)@ inside a string that is not a directive (#1197)Full Changelog: https://github.com/spiral/framework/compare/3.14.9...3.14.10
SpanInterface@ inside a string that is not a directive[spiral/core] Auth* middlewares are defined in http scope
http scope (#1176)Binder::bind method (#1195)Full Changelog: https://github.com/spiral/framework/compare/3.14.8...3.14.9
http scopeBinder::bind methodDefinitions of nullable parameters have been fixed according to PHP 8.4 deprecations by @roxblnfk in https://github.com/spiral/framework/pull/1174
ArrayStorage::setMultiple() now returns true instead of false. By @MartkCz in https://github.com/spiral/framework/pull/1172Full Changelog: https://github.com/spiral/framework/compare/3.14.7...3.14.8
ArrayStorage::setMultiple() now returns true instead of false.Fix configuration replacement for auth in HttpAuthBootloader by @laxity7 in https://github.com/spiral/framework/pull/1165
Full Changelog: https://github.com/spiral/framework/compare/3.14.6...3.14.7
Fix ServerRequestInterface resolving in HTTP scope by @roxblnfk in https://github.com/spiral/framework/pull/1160
Full Changelog: https://github.com/spiral/framework/compare/3.14.5...3.14.6
ServerRequestInterface is always resolved into a Proxy in the http scopeEventDispatcher is now injected into CacheManagerFixed resource leak in the Bott component by @leon0399 in https://github.com/spiral/framework/pull/1151
Full Changelog: https://github.com/spiral/framework/compare/3.14.4...3.14.5
Container scope related fixes by @roxblnfk in https://github.com/spiral/framework/pull/1149:
DebugBootloader now uses a Factory Proxy to resolve collectors.
Unresolved collectors don't break state populating flow.Full Changelog: https://github.com/spiral/framework/compare/3.14.3...3.14.4
Fix GuardScope to operate within Container Scopes by @roxblnfk in https://github.com/spiral/framework/pull/1146
GuardScope to operate within Container Scopes by @roxblnfk in https://github.com/spiral/framework/pull/1146Full Changelog: https://github.com/spiral/framework/compare/3.14.2...3.14.3
Introspector.GuardScope has been deprecated. Use GuardInterface directly instead.Fix concurrent writing and reading on workers boot by @wapmorgan in https://github.com/spiral/framework/pull/1137
Fixes:
Code quality:
Full Changelog: https://github.com/spiral/framework/compare/3.14.1...3.14.2
RecursiveProxyException will be
thrown in this case.The HMVC package has been deprecated. It has been replaced by the new spiral/interceptors package, where we have reworked the interceptors. The basic…
AbstractTarget by @roxblnfk in https://github.com/spiral/framework/pull/1132roadrunner-bridge < 3.7 and sapi-bridge < 1.1Full Changelog: https://github.com/spiral/framework/compare/3.14.0...3.14.1
The HMVC package has been deprecated. It has been replaced by the new spiral/interceptors package, where we have reworked the interceptors. The basic principle remains the same, but the interface is now more understandable and convenient.
In the old CoreInterceptorInterface, the $controller and $action parameters caused confusion by creating a false association with HTTP controllers. However, interceptors are not tied to HTTP and are used universally. Now, instead of $controller and $action, we use the Target definition, which can point to more than just class methods.
The $parameters parameter, which is a list of arguments, has now been moved to the CallContextInterface invocation context.
/** @deprecated Use InterceptorInterface instead */
interface CoreInterceptorInterface
{
public function process(string $controller, string $action, array $parameters, CoreInterface $core): mixed;
}
interface InterceptorInterface
{
public function intercept(CallContextInterface $context, HandlerInterface $handler): mixed;
}
The CallContextInterface invocation context contains all the information about the call:
[!NOTE]
CallContextInterfaceis immutable.
TargetInterface defines the target whose call we want to intercept.
If you need to replace the Target in the interceptor chain, use the static methods of the \Spiral\Interceptors\Context\Target class to create a new Target.
The basic set includes several types of Target:
Target::fromReflectionMethod(ReflectionFunctionAbstract $reflection, class-string|object $classOrObject) Target::fromReflectionFunction(\ReflectionFunction $reflection, array $path = []) Target::fromClosure(\Closure $closure, array $path = []) $target = Target::fromClosure($this->someAction(...));
Target::fromPathString(string $path, string $delimiter = '.') and
Target::fromPathArray(array $path, string $delimiter = '.') Target::fromPair(string|object $controller, string $action) Spiral 3.x will work as expected with both old and new interceptors. However, new interceptors should be created based on the new interface.
In Spiral 4.x, support for old interceptors will be disabled. You will likely be able to restore it by including the spiral/hmvc package.
If you need to manually build an interceptor chain, use \Spiral\Interceptors\PipelineBuilderInterface.
In Spiral v3, two implementations are provided:
\Spiral\Interceptors\PipelineBuilder — an implementation for new interceptors only.\Spiral\Core\CompatiblePipelineBuilder — an implementation from the spiral/hmvc package that supports both old and new interceptors simultaneously.[!NOTE] In Spiral 3.14, the implementation for
PipelineBuilderInterfaceis not defined in the container by default.CompatiblePipelineBuilderis used in Spiral v3 services as a fallback implementation. If you define your own implementation, it will be used instead of the fallback implementation in all framework pipelines.
At the end of the interceptor chain, there should always be a \Spiral\Interceptors\HandlerInterface, which will be called if the interceptor chain does not terminate with a result or exception.
The spiral/interceptors package provides several basic handlers:
\Spiral\Interceptors\Handler\CallableHandler — simply calls the callable from the Target "as is".\Spiral\Interceptors\Handler\AutowireHandler — calls a method or function, resolving missing arguments using the container.use Spiral\Core\CompatiblePipelineBuilder;
use Spiral\Interceptors\Context\CallContext;
use Spiral\Interceptors\Context\Target;
use Spiral\Interceptors\Handler\CallableHandler;
$interceptors = [
new MyInterceptor(),
new MySecondInterceptor(),
new MyThirdInterceptor(),
];
$pipeline = (new CompatiblePipelineBuilder())
->withInterceptors(...$interceptors)
->build(handler: new CallableHandler());
$pipeline->handle(new CallContext(
target: Target::fromPair($controller, $action),
arguments: $arguments,
attributes: $attributes,
));
Container Scopes are integrated even deeper. In Spiral, each type of worker is handled by a separate dispatcher. Each dispatcher has its own scope, which can be used to limit the set of services available to the worker.
During request processing, such as HTTP, the context (ServerRequestInterface) passes through a middleware pipeline.
At the very end, when the middleware has finished processing and the controller has not yet been called, there is a moment when the request context is finally prepared.
At this moment, the contextual container scope (in our case, http-request) is opened, and the ServerRequestInterface is placed in the container.
In this scope, interceptors come into play, after which the controller is executed.
As before, you can additionally open scopes in middleware, interceptors, or the business layer, for example, to limit the authorization context in a multi-tenant application.
You can view the names of dispatcher scopes and their contexts in the enum \Spiral\Framework\Spiral.
http.request scope added by @msmakouz in #1069ScopeName to Spiral by @msmakouz in #1078PaginationProviderInterface binding in scope by @msmakouz in #1079Proxy to the InvokerInterface in JobHandler by @msmakouz in #1091TracerFactoryInterface by @gam6itko in #1119Spiral\Queue\HandlerInterface::handle() by @gam6itko in #1120Full Changelog: https://github.com/spiral/framework/compare/3.13.0...3.14.0
AbstractTarget.[spiral/session] Fix session id validation and file handler path containment
Full Changelog: https://github.com/spiral/framework/compare/3.13.0...3.13.1
We are excited to introduce a new feature that enhances the flexibility of the logging component. With the new LoggerChannel attribute, developers can
LoggerChannel attributeWe are excited to introduce a new feature that enhances the flexibility of the logging component. With the new LoggerChannel attribute, developers can now specify the logger channel directly in the code.
Example Usage:
class SomeService
{
public function __construct(
// Logger with channel `roadrunner` will be injected
#[LoggerChannel('roadrunner')] public LoggerInterface $logger
){}
}
This feature allows for better organization and clarity in logging, helping you maintain and debug your application more efficiently.
by @roxblnfk in https://github.com/spiral/framework/pull/1102
With this update, you can now scan for attributes in parent classes, making your class discovery process more comprehensive and efficient.
Why This Matters
Previously, the tokenizer could only listen to classes where attributes were found. This limitation did not allow for the automatic (convenient) detection of classes by parent attributes and the effective use of the tokenizer cache. With this update, it will also listen to interfaces that the class with the attribute implements and the classes that it extends. This new feature leverages the full power of the tokenizer without the need to scan all classes and handle them manually, ensuring a more efficient and thorough attribute detection process.
Here is a practical example of how to use this feature:
use Spiral\Tokenizer\Attribute\TargetAttribute;
#[TargetAttribute(attribute: MyAttribute::class, scanParents: true)]
class MyListener implements TokenizationListenerInterface
{
public function listen(\ReflectionClass $class): void
{
// Your logic here
}
public function finalize(): void
{
// Your logic here
}
}
by @roxblnfk in https://github.com/spiral/framework/pull/1110
SyncDriver by @msmakouz in https://github.com/spiral/framework/pull/1107HEAD and OPTIONS HTTP methods to route:list command by @tairau in https://github.com/spiral/framework/pull/1109directive parser by @butschster in https://github.com/spiral/framework/pull/1098mixed type in the methods parameters by @msmakouz in https://github.com/spiral/framework/pull/1092StateBinder::hasInjector() method by @anoxia in https://github.com/spiral/framework/pull/1105TokenizerBootloader by @butschster in https://github.com/spiral/framework/pull/1093Full Changelog: https://github.com/spiral/framework/compare/3.12.0...3.13.0
Spiral\Queue\TaskInterface and Spiral\Queue\Task which will contain all the necessary data
for job processing.The Container::runScoped() method (in the implementation) was additionally marked as @deprecated and will be removed when its use in tests is reduced…
spiral/coreAdvanced Context Handling in Injector Implementations by @roxblnfk in https://github.com/spiral/framework/pull/1041
This pull request presents a significant update to the injector system, focusing on the createInjection method of the Spiral\Core\Container\InjectorInterface. The key enhancement lies in the augmented ability of the injector to handle context more effectively.
Previously, the createInjection method accepted two parameters: the ReflectionClass object of the requested class and a context, which was limited to being either a string or null. This approach, while functional, offered limited flexibility in dynamically resolving dependencies based on the calling context.
The updated createInjection method can now accept an extended range of context types including Stringable|string|null, mixed, or ReflectionParameter|string|null. This broadening allows the injector to receive more detailed contextual information, enhancing its capability to make more informed decisions about which implementation to provide.
Now you can do something like this:
<?php
declare(strict_types=1);
namespace App\Application;
final class SomeService
{
public function __construct(
#[DatabaseDriver(name: 'mysql')]
public DatabaseInterface $database,
#[DatabaseDriver(name: 'sqlite')]
public DatabaseInterface $database1,
) {
}
}
And example of injector
<?php
declare(strict_types=1);
namespace App\Application;
use Spiral\Core\Container\InjectorInterface;
final class DatabaseInjector implements InjectorInterface
{
public function createInjection(\ReflectionClass $class, \ReflectionParameter|null|string $context = null): object
{
$driver = $context?->getAttributes(DatabaseDriver::class)[0]?->newInstance()?->name ?? 'mysql';
return match ($driver) {
'sqlite' => new Sqlite(),
'mysql' => new Mysql(),
default => throw new \InvalidArgumentException('Invalid database driver'),
};
}
}
Add non-reportable exceptions by @msmakouz in https://github.com/spiral/framework/pull/1044
The ability to exclude reporting of certain exceptions has been added. By default, Spiral\Http\Exception\ClientException, Spiral\Filters\Exception\ValidationException, and Spiral\Filters\Exception\AuthorizationException are ignored.
Exceptions can be excluded from the report in several different ways:
NonReportableTo exclude an exception from the report, you need to add the Spiral\Exceptions\Attribute\NonReportable attribute to the exception class.
use Spiral\Exceptions\Attribute\NonReportable;
#[NonReportable]
class AccessDeniedException extends \Exception
{
// ...
}
dontReportInvoke the dontReport method in the Spiral\Exceptions\ExceptionHandler class. This can be done using the bootloader.
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Exceptions\ExceptionHandler;
final class AppBootloader extends Bootloader
{
public function init(ExceptionHandler $handler): void
{
$handler->dontReport(EntityNotFoundException::class);
}
}
nonReportableExceptionsYou can override the nonReportableExceptions property with predefined exceptions.
This release marks a foundational shift in how we approach dependency management within our framework, setting the stage for the upcoming version 4.0. With these changes, we're not just tweaking the system; we're laying down the groundwork for more robust, efficient, and intuitive handling of dependencies in the long run. To ensure everyone can make the most out of these updates, we will be rolling out a series of tutorials aimed at helping you navigate through the new features and enhancements.
The context is also extended on other container methods get() (see https://github.com/spiral/framework/pull/1041)
If the container scope is not open, it is assumed by default that dependencies are resolved in the scope named root. Now when calling invoke(), make(), get(), the container will globally register itself with the root scope if no other scope was opened. Before this, the container resolved dependencies as if outside the scope.
The experimental ContainerScopeInterface has been removed. The method getBinder(?string $scope = null): BinderInterface has been moved to BinderInterface at the annotation level.
The Container::runScoped() method (in the implementation) was additionally marked as @deprecated and will be removed when its use in tests is reduced to zero. Instead of the Container::runScoped(), you should now call the old Container::runScope(), but with passing the DTO Spiral\Core\Scope instead of the list of bindings.
$container->runScope(
new Scope(name: 'auth', bindings: ['actor' => new Actor()]),
function(ContainerInterface $container) {
dump($container->get('actor'));
},
);
Instead of the now removed ContainerScopeInterface::getCurrentContainer() method, the user is offered another way to get dependencies from the container of the current scope - a proxy.
The user can mark the dependency with a new attribute Spiral\Core\Attribute\Proxy.
Warning: The dependency must be defined by an interface.
When resolving dependencies, the container will create a proxy object that implements the specified interface. When calling the interface method, the proxy object will get the container of the current scope, request the dependency from it using its interface, and start the necessary method.
final class Service
{
public function __construct(
#[Proxy] public LoggerInterface $logger,
) {
}
public function doAction() {
// Equals to
// $container->getCurrentContainer()->get(LoggerInterface::class)->log('foo')
$this->logger->log('foo');
}
}
Important nuances:
// class
function __construct(
#[Proxy] private Dependency $dep,
#[Proxy] private ContainerInterface $container,
) {}
function handle() {
// There are four calls to the container under the hood.
$this->dep->foo();
$this->dep->bar();
$this->dep->baz();
$this->dep->red();
// Only two calls to the container and caching the value in a variable
// The first call - getting the container through the proxy
// The second - explicit retrieval of the dependency from the container
$dep = $this->container->get(Dependency::class);
$dep->foo();
$dep->bar();
$dep->baz();
$dep->red();
}
Added the ability to bind an interface as a proxy using the Spiral\Core\Config\Proxy configuration. This is useful in cases where a service needs to be used within a specific scope but must be accessible within the container for other services in root or other scopes (so that a service requiring the dependency can be successfully created and used when needed in the correct scope).
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Core\BinderInterface;
use Spiral\Core\Config\Proxy;
use Spiral\Framework\ScopeName;
use Spiral\Http\PaginationFactory;
use Spiral\Pagination\PaginationProviderInterface;
final class PaginationBootloader extends Bootloader
{
public function __construct(
private readonly BinderInterface $binder,
) {
}
public function defineSingletons(): array
{
$this->binder
->getBinder(ScopeName::Http)
->bindSingleton(PaginationProviderInterface::class, PaginationFactory::class);
$this->binder->bind(
PaginationProviderInterface::class,
new Proxy(PaginationProviderInterface::class, true) // <-------
);
return [];
}
}
Similar to Proxy, but also allows outputting a deprecation message when attempting to retrieve a dependency from the container. In the example below, we use two bindings, one in scope and one out of scope with Spiral\Core\Config\DeprecationProxy. When requesting the interface in scope, we will receive the service, and when requesting it out of scope, we will receive the service and a deprecation message.
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Core\BinderInterface;
use Spiral\Core\Config\DeprecationProxy;
use Spiral\Framework\ScopeName;
use Spiral\Http\PaginationFactory;
use Spiral\Pagination\PaginationProviderInterface;
final class PaginationBootloader extends Bootloader
{
public function __construct(
private readonly BinderInterface $binder,
) {
}
public function defineSingletons(): array
{
$this->binder
->getBinder(ScopeName::Http)
->bindSingleton(PaginationProviderInterface::class, PaginationFactory::class);
$this->binder->bind(
PaginationProviderInterface::class,
new DeprecationProxy(PaginationProviderInterface::class, true, ScopeName::Http, '4.0') // <----------
);
return [];
}
}
Added the ability to specify the scope name for the dispatcher using the Spiral\Attribute\DispatcherScope attribute.
use Spiral\Attribute\DispatcherScope;
use Spiral\Boot\DispatcherInterface;
#[DispatcherScope(scope: 'console')]
final class ConsoleDispatcher implements DispatcherInterface
{
// ...
}
The registration of dispatchers has been changed. The accepted type in the addDispatcher method of the Spiral\Boot\AbstractKernel class has been extended from DispatcherInterface to string|DispatcherInterface. Before these changes, the method accepted a created DispatcherInterface object, now it can accept a class name string or an object. In version 4.0, the DispatcherInterface type will be removed. When passing an object, only its class name will be saved. And when using the dispatcher, its object will be created anew.
Example with ConsoleDispatcher:
public function init(AbstractKernel $kernel): void
{
$kernel->bootstrapped(static function (AbstractKernel $kernel): void {
$kernel->addDispatcher(ConsoleDispatcher::class);
});
}
The dispatchers are now created in their own scope and receive dependencies that are specified in this scope. But due to the need to check whether the dispatcher can handle the request or not before creating the dispatcher object, the canServe method in dispatchers must be static:
public static function canServe(EnvironmentInterface $env): bool
{
return (PHP_SAPI === 'cli' && $env->get('RR_MODE') === null);
}
This method has been removed from the Spiral\Boot\DispatcherInterface, for backward compatibility it can be non-static, as it was before (then an object will be created for its call) or static and accept Spiral\Boot\EnvironmentInterface.
scaffolder:info console commandAdds
scaffolder:infoconsole command by @butschster in https://github.com/spiral/framework/pull/1068
Now you can list available commands.
monolog/monolog v3.x by @msmakouz in https://github.com/spiral/framework/pull/1049cocur/slugify 4.x by @msmakouz in https://github.com/spiral/framework/pull/1048league/flysystem v3.x by @msmakouz in https://github.com/spiral/framework/pull/1050doctrine/annotations by @msmakouz in https://github.com/spiral/framework/pull/1059spiral/translator Added a check for the existence of a message by @msmakouz in https://github.com/spiral/framework/pull/1062spiral/translator Fixed getLocaleDirectory method by @msmakouz in https://github.com/spiral/framework/pull/1075spiral/core Fixed check for the existence of a binding in parent scopes using Conainer::has by @msmakouz in https://github.com/spiral/framework/pull/1065spiral/router Updated route:list command for customization route class by @iAvenger01 in https://github.com/spiral/framework/pull/1070spiral/core Added the ability to configure container via options by @msmakouz in https://github.com/spiral/framework/pull/1082Full Changelog: https://github.com/spiral/framework/compare/3.11.1...3.12.0
Spiral\Core\Container\SingletonInterface is deprecated,
use Spiral\Core\Attribute\Singleton instead. Will be removed in v4.0.Spiral\Scaffolder\Command\InfoCommand console command for getting information about available scaffolder
commands.Spiral\Core\Config\Proxy or Spiral\Core\Config\DeprecationProxy.Spiral\Core\Options. Added option checkScope
to enable scope checking.Adding Listeners to the tokenizer:Info console command by @msmakouz in https://github.com/spiral/framework/pull/1042
tokenizer:Info console command by @msmakouz in https://github.com/spiral/framework/pull/1042Full Changelog: https://github.com/spiral/framework/compare/3.11.0...3.11.1
Spiral\Command\Tokenizer\InfoCommand console command.Spiral\Command\Tokenizer\ValidateCommand console command for validating Tokenizer listeners.[spiral/core] Disable scoped container leak check; dedeprecate method runScope() by @roxblnfk in https://github.com/spiral/framework/pull/1038
Spiral\Debug\Config\DebugConfig by @msmakouz in https://github.com/spiral/framework/pull/1026booting event by @msmakouz in https://github.com/spiral/framework/pull/1033runScope() by @roxblnfk in https://github.com/spiral/framework/pull/1038Full Changelog: https://github.com/spiral/framework/compare/3.10.1...3.11.0
Spiral\Debug\Config\DebugConfig has been added for easy addition of tags and collectors.[spiral/tokenizer] Add namedArguments parameter to the TargetAttribute by @msmakouz in https://github.com/spiral/framework/pull/1018
namedArguments parameter to the TargetAttribute by @msmakouz in https://github.com/spiral/framework/pull/1018Full Changelog: https://github.com/spiral/framework/compare/3.10.0...3.10.1
We've introduced a new interface, Spiral\Boot\Bootloader\BootloaderRegistryInterface, and its implementation, Spiral\Boot\Bootloader\BootloaderRegistr
We've introduced a new interface, Spiral\Boot\Bootloader\BootloaderRegistryInterface, and its implementation, Spiral\Boot\Bootloader\BootloaderRegistry. This update makes the process of registering bootloaders in Spiral much simpler and more flexible.
Now, you can easily manage your bootloaders using our spiral-packages/discoverer package. This package helps you automatically find and register bootloaders specified in your composer.json like in example below:
{
// ...
"extra": {
"spiral": {
"bootloaders": [
"Spiral\\Monolog\\Bootloader\\DotenvBootloader",
"Spiral\\DotEnv\\Bootloader\\MonologBootloader"
],
"dont-discover": [
"spiral-packages/event-bus"
]
}
}
}
This feature also allows for bootloader discovery from various sources, such as configuration files or other custom methods.
by @msmakouz in https://github.com/spiral/framework/pull/1015
The spiral/filters package in Spiral's ecosystem is designed for filtering and, optionally, validating input data. It enables you to set specific rules for each input field, ensuring that the data received matches the expected format and other defined criteria.
For example, consider this filter:
namespace App\Endpoint\Web\Filter;
use Spiral\Filters\Attribute\Input\Query;
use Spiral\Filters\Model\Filter;
final class UserFilter extends Filter
{
#[Query(key: 'username')]
public string $username;
}
In this scenario, the username is expected to be a string. However, there might be instances where the input data is of the wrong type, such as an array or an integer. Previously, such mismatches would result in an exception being thrown by the application.
With the new update, we've added the capability to specify custom error messages for these mismatches. This enhancement allows for more graceful handling of incorrect data types. Here's how you can implement it:
namespace App\Endpoint\Web\Filter;
use Spiral\Filters\Attribute\Input\Query;
use Spiral\Filters\Model\Filter;
use Spiral\Filters\Attribute\CastingErrorMessage;
final class UserFilter extends Filter
{
#[Query(key: 'username')]
#[CastingErrorMessage('Invalid type')]
public string $username;
}
This update ensures that your application can provide clearer feedback when encountering data of an unexpected type.
by @msmakouz in https://github.com/spiral/framework/pull/1016
There is a new DTO class Spiral\Boot\Attribute\BootloadConfig which enables the inclusion or exclusion of bootloaders, passing parameters that will be forwarded to the init and boot methods of the bootloader, and dynamically adjusting the bootloader loading based on environment variables.
Here is a simple example:
namespace App\Application;
use Spiral\Boot\Attribute\BootloadConfig;
use Spiral\Prototype\Bootloader\PrototypeBootloader;
class Kernel extends \Spiral\Framework\Kernel
{
// ...
public function defineBootloaders(): array
{
return [
// ...
PrototypeBootloader::class => new BootloadConfig(allowEnv: ['APP_ENV' => ['local', 'dev']]),
// ...
];
}
// ...
}
In this example, we specified that the PrototypeBootloader should be loaded only if the environment variable APP_ENV is defined and has a value of local or dev.
You can also define a function that returns a BootloadConfig object. This function can take arguments, which might be obtained from the container.
PrototypeBootloader::class => static fn (AppEnvironment $env) => new BootloadConfig(enabled: $env->isLocal()),
You can also use BootloadConfig class as an attribute to control how a bootloader behaves.
use Spiral\Boot\Attribute\BootloadConfig;
use Spiral\Boot\Bootloader\Bootloader;
#[BootloadConfig(allowEnv: ['APP_ENV' => 'local'])]
final class SomeBootloader extends Bootloader
{
}
Attributes are a great choice when you want to keep the configuration close to the bootloader's code. It's a more intuitive way to set up bootloaders, especially in cases where the configuration is straightforward and doesn't require complex logic.
By extending BootloadConfig, you can create custom classes that encapsulate specific conditions under which bootloaders should operate.
Here's an example
class TargetRRWorker extends BootloadConfig {
public function __construct(array $modes)
{
parent::__construct(
env: ['RR_MODE' => $modes],
);
}
}
// ...
class Kernel extends Kernel
{
public function defineBootloaders(): array
{
return [
HttpBootloader::class => new TargetRRWorker(['http']),
RoutesBootloader::class => new TargetRRWorker(['http']),
// Other bootloaders...
];
}
}
by @msmakouz in https://github.com/spiral/framework/pull/1017
Full Changelog: https://github.com/spiral/framework/compare/3.9.1...3.10
Spiral\Boot\Bootloader\BootloaderRegistryInterface and Spiral\Boot\Bootloader\BootloaderRegistry
to allow for easier management of bootloaders.Nothing published for this version
Added Spiral\Queue\Interceptor\Consume\RetryPolicyInterceptor to enable automatic job retries with a configurable retry policy. To use it, need to add
RetryPolicyInterceptor for Queue componentAdded Spiral\Queue\Interceptor\Consume\RetryPolicyInterceptor to enable automatic job retries with a configurable retry policy. To use it, need to add the Spiral\Queue\Attribute\RetryPolicy attribute to the job class:
use Spiral\Queue\Attribute\RetryPolicy;
use Spiral\Queue\JobHandler;
#[RetryPolicy(maxAttempts: 3, delay: 5, multiplier: 2)]
final class Ping extends JobHandler
{
public function invoke(array $payload): void
{
// ...
}
}
Create an exception that implements interface Spiral\Queue\Exception\RetryableExceptionInterface:
use Spiral\Queue\Exception\RetryableExceptionInterface;
use Spiral\Queue\RetryPolicyInterface;
class RetryException extends \DomainException implements RetryableExceptionInterface
{
public function isRetryable(): bool
{
return true;
}
public function getRetryPolicy(): ?RetryPolicyInterface
{
return null;
}
}
The exception must implement the two methods isRetryable and getRetryPolicy. These methods can override the retry behavior and cancel the re-queue- or change the retry policy.
If a RetryException is thrown while a job runs, the job will be re-queued according to the retry policy.
Pull request: https://github.com/spiral/framework/pull/980 by @msmakouz
Added ability to configure serializer and job type using attributes.
use App\Domain\User\Entity\User;
use Spiral\Queue\Attribute\Serializer;
use Spiral\Queue\Attribute\JobHandler as Handler;
use Spiral\Queue\JobHandler;
#[Handler('ping')]
#[Serializer('marshaller-json')]
final class Ping extends JobHandler
{
public function invoke(User $payload): void
{
// ...
}
}
Pull request: https://github.com/spiral/framework/pull/990 by @msmakouz
Now you can configure the Monolog messages format via environment variable MONOLOG_FORMAT.
MONOLOG_FORMAT="[%datetime%] %level_name%: %message% %context%\n"
Pull request: https://github.com/spiral/framework/pull/994 by @msmakouz
Now you can register additional directories with translation files for the Translator component. This can be useful when developing additional packages for the Spiral Framework, where the package may provide translation files (for example, validators). Translation files in an application can override translations from additional directories.
A directory with translations can be registered via the Spiral\Bootloader\I18nBootloader bootloader or translator.php configuration file.
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Bootloader\I18nBootloader;
final class AppBootloader extends Bootloader
{
public function init(I18nBootloader $i18n): void
{
$i18n->addDirectory('some/directory');
}
}
return [
// ...
'directories' => [
'some/directory'
],
// ...
];
Pull request: https://github.com/spiral/framework/pull/996 by @msmakouz
Storage componentHave you ever faced challenges in storing your app's exception snapshots when working with stateless applications? We've got some good news. With our latest update, we've made it super easy for you.
By integrating with the spiral/storage component, we're giving your stateless apps the power to save exception snapshots straight into S3.
Spiral\Bootloader\SnapshotsBootloader with Spiral\Bootloader\StorageSnapshotsBootloader.SNAPSHOTS_BUCKET environment variable.app/src/Application/Bootloader/ExceptionHandlerBootloader.php to replace the exception reporter Spiral\Exceptions\Reporter\FileReporter with Spiral\Exceptions\Reporter\StorageReporter in the boot method (an example for a default installation of spiral/app).Pull request: https://github.com/spiral/framework/pull/986 by @msmakouz
prototype:list console command for listing prototype dependenciesThe prototype:list command is a super cool addition to our Spiral Framework. It helps developers by providing an easy way to list all the classes registered in the Spiral\Prototype\PrototypeRegistry. These registered classes are essential for project prototyping.
Using the command is simple. Just run the following line in your terminal:
php app.php prototype:list
Once you do that, you'll get a neat table that displays all the registered prototypes, including their names and target classes. This makes it incredibly easy to see what's available for your project prototyping needs.
+------------------+-------------------------------------------------------+
| Name: | Target: |
+------------------+-------------------------------------------------------+
| app | App\Application\Kernel |
| classLocator | Spiral\Tokenizer\ClassesInterface |
| console | Spiral\Console\Console |
| broadcast | Spiral\Broadcasting\BroadcastInterface |
| container | Psr\Container\ContainerInterface |
| encrypter | Spiral\Encrypter\EncrypterInterface |
| env | Spiral\Boot\EnvironmentInterface |
| files | Spiral\Files\FilesInterface |
| guard | Spiral\Security\GuardInterface |
| http | Spiral\Http\Http |
| i18n | Spiral\Translator\TranslatorInterface |
| input | Spiral\Http\Request\InputManager |
| session | Spiral\Session\SessionScope |
| cookies | Spiral\Cookies\CookieManager |
| logger | Psr\Log\LoggerInterface |
| logs | Spiral\Logger\LogsInterface |
| memory | Spiral\Boot\MemoryInterface |
| paginators | Spiral\Pagination\PaginationProviderInterface |
| queue | Spiral\Queue\QueueInterface |
| queueManager | Spiral\Queue\QueueConnectionProviderInterface |
| request | Spiral\Http\Request\InputManager |
| response | Spiral\Http\ResponseWrapper |
| router | Spiral\Router\RouterInterface |
| snapshots | Spiral\Snapshots\SnapshotterInterface |
| storage | Spiral\Storage\BucketInterface |
| serializer | Spiral\Serializer\SerializerManager |
| validator | Spiral\Validation\ValidationInterface |
| views | Spiral\Views\ViewsInterface |
| auth | Spiral\Auth\AuthScope |
| authTokens | Spiral\Auth\TokenStorageInterface |
| cache | Psr\SimpleCache\CacheInterface |
| cacheManager | Spiral\Cache\CacheStorageProviderInterface |
| exceptionHandler | Spiral\Exceptions\ExceptionHandlerInterface |
| users | App\Infrastructure\Persistence\CycleORMUserRepository |
+------------------+-------------------------------------------------------+
This new feature enhances developer productivity and ensures that we're making the most of the Spiral Framework's capabilities. It provides clarity on available prototypes, which can be crucial when building and extending our projects.
Note You might notice that we've also renamed the old
prototype:listcommand toprototype:usageto better align with its purpose.
Pull request: https://github.com/spiral/framework/pull/1003 by @msmakouz
array to mixed by @msmakouz in https://github.com/spiral/framework/pull/992bubble as true by default in logRotate method by @msmakouz in https://github.com/spiral/framework/pull/997Full Changelog: https://github.com/spiral/framework/compare/3.8.4...3.9.0
Spiral\Queue\Interceptor\Consume\RetryPolicyInterceptor to enable automatic job retries
with a configurable retry policy.MONOLOG_FORMAT.Spiral\Prototype\Command\ListCommand for listing prototype dependencies.Fixing visibility in the Storage configuration by @msmakouz in https://github.com/spiral/framework/pull/977
visibility in the Storage configuration by @msmakouz in https://github.com/spiral/framework/pull/977Tokenizer Info console command by @msmakouz in https://github.com/spiral/framework/pull/979null instead of using unset in the reset method by @msmakouz in https://github.com/spiral/framework/pull/985hasInstance in the parent scope by @msmakouz in https://github.com/spiral/framework/pull/981Full Changelog: https://github.com/spiral/framework/compare/3.8.3...3.8.4
visibility in the Storage configurationTokenizer Info console commandnull instead of using unset in the reset methodhasInstance in the parent scopeChecking singletons in the hasInstance method by @msmakouz in https://github.com/spiral/framework/pull/975
singletons in the hasInstance method by @msmakouz in https://github.com/spiral/framework/pull/975Full Changelog: https://github.com/spiral/framework/compare/3.8.2...3.8.3
hasInstance methodAdding force parameter to the bindSingleton method by @msmakouz in https://github.com/spiral/framework/pull/973
force parameter to the bindSingleton method by @msmakouz in https://github.com/spiral/framework/pull/973Full Changelog: https://github.com/spiral/framework/compare/3.8.1...3.8.2
force parameter to the bindSingleton methodAdding the ability to configure the Attributes cache or disable the cache by @msmakouz in https://github.com/spiral/framework/pull/968
Full Changelog: https://github.com/spiral/framework/compare/3.8.0...3.8.1
> Use it instead of Spiral\Core\ScopeInterface, which is deprecated now.
We are excited to announce a new feature, that enhances the scaffold generation process by providing clear and concise instructions on the next steps to be taken after generating various classes for your application.
With the Instructions feature, you can generate classes for the following components:
Each generated class comes with a set of instructions on what to do next, ensuring a smooth and hassle-free development experience.
Let's take a look at an example:
php app.php create:command ScanSite
Will display
Declaration of 'ScanSiteCommand' has been successfully written into 'app/src/Endpoint/Console/ScanSiteCommand.php'.
Next steps:
1. Use the following command to run your command: 'php app.php scan:site'
2. Read more about user Commands in the documentation: https://spiral.dev/docs/console-commands
To experience the Instructions feature, simply use the scaffold generator commands for the respective components and follow the provided instructions for each generated class. The documentation links accompanying the instructions serve as a valuable resource for in-depth explanations and best practices.
By @butschster in https://github.com/spiral/framework/pull/945
The spiral/scaffolder component provides the ability to generate various classes, such as bootloaders, HTTP controllers, console commands, request filters, and Cycle ORM entities. These generated classes are stored in a directory specified in the configuration file. However, there was no way to specify a custom directory for specific declaration types.
This PR added a new configuration option to the declarations array that allows for the specification of a custom directory for a specific declaration type where to store a generated file.
directory in the ScaffolderBootloader::addDeclaration method:class ScaffolderBootloader extends Bootloader
{
//...
public function boot(BaseScaffolderBootloader $scaffolder, DatabaseSeederConfig $config): void
{
$scaffolder->addDeclaration(Declaration\FactoryDeclaration::TYPE, [
'namespace' => $config->getFactoriesNamespace(),
'postfix' => 'Factory',
'class' => Declaration\FactoryDeclaration::class,
'baseNamespace' => 'Database',
'directory' => $config->getFactoriesDirectory() // <=============
]);
$scaffolder->addDeclaration(Declaration\SeederDeclaration::TYPE, [
'namespace' => $config->getSeedersNamespace(),
'postfix' => 'Seeder',
'class' => Declaration\SeederDeclaration::class,
'baseNamespace' => 'Database',
'directory' => $config->getSeedersDirectory() // <=============
]);
}
}
app/config/scaffolder.phpreturn [
'directory' => directory('app') . 'src/',
'declarations' => [
Declaration\BootloaderDeclaration::TYPE => [
'namespace' => 'Application\Bootloader',
'postfix' => 'Bootloader',
'class' => Declaration\BootloaderDeclaration::class,
'directory' => directpry('app') . '/Infrastructure/Bootloader' // <=============
],
],
];
This allows users to customize the directory structure of their generated classes more easily, and improves the overall flexibility of the scaffolder component.
by @msmakouz in https://github.com/spiral/framework/pull/925
Introducing Spiral\Filters\Model\Mapper\Mapper that sets values for filter properties. It utilizes a collection of casters, each designed to handle a specific type of value.
Default casters include:
Spiral\Filters\Model\Mapper\EnumCaster Allows the use of PHP enums in a filter properties. This caster verifies the property type as an enum and creates the necessary enumeration from the value passed to the filter.<?php
declare(strict_types=1);
use Spiral\Filters\Attribute\Input\Post;
use Spiral\Filters\Model\Filter;
use App\User\Type;
final class RegisterUser extends Filter
{
#[Post]
public string $name;
#[Post]
public Type $status = Type::Admin;
// ...
}
Spiral\Filters\Model\Mapper\UuidCaster Allows the use of ramsey/uuid in a filter properties. This caster confirms the property type as UUID and constructs an UUID object from the string provided to the Filter.<?php
declare(strict_types=1);
use Spiral\Filters\Attribute\Input\Post;
use Spiral\Filters\Model\Filter;
use Ramsey\Uuid\UuidInterface;
final class UpdateUser extends Filter
{
#[Post]
public UuidInterface $uuid;
// ...
}
Spiral\Filters\Model\Mapper\DefaultCaster: Used when other casters are unable to assign a value. It sets the property value without any transformations.Custom casters
Casters are extensible and can be created and added by users within the application. To achieve this, it's necessary to create a custom caster object, implement the Spiral\Filters\Model\Mapper\CasterInterface interface.
Let's take a look at an example:
<?php
declare(strict_types=1);
namespace App\Application\Filter\Caster;
use Spiral\Filters\Model\Mapper\CasterInterface;
final class BooleanCaster implements CasterInterface
{
public function supports(\ReflectionNamedType $type): bool
{
return $type->isBuiltin() && $type->getName() === 'bool';
}
public function setValue(FilterInterface $filter, \ReflectionProperty $property, mixed $value): void
{
$property->setValue($filter, (bool) $value);
}
}
And register it in the Spiral\Filters\Model\Mapper\CasterRegistryInterface via register method.
<?php
declare(strict_types=1);
namespace App\Application\Bootloader;
use Spiral\Filters\Model\Mapper\CasterRegistryInterface;
use Spiral\Boot\Bootloader\Bootloader;
use App\Application\Filter\Caster\BooleanCaster;
final class FilerBootloader extends Bootloader
{
public function init(CasterRegistryInterface $registry)
{
$registr->register(new BooleanCaster());
}
}
by @msmakouz in https://github.com/spiral/framework/pull/961
TokenStorageScopeThis class can be used to access the specific implementation of the token storage that is used in the current container scope.
use Spiral\Auth\TokenStorageScope;
final class SomeController
{
public function index(TokenStorageScope $tokenStorage): string
{
$tokenStorage->load('some-id');
$tokenStorage->create(['id' => 'some-id']);
$tokenStorage->delete($token);
}
}
by @msmakouz in https://github.com/spiral/framework/pull/931
In this update, our primary focus has been on elevating the overall performance of the container
These changes together make the container work faster and more efficiently while also using less memory. As a result, your applications should perform better overall.
Additionally,
To demonstrate the enhanced container functionality, here's an example showcasing the new binding configuration:
use Spiral\Core\Config\Factory;
$container->bind(LoggerInterface::class, new Factory(
callable: static function() {
return new Logger(....);
},
singleton: true
))
Read more about new binding here
We also added a new container scope interface Spiral\Core\ContainerScopeInterface that can be used to run code withing isolated IoC scope.
Note Use it instead of
Spiral\Core\ScopeInterface, which is deprecated now.
A new interface provides also an ability to bind aliases in a specific scope
use Spiral\Core\ScopeInterface;
final class AppBootloader extends Bootloader
{
public function init(ContainerScopeInterface $container)
{
// Bind into a specific scope
$container->getBinder('http')->bind(...);
// Bind into the current scope
$container->getBinder()->bind(...);
}
}
by @roxblnfk in https://github.com/spiral/framework/pull/941 https://github.com/spiral/framework/pull/935 https://github.com/spiral/framework/pull/936
In this release, we've introduced a robust safeguard to prevent accidental overwriting of existing singletons within the container. This new feature ensures a more controlled environment for managing your application's dependencies and provides greater clarity when redefining singletons. In previous versions of the container, users could override existing singleton definitions by redefining them with new configurations. While this flexibility allowed for dynamic changes, it also led to potential confusion and unexpected behavior. To address this, we've introduced an intelligent exception mechanism in the container management process.
If you attempt to redefine a singleton that already exists in the container, the framework will now throw an exception Spiral\Core\Exception\Binder\SingletonOverloadException to notify you about the ongoing singleton definition.
To redefine a singleton, initiate the process by explicitly removing the existing binding linked to the singleton.
$container->removeBining(...)
Once the current binding is removed, proceed with the definition of the new configuration for the singleton.
by @msmakouz in https://github.com/spiral/framework/pull/955
I want to highlight something cool in spiral/tokenizer component. Well, it's got this new thing with class listeners that seriously boosts how we analyze code. Especially handy when we're tackling big codebases.
Here's the deal: before, we could only check out PHP classes. But now, we're getting more firepower. We can also dive into Enums and class interfaces. How cool is that?
To make it work, just tweak some settings in app/config/tokenizer.php like so:
return [
// ...
'load' => [
'classes' => true,
'enums' => true,
'interfaces' => true,
],
];
With these tweaks done, you're ready to rock with Enums and interfaces. Check this out:
use Spiral\Tokenizer\TokenizationListenerInterface;
class EnumsListener implements TokenizationListenerInterface
{
public function listen(\ReflectionClass $class): void
{
if (!$class instanceof \ReflectionEnum) {
return;
}
// ...
}
public function finalize(): void
{
}
}
by @andrey-mokhov in https://github.com/spiral/framework/pull/947
tokenizer:info console commandWe also added a simple command to display tokenizer configuration.
Just run
php app.php tokenizer:info
Once you've done that, you will see an information about tokenizer configutration.
Included directories:
+-----------------------------+-------+
| Directory | Scope |
+-----------------------------+-------+
| app/ | |
| vendor/spiral/validator/src | |
+-----------------------------+-------+
Excluded directories:
+----------------+-------+
| Directory | Scope |
+----------------+-------+
| app/resources/ | |
| app/config/ | |
| tests | |
| migrations | |
+----------------+-------+
Tokenizer cache: disabled
To enable cache, add "TOKENIZER_CACHE_TARGETS=true" to your .env file.
Read more at https://spiral.dev/docs/advanced-tokenizer/#class-listeners
by @butschster in https://github.com/spiral/framework/pull/963
Spiral comes with spiral/prototype component that speeds up the development of application services, controllers, middleware, and other classes via AST modification (a.k.a. it writes code for you). The extension includes IDE friendly tooltips for most common framework components and Cycle Repositories.
We've now made sure that the framework supports PHP 8.1. This means that when you run the command php app.php prototype:inject, all the dependencies used inside a class will be automatically injected into a constructor.
Here is an example
namespace App\Endpoint\Web;
use Spiral\Prototype\Traits\PrototypeTrait;
use Spiral\Router\Annotation\Route;
use Spiral\Views\ViewsInterface;
final class HomeController
{
use PrototypeTrait;
public function __construct(
private readonly ViewsInterface $views
) {
}
#[Route(route: '/', name: 'index')]
public function index(): string
{
return $this->views->render('home', [
'users' => $this->users->findAll() <====== Should be injected after command execution
]);
}
}
Run the command
php app.php prototype:inject
Once you've done that, your code will automatically transform to something like this:
namespace App\Endpoint\Web;
use Spiral\Prototype\Traits\PrototypeTrait;
use Spiral\Router\Annotation\Route;
use Spiral\Views\ViewsInterface;
use App\Infrastructure\Persistence\CycleORMUserRepository;
final class HomeController
{
use PrototypeTrait;
public function __construct(
private readonly CycleORMUserRepository $users,
private readonly ViewsInterface $views <========== Injected dependency
) {
}
// ...
}
by @msmakouz in https://github.com/spiral/framework/pull/917
psr/http-message v2 by @roxblnfk in https://github.com/spiral/framework/pull/944countPages correctly in constructor https://github.com/spiral/framework/issues/900 by @butschster in https://github.com/spiral/framework/pull/928AuthTransportMiddleware https://github.com/spiral/framework/issues/949 by @msmakouz in https://github.com/spiral/framework/pull/954Full Changelog: https://github.com/spiral/framework/compare/3.7.1...3.8.0
baseDirectory of Spiral\Scaffolder\Config\ScaffolderConfig class is deprecated.tokenizer:info console commandSpiral\Auth\TokenStorageScope, this class can be used to get the concrete implementation of
the token storage in a current container scope.Spiral\Auth\TokenStorageInterface binding in
the Spiral\Auth\Middleware\AuthMiddleware
with the used TokenStorage.Spiral\Filters\Model\Mapper\Mapper that sets values for filter properties. It utilizes a collection of casters, each designed to handle a specific type of value.declarationDirectory to
the Spiral\Scaffolder\Config\ScaffolderConfig
class that returns the directory path of the specified declaration, or default directory path if not specified.psr/http-message v2countPages correctly in constructorAuthTransportMiddlewareFixing PromotedParameter in the Reactor by @msmakouz in https://github.com/spiral/framework/pull/922
Full Changelog: https://github.com/spiral/framework/compare/3.7.0...3.7.1
countPages correctly in constructorPreviously, only arrays could be pushed to the queue, but with this feature, developers can now push any other types, such as objects, strings, etc. N
Previously, only arrays could be pushed to the queue, but with this feature, developers can now push any other types, such as objects, strings, etc. Now you can use various serializers like Symfony Serializer, Valinor, and Protobuf to serialize and deserialize objects. For example, using a more efficient and compact serialization format like Protobuf can help reduce the size of the data being pushed to the queue, resulting in faster processing times and lower storage costs.
Note Read more about jobs payload serialization on official documentation
by @msmakouz in https://github.com/spiral/framework/pull/887
This makes it easier for developers to define command options by allowing them to simply define the property type and the console command will automatically guess the appropriate mode for the option.
namespace App\Endpoint\Console;
use Spiral\Console\Attribute\AsCommand;
use Spiral\Console\Attribute\Option;
use Spiral\Console\Command;
#[AsCommand(name: 'create:user', description: 'Create a new user')]
class CreateUserCommand extends Command
{
#[Option]
private bool $active; // InputOption::VALUE_NEGATABLE
#[Option]
private int $age; // InputOption::VALUE_REQUIRED
#[Option]
private int $friends = 0; // InputOption::VALUE_OPTIONAL (property have a default value)
#[Option]
private ?string $address = null; // InputOption::VALUE_OPTIONAL (nullable property)
#[Option]
private array $groups; // InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY
#[Option]
private array $phones = []; // InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY
#[Option]
private ?array $emails; // InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY
public function __invoke(): int
{
// ...
}
}
Note Read more about console commands on official documentation
by @msmakouz in https://github.com/spiral/framework/pull/893
Previously, if a developer wanted to customize the scaffolder configuration, they had to override the entire default configuration in the scaffolder.php config file.
With this feature, developers can configure only specific options for each declaration type.
return [
'namespace' => 'App',
'declarations' => [
Declaration\BootloaderDeclaration::TYPE => [
'namespace' => 'Application\Bootloader',
],
Declaration\ConfigDeclaration::TYPE => [
'namespace' => 'Application\Config',
],
Declaration\ControllerDeclaration::TYPE => [
'namespace' => 'Endpoint\Web',
],
Declaration\MiddlewareDeclaration::TYPE => [
'class' => Declaration\MiddlewareDeclaration::class,
'namespace' => 'Application\Http\Middleware',
],
Declaration\CommandDeclaration::TYPE => [
'namespace' => 'Endpoint\Console',
],
Declaration\JobHandlerDeclaration::TYPE => [
'namespace' => 'Endpoint\Job',
'postfix' => 'Job',
],
],
];
It allows developers to customize only the specific declaration types they need, without having to override the entire default declaration configuration. This can make the configuration process simpler and reduce the risk of errors.
Note Read more about scaffolding on official documentation
by @msmakouz in https://github.com/spiral/framework/pull/918
create:bootloader command now has an ability to create a domain bootloader with interceptors using the -d option.create:command - command has been improved with several changes, such as adding the final keyword for class and using PHP attributes for command definition and console command declaration. The command now also has the ability to add arguments and options to the generated console command.// Generate command with arguments and options
php app.php create:command UserRegister -a username -a password -o isAdmin -d "Register a new user"
Will generate
<?php
declare(strict_types=1);
namespace App\Api\Cli\Command;
use Spiral\Console\Attribute\Argument;
use Spiral\Console\Attribute\AsCommand;
use Spiral\Console\Attribute\Option;
use Spiral\Console\Attribute\Question;
use Spiral\Console\Command;
#[AsCommand(name: 'user:register', description: 'Register a new user')]
final class UserRegisterCommand extends Command
{
#[Argument(description: 'Argument description')]
#[Question(question: 'What would you like to name the username argument?')]
private string $username;
#[Argument(description: 'Argument description')]
#[Question(question: 'What would you like to name the password argument?')]
private string $password;
#[Option(description: 'Argument description')]
private bool $isAdmin;
public function __invoke(): int
{
// Put your command logic here
$this->info('Command logic is not implemented yet');
return self::SUCCESS;
}
}
create:filter command has also been added for filters declaration, which allows developers to generate filters with validation rules.php app.php create:filter CreateUser -p username:post -p tags:post:array -p ip:ip -p token:header -p status:query:int
Will generate
<?php
declare(strict_types=1);
namespace App\Api\Web\Filter;
use Spiral\Filters\Attribute\Input\Header;
use Spiral\Filters\Attribute\Input\Post;
use Spiral\Filters\Attribute\Input\Query;
use Spiral\Filters\Attribute\Input\RemoteAddress;
use Spiral\Filters\Model\Filter;
final class CreateUserFilter extends Filter
{
#[Post(key: 'username')]
public string $username;
#[Post(key: 'tags')]
public array $tags;
#[RemoteAddress(key: 'ip')]
public string $ip;
#[Header(key: 'token')]
public string $token;
#[Query(key: 'status')]
public int $status;
}
There is also an ability to use validator to validate filter
php app.php create:filter CreateUser -p ... -s
Will generate
<?php
declare(strict_types=1);
namespace App\Api\Web\Filter;
use Spiral\Filters\Attribute\Input\Header;
use Spiral\Filters\Attribute\Input\Post;
use Spiral\Filters\Attribute\Input\Query;
use Spiral\Filters\Attribute\Input\RemoteAddress;
use Spiral\Filters\Model\Filter;
use Spiral\Filters\Model\FilterDefinitionInterface;
use Spiral\Filters\Model\HasFilterDefinition;
use Spiral\Validator\FilterDefinition;
final class CreateUserFilter extends Filter implements HasFilterDefinition
{
#[Post(key: 'username')]
public string $username;
#[Post(key: 'tags')]
public array $tags;
#[RemoteAddress(key: 'ip')]
public string $ip;
#[Header(key: 'token')]
public string $token;
#[Query(key: 'status')]
public int $status;
public function filterDefinition(): FilterDefinitionInterface
{
return new FilterDefinition(validationRules: [
// Put your validation rules here
]);
}
}
All these improvements can help to streamline the process of generating classes using the scaffolder component, making it easier and more efficient for developers to generate the necessary classes for their application.
Note Read more about scaffolding on official documentation
by @butschster in https://github.com/spiral/framework/pull/902
doctrine/annotations:2.x package by @msmakouz in https://github.com/spiral/framework/pull/897DESCRIPTION constant by @msmakouz in https://github.com/spiral/framework/pull/889Spiral\Console\Attribute\Option attribute.Fixed Split Monorepo action by @msmakouz in https://github.com/spiral/framework/pull/883
namespace and comment options by @butschster in https://github.com/spiral/framework/pull/884Full Changelog: https://github.com/spiral/framework/compare/3.6.0...3.6.1
Spiral Framework 3.6 has been released, introducing a range of new features, performance improvements, and bug fixes.
Spiral Framework 3.6 has been released, introducing a range of new features, performance improvements, and bug fixes.
One notable change is the introduction of a new and improved container, which offers isolated memory scopes for more fine-grained control over how dependencies are resolved. This is useful in situations where you want to ensure that certain dependencies are only used within a specific context and do not bleed over to other parts of the application.
PR: https://github.com/spiral/framework/pull/870
The Container::scope() method is used to run a true isolated scope, and it takes a callable as its first argument. The callable is executed within the scope, and any bindings passed as the second argument will only be used within that scope.
Named scopes can also be used. This is useful for cases where you have multiple scopes with similar dependencies, but with some variations. Parallel named scopes are also allowed.
When a scope is finished callback execution, all the dependencies that were created in that scope will be destroyed, including singletons. This means that any instances of objects that were created within the scope will no longer be available.
Additionally, the container that was used to run the scope will also be destroyed, which means that any attempts to use the container after the scope has finished execution will result in an exception being thrown.
If you create a named scope using Container::scope() method, you can access and modify the default bindings for that scope by calling Container::getBinder(string $scope) method and using the returned Binder instance to make new bindings.
$container = new Container();
// Configure `root` scope bindings (the current instance)
$container->bindSingleton(Interface::class, Implementation::class);
// Configure `request` scope default bindings
// Prefer way to make many bindings
$binder = $container->getBinder('request');
$binder->bindSingleton(Interface::class, Implementation::class);
$binder->bind(Interface::class, factory(...));
Here's an overview of the new attributes in Spiral's new container:
#[Singleton]: This attribute is used to mark a class as a singleton. This attribute can be used in addition to the traditional bindSingleton() method.
#[Scope(string $name)]: This attribute is used to set a scope in which a dependency can be resolved.
#[Finalize(string $method)]: This an experimental attribute is used to define a finalize method for a class. The finalize method will be called before the scope is being destroyed. This can be used to perform any necessary cleanup operations.
And also it's now fully compatible with PHP 8.2 Fibers. The static class \Spiral\Core\ContainerScope::getContainer()
will return correct container instance for the current fiber and scope.
Additionally, We improved application performance when utilizing tokenizer components. Specifically, the introduction of a TOKENIZER_CACHE_TARGETS environment variable now allows for tokenizer listener caching. Upon the initial application bootstrapping, all found classes for each tokenizer listener will be cached. Subsequent bootstrapping processes will then retrieve the cached data, leading to faster and more efficient performance.
PR: https://github.com/spiral/framework/pull/878
Developers can now create console commands using attributes.
PR: https://github.com/spiral/framework/pull/872
Furthermore, if required arguments are not provided when calling a console command, the framework will prompt users to input the missing arguments rather than displaying an error. This is particularly useful for scaffolder commands like php app.php create:controller, where developers previously needed to remember which arguments were required. With this new feature, all required arguments will be automatically prompted for, streamlining the development process.
When creating a console command, developers can use the Spiral\Console\Attribute\Question attribute to specify the question text that should be displayed when the command is run and a required argument is missing.
final class CreateUser extends Command
{
#[Argument]
#[Question(question: 'Provide the User Email')]
private string $email;
}
Another update is that the Setter attribute for the spiral/filters component is now repeatable. This means that it can be used multiple times on the same property, enabling more flexible and powerful filtering options.
class StoreUserFilter extends Filter
{
#[Post]
#[Setter(filter: 'strval')]
#[Setter('ltrim', '-')]
#[Setter('rtrim', ' ')]
#[Setter('htmlspecialchars')]
public string $name;
}
PR: https://github.com/spiral/framework/pull/874
Spiral also includes a new feature for cache storage aliases. Developers can now configure a key prefix for each alias, providing more granular control over caching options.
PR: https://github.com/spiral/framework/pull/869
return [
'aliases' => [
'user-data' => [
'storage' => 'in-memory',
'prefix' => 'user_'
],
'blog-data' => [
'storage' => 'in-memory',
'prefix' => 'blog_'
],
],
'storages' => [
'in-memory' => [
'type' => 'roadrunner-local'
],
],
];
This allows developers to use the same cache storage for multiple purposes while still maintaining separate cache keys for each purpose. The prefix option can be used to differentiate cache keys and ensure that they do not overlap, improving the reliability and accuracy of caching in the application.
// Cache Manager $cache
$cache->storage('user-data')->set('data', 'foo');
$cache->storage('blog-data')->set('data', 'bar');
// Result
array:2 [
"user_data" => array:2 [
"value" => "foo"
"timestamp" => 1677694480
]
"blog_data" => array:2 [
"value" => "bar"
"timestamp" => 1677694480
]
]
Another new feature is the ability to register a custom mail transport factory via Bootloader. This can be useful in cases where developers want to use a non-standard mail transport with the SendIt component.
PR: https://github.com/spiral/framework/pull/873
To register a new mail transport factory, developers can create a new Bootloader class
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\SendIt\TransportRegistryInterface;
use Symfony\Component\Mailer\Transport\c;
class AppBootloader extends Bootloader
{
public function boot(TransportRegistryInterface $registry): void
{
$registry->registerTransport(new SendmailTransportFactory(...));
}
}
Spiral Framework 3.6 also includes several bug fixes to improve the reliability and stability of the framework.
$service = new Service();
$container->bindSingleton(Service::class, $service);
$service === $container->make(Service::class); // true
$service === $container->make(Service::class, ['foo' => 'bar']); // false
PR: https://github.com/spiral/framework/pull/862
Updating PrototypeTrait DOCComment... DOCComment is missing no longer appears.PR: https://github.com/spiral/framework/pull/865
PR: https://github.com/spiral/framework/pull/868
Full Changelog: https://github.com/spiral/framework/compare/3.5.0...3.6.0
symfony/console increased to ^6.1.Singleton attribute to replace Spiral\Core\SingletonInterface.namespace in the
Spiral\Scaffolder\Command\BootloaderCommand, Spiral\Scaffolder\Command\CommandCommand,
Spiral\Scaffolder\Command\ConfigCommand, Spiral\Scaffolder\Command\ControllerCommand,
Spiral\Scaffolder\Command\JobHandlerCommand, Spiral\Scaffolder\Command\MiddlewareCommand console commands.defineInterceptors method in Spiral\Bootloader\DomainBootloader class.QueueInterface binding as a singleton.Deprecated Kernel constants and add new function defineSystemBootloaders to allow for more flexibility in defining system bootloaders. by @kastahov in…
Spiral\Router\Registry\RoutePatternRegistryInterface to allow for easier management of route patterns. by @kastahov in https://github.com/spiral/framework/pull/847VERBOSITY_LEVEL. by @kastahov in https://github.com/spiral/framework/pull/846defineSystemBootloaders to allow for more flexibility in defining system bootloaders. by @kastahov in https://github.com/spiral/framework/pull/845Full Changelog: https://github.com/spiral/framework/compare/3.4.0...3.5.0
removeClass of Spiral\Reactor\Partial\PhpNamespace class is deprecated. Use
method removeElement instead.defineSystemBootloaders to allow for more
flexibility in defining system bootloaders.Spiral\Router\Registry\RoutePatternRegistryInterface to
allow for easier management of route patterns.VERBOSITY_LEVEL.removeElement, getClass, getElements, getEnum, getEnums, getTrait,
getTraits, getInterface, getInterfaces in the class Spiral\Reactor\Partial\PhpNamespace.getElements, getEnum, getEnums, getTrait,
getTraits, getInterface, getInterfaces in the class Spiral\Reactor\FileDeclaration.[spiral/boot] Class Spiral\Boot\BootloadManager\BootloadManager is deprecated. Will be removed in version v4.0. https://github.com/spiral/framework/pu…
Spiral\Boot\BootloadManager\BootloadManager is deprecated. Will be removed in version v4.0. https://github.com/spiral/framework/pull/840[[ ... ]] when don't use Translator component by @butschster in https://github.com/spiral/framework/pull/843PATCH method into route:list command by @gam6itko in https://github.com/spiral/framework/pull/839Spiral\Boot\BootloadManager\InitializerInterface. This will allow changing the implementation
of this interface by the developer by @msmakouz https://github.com/spiral/framework/pull/840Spiral\Boot\BootloadManager\StrategyBasedBootloadManager. It allows the implementation of a
custom bootloaders loading strategy by @msmakouz https://github.com/spiral/framework/pull/840final from the Spiral\Boot\BootloadManager\Initializer class by @msmakouz https://github.com/spiral/framework/pull/840Spiral\Telemetry\Bootloader\TelemetryBootloader dependency to QueueBootloader by @butschster in https://github.com/spiral/framework/pull/837Spiral\Core\Container by @msmakouz in https://github.com/spiral/framework/pull/844Full Changelog: https://github.com/spiral/framework/compare/3.3.0...3.4.0
Spiral\Boot\BootloadManager\BootloadManager is deprecated. Will be removed in version v4.0.[[ ... ]] when don't use Translator component.PATCH method into route:list command.Spiral\Boot\BootloadManager\InitializerInterface. This will allow changing the
implementation
of this interface by the developer.Spiral\Boot\BootloadManager\StrategyBasedBootloadManager. It allows the implementation of a
custom bootloaders loading strategy.final from the Spiral\Boot\BootloadManager\Initializer class.Spiral\Telemetry\Bootloader\TelemetryBootloader dependency to QueueBootloader.Spiral\Core\Container.New [spiral/telemetry] component and spiral/otel-bridge by @butschster in https://github.com/spiral/framework/pull/816
Spiral\Auth\Middleware\Firewall\RedirectFirewall by @msmakouz in https://github.com/spiral/framework/pull/827TokenStorageProvider to able manage token storages by @kastahov in https://github.com/spiral/framework/pull/826Spiral\Http\Middleware\ErrorHandlerMiddleware by @msmakouz in https://github.com/spiral/framework/pull/833Full Changelog: https://github.com/spiral/framework/compare/3.2.0...3.3.0
prefix to the name of all routes in a group.Spiral\Auth\TokenStorageProviderInterface to allow custom token storages and an ability to
set default token storage via auth config.Spiral\Auth\Middleware\Firewall\RedirectFirewall middleware to redirect user to login
page if they are not authenticated.Spiral\Http\Middleware\ErrorHandlerMiddlewareAdding context in the Queue by @msmakouz in https://github.com/spiral/framework/pull/808
Full Changelog: https://github.com/spiral/framework/compare/3.1.0...3.2.0
headers parameter in the job handlers.headers in the Spiral\Queue\Options and new
interface Spiral\Queue\ExtendedOptionsInterface.Spiral\Core\Container and
Spiral\Core\ContainerScope.Added the ability to configure default validator by @msmakouz in https://github.com/spiral/framework/pull/805
ValidationHandlerMiddleware for handling filter validation exception. by @butschster in https://github.com/spiral/framework/pull/803Spiral\Stempler\Transform\Import\Bundle by @msmakouz in https://github.com/spiral/framework/pull/800AuthorizationStatus::$topics property by @butschster in https://github.com/spiral/framework/pull/804symfony/console version by @msmakouz in https://github.com/spiral/framework/pull/795ValidationProvider by @msmakouz in https://github.com/spiral/framework/pull/794Full Changelog: https://github.com/spiral/framework/compare/3.0.0...3.1.0
Spiral\Filter\ValidationHandlerMiddleware for handling filter validation exception.0 value in route parameter.setDefaultValidator
in the Spiral\Validation\Bootloader\ValidationBootloader.Fixed psalm issues and composer dependencies by @butschster in https://github.com/spiral/framework/pull/796
ClassesInterface into a callback function by @msmakouz in https://github.com/spiral/framework/pull/797readonly from Spiral\Stempler\Transform\Import\Bundle by @msmakouz in https://github.com/spiral/framework/pull/800AuthorizationStatus::$topics property by @butschster in https://github.com/spiral/framework/pull/804Full Changelog: https://github.com/spiral/framework/compare/3.0.0...3.0.2
Spiral\Stempler\Transform\Import\BundleNothing published for this version
Increased min PHP version up to 8.1 by @msmakouz in https://github.com/spiral/framework/pull/595
spiral/data-grid] moved into a standalone package by @msmakouz in https://github.com/spiral/framework/pull/655spiral/boot] Disabled overwriting of env variables by @msmakouz in https://github.com/spiral/framework/pull/664spiral/http] SAPI moved to standalone package sapi-bridge by @msmakouz in https://github.com/spiral/framework/pull/666spiral/monolog-bridge] Added the ability to configure the default channel by @msmakouz in https://github.com/spiral/framework/pull/675spiral/boot] Added automatic booting of bootloaders in the init and boot methods by @msmakouz in https://github.com/spiral/framework/pull/672spiral/filters] Added method Spiral\Filters\InputInterface::hasValue() by @only-viktor in https://github.com/spiral/framework/pull/470spiral/dumper] Removed component by @roxblnfk in https://github.com/spiral/framework/pull/679spiral/boot] Renamed starting/started into booting/booted methods by @msmakouz in https://github.com/spiral/framework/pull/686spiral/core] Refactored the container by @roxblnfk in https://github.com/spiral/framework/pull/670spiral/core] The container made replaceable in the App by @roxblnfk in https://github.com/spiral/framework/pull/689spiral/filters] Refactored component by @butschster in https://github.com/spiral/framework/pull/663spiral/console] Refactored component by @butschster in https://github.com/spiral/framework/pull/685spiral/core] Added typization for $config property in Spiral\Core\InjectableConfig by @msmakouz in https://github.com/spiral/framework/pull/694spiral/boot] Added Spiral\Boot\Injector\EnumInjector for enums by @butschster in https://github.com/spiral/framework/pull/693spiral/http] Added the ability to add input bags by @msmakouz in https://github.com/spiral/framework/pull/698spiral/attributes] component moved into a standalone package by @msmakouz in https://github.com/spiral/framework/pull/699spiral/scaffolder] Added the ability to override the base namespace by @msmakouz in https://github.com/spiral/framework/pull/705laminas/diactoros to nyholm/psr7 by @msmakouz in https://github.com/spiral/framework/pull/704spiral/boot] Added callbacks appBooting and appBooted for App bootloaders by @msmakouz in https://github.com/spiral/framework/pull/703spiral/monolog-bridge] Fixed the problem with finalizing monolog logger during application destruction. by @butschster in https://github.com/spiral/framework/pull/710bin/spiral by @msmakouz in https://github.com/spiral/framework/pull/714spiral/router] Refactored component by @msmakouz in https://github.com/spiral/framework/pull/709spiral/console] Added ApplicationInProduction confirmation class for console commands by @butschster in https://github.com/spiral/framework/pull/713spiral/exceptions] Added LoggerReporter by @msmakouz in https://github.com/spiral/framework/pull/716spiral/serializer] Added Serializer component with interface and simple implementation by @msmakouz in https://github.com/spiral/framework/pull/712spiral/auth] Added AuthTransportMiddleware by @msmakouz in https://github.com/spiral/framework/pull/717spiral/boot] Added a new callback running for Kernel class by @butschster in https://github.com/spiral/framework/pull/720$env->get('DEBUG') with $debugMode->isEnabled() by @msmakouz in https://github.com/spiral/framework/pull/722spiral/queue] Removed method pushCallable by @msmakouz in https://github.com/spiral/framework/pull/723spiral/router] Added the ability to register middleware via Autowire by @msmakouz in https://github.com/spiral/framework/pull/726spiral/exceptions] Improved Spiral\Http\ErrorHandler\RendererInterface class. by @butschster in https://github.com/spiral/framework/pull/727spiral/router] Improved route group middleware by @butschster in https://github.com/spiral/framework/pull/730spiral/core] Added the ability to check if class or interface has registered injector by @butschster in https://github.com/spiral/framework/pull/734spiral/console] Added interceptors for Console command by @butschster in https://github.com/spiral/framework/pull/732spiral/queue] Removed opis/closure by @msmakouz in https://github.com/spiral/framework/pull/744spiral/serializer] Changing folder name from Dto to Model in Filters by @msmakouz in https://github.com/spiral/framework/pull/746spiral/views] Added the ability to register template global variables by @butschster in https://github.com/spiral/framework/pull/742spiral/queue] Added the ability to configure serializers for different types of jobs by @msmakouz in https://github.com/spiral/framework/pull/749spiral/queue] Added interceptors for consumers by @butschster in https://github.com/spiral/framework/pull/739spiral/tokenizer] Added ext-tokenizer dependency to composer requirements by @butschster in https://github.com/spiral/framework/pull/762spiral/boot] Preventing bootload abstract bootloaders by @msmakouz in https://github.com/spiral/framework/pull/766spiral/http] Fixed default behaviour for InputBag when it checks key with null value by @butschster in https://github.com/spiral/framework/pull/770spiral/queue] Added defaultSerializer in queue config by @msmakouz in https://github.com/spiral/framework/pull/768spiral/sendit] Added the ability to use custom transports for Symfony Mailer by @butschster in https://github.com/spiral/framework/pull/774spiral/events] Added PSR-14 Event dispatcher by @butschster and @msmakouz in https://github.com/spiral/framework/pull/769spiral/tokenizer] Added tokenizer listeners by @butschster in https://github.com/spiral/framework/pull/763spiral/exceptions] Added FileReporter by @msmakouz in https://github.com/spiral/framework/pull/779spiral/boot] Added the ability to use custom bootload manager by @butschster in https://github.com/spiral/framework/pull/781spiral/events] Use tokenizer listeners for registering event dispatcher listeners via attributes. by @butschster in https://github.com/spiral/framework/pull/785spiral/router] Fixed problem with subdomain patterns. by @butschster in https://github.com/spiral/framework/pull/786Full Changelog: https://github.com/spiral/framework/compare/2.11.0...3.0.0
spiral/data-grid-bridge is removed from spiral/framework repository.
Please, use standalone package spiral/data-grid-bridge instead.spiral/data-grid is removed from spiral/framework repository.
Please, use standalone package spiral/data-grid instead.Spiral\Boot\ExceptionHandler has been eliminated. New Spiral\Exceptions\ExceptionHandler with interfaces
Spiral\Exceptions\ExceptionHandlerInterface, Spiral\Exceptions\ExceptionRendererInterface and
Spiral\Exceptions\ExceptionReporterInterface have been added.Spiral\Command\Cycle\MigrateCommand, Spiral\Command\Cycle\SyncCommand,
Spiral\Command\Cycle\UpdateCommand, Spiral\Scaffolder\Command\MigrationCommand,
Spiral\Scaffolder\Command\Database\EntityCommand, Spiral\Scaffolder\Command\Database\RepositoryCommand,
Spiral\Command\Database\ListCommand, Spiral\Command\Database\TableCommand,
Spiral\Command\Migrate\InitCommand, Spiral\Command\Migrate\MigrateCommand,
Spiral\Command\Migrate\ReplayCommand, Spiral\Command\Migrate\RollbackCommand,
Spiral\Command\Migrate\StatusCommand is removed.
Use same console commands from spiral/cycle-bridge package.Spiral\Command\GRPC\ListCommand, Spiral\Command\GRPC\GenerateCommand is removed.
Use same console commands from spiral/roadrunner-bridge package.Spiral\Auth\Cycle\Token, Spiral\Auth\Cycle\TokenStorage, Spiral\Cycle\RepositoryInjector,
Spiral\Cycle\SchemaCompiler, Spiral\Domain\CycleInterceptor is removed.
Use same classes from spiral/cycle-bridge instead.Spiral\Bootloader\Jobs\JobsBootloader, Spiral\Bootloader\Server\LegacyRoadRunnerBootloader,
Spiral\Bootloader\Server\RoadRunnerBootloader, Spiral\Bootloader\ServerBootloader,
Spiral\Bootloader\GRPC\GRPCBootloader is removed.
Use spiral/roadrunner-bridge package.Spiral\Bootloader\Cycle\AnnotatedBootloader, Spiral\Bootloader\Cycle\CycleBootloader,
Spiral\Bootloader\Cycle\ProxiesBootloader, Spiral\Bootloader\Cycle\SchemaBootloader,
Spiral\Bootloader\Database\DatabaseBootloader, Spiral\Bootloader\Database\DisconnectsBootloader,
Spiral\Bootloader\Database\MigrationsBootloader is removed.
Use spiral/cycle-bridge package.Spiral\Bootloader\Broadcast\BroadcastBootloader is removed. Use spiral/roadrunner-broadcast package
instead.Spiral\Bootloader\Http\WebsocketsBootloader is removed.spiral/annotations is removed. Use spiral/attributes instead.void to a methods publish, publishDirectory, ensureDirectory
in Spiral\Module\PublisherInterface interface.Spiral\Http\SapiDispatcher and Spiral\Http\Emitter\SapiEmitter. Please, use
package spiral/sapi-bridge instead.Spiral\Bootloader\Http\DiactorosBootloader is removed. You can use the bootloader
Spiral\Nyholm\Bootloader\NyholmBootloader from the package spiral/nyholm-bridge to register PSR-7/PSR-17
factories.Spiral\Http\Diactoros\ResponseFactory, Spiral\Http\Diactoros\ServerRequestFactory, Spiral\Http\Diactoros\StreamFactory,
Spiral\Http\Diactoros\UploadedFileFactory, Spiral\Http\Diactoros\UriFactory
are removed. You can use spiral/nyholm-bridge to define PSR-17 factories.
HandlerInterface has been deleted.Spiral\Exceptions\Verbosity enum.addRoute in the Spiral\Router\RouterInterface
and Spiral\Router\Router.
Use method setRoute instead.Spiral\Validation\Checker\EntityChecker is removed.
Use Spiral\Cycle\Bootloader\ValidationBootloader with Spiral\Cycle\Validation\EntityChecker from
package spiral/cycle-bridgedatetime and timezone in the
Spiral\Validation\Checker\TypeChecker class. Use Spiral\Validation\Checker\DatetimeChecker::valid() and
Spiral\Validation\Checker\DatetimeChecker::timezone() instead.array|callable|string to the method parseCheck
in Spiral\Validation\ParserInterface interface.array|string|\Closure parameter type of $rules to the method getRules
in Spiral\Validation\RulesInterface interface.array|\ArrayAccess parameter type of $data to the method validate
in Spiral\Validation\ValidationInterface interface.mixed to the method getValue,
added mixed parameter type of $default to the method getValue,
added mixed parameter type of $context to the method withContext,
added return type mixed to the method getContext in Spiral\Validation\ValidatorInterface interface.void and mixed parameter type of $context to the method setContext,
added return type mixed to the method getContext in Spiral\Filters\FilterInterface interface.
Added return type mixed to the method getValue in Spiral\Filters\InputInterface.Dumper Component has been removed from the Framework.Spiral\Config\JsonPayloadConfig moved to the Spiral\Bootloader\Http\JsonPayloadConfig.mixed and array|string parameter type of $search,
array|string parameter type of $replace to the method replace in Spiral\Reactor\ReplaceableInterface.void to the method resume in Spiral\Session\SessionInterface.self and mixed parameter type of $value to the method set
in Spiral\Session\SessionSectionInterface.bool to the method has in Spiral\Session\SessionSectionInterface.mixed and mixed parameter type of $default to the method get
in Spiral\Session\SessionSectionInterface.mixed and mixed parameter type of $default to the method pull
in Spiral\Session\SessionSectionInterface.void to the method delete in Spiral\Session\SessionSectionInterface.void to the method clear in Spiral\Session\SessionSectionInterface.self to the method limit, added return type self to the
method offset
in Spiral\Pagination\PaginableInterface$printer now is not nullable in Spiral\Prototype\Injector constructor.self, added mixed parameter type of $value to the method setField,
added return type mixed, added mixed parameter type of $default to the method getField,
added return type self to the method setFields in Spiral\Models\EntityInterface.mixed to the method getValue in Spiral\Models\ValueInterface.self to the method addListener, added return type void to the
method removeListener
in Spiral\Logger\ListenerRegistryInterface interface.mixed to the method process in Spiral\Core\CoreInterceptorInterface
interface.mixed to the method callAction in Spiral\Core\CoreInterface interface.mixed to the method decrypt in Spiral\Encrypter\EncrypterInterface
interface.
in Spiral\DataGrid\InputInterface interface.array and mixed parameter type of $filler to the method fetch,
added return type mixed to the method offsetGet, added return type mixed and mixed parameter type
of $default to the method get in Spiral\Http\Request\InputBag class.void to the method setDefaults in Spiral\Config\ConfiguratorInterface
interface.Spiral\Core namespace has been changed.
New features:
Spiral\Core\ResolverInterface::validateArguments method for arguments validation.WeakReference bindings.starting renamed to booting, method started renamed to booted in the
class Spiral\Boot\AbstractKernel.self to the method set in Spiral\Boot\DirectoriesInterface interface.mixed and mixed parameter type of $default to the method get,
added in Spiral\Boot\EnvironmentInterface interface.static to the method addFinalizer,
added return type void to the method finalize in Spiral\Boot\FinalizerInterface interface.self to the method addDispatcher,
added return type mixed to the method serve in Spiral\Boot\KernelInterface interface.exceptionHandler parameter in the Spiral\Boot\AbstractKernel::create method.Spiral\Boot\AbstractKernel constructor is protected now.mixed to the method loadData,
added return type void and mixed parameter type of $data to the method saveData
in Spiral\Boot\MemoryInterface interface.Bootloaders, the name of the method has been changed from boot to init.
In the code of custom Bootloaders, need to change the name of the method.void to the method writeHeader, added return type void to the
method execute,
method whiteFooter renamed to writeFooter, added return type void to the method writeFooter
in Spiral\Console\SequenceInterface interface.bool to the method delete, added return type bool to the
method deleteDirectory,
added return type bool to the method touch, added return type bool to the method setPermissions
in Spiral\Files\FilesInterface.mixed to the method resolveValue in Spiral\Views\ContextInterface.mixed to the method getValue in Spiral\Views\DependencyInterface.void to a methods setLocales, saveLocale
in Spiral\Translator\Catalogue\CacheInterface.void to the method save
in Spiral\Translator\CatalogueManagerInterface.string|\Stringable parameter type of $id to a methods getContents, getStream,
exists, getLastModified, getSize, getMimeType, getVisibility
in Spiral\Storage\Storage\ReadableInterface.string|\Stringable parameter type of $id to a methods create, setVisibility,
delete. Added string|\Stringable parameter type of $id and mixed parameter type of $content
to the method write, added string|\Stringable parameter type of $source and $destination to a methods
copy, move in Spiral\Storage\Storage\WritableInterface.mixed and mixed parameter type of $default to the method getAttribute
in
Spiral\Stempler\Node\AttributedInterface.mixed and mixed parameter type of $node to the method enterNode,
added return type mixed and mixed parameter type of $node to the method leaveNode
in Spiral\Stempler\VisitorInterface.pipeline parameter in mailer config. Please, use the parameter queue
instead.self to a methods addRole, removeRole
in Spiral\Security\PermissionsInterfaceself to a methods set, remove in Spiral\Security\RulesInterfaceSpiral\Bootloader\Distribution\DistributionBootloader moved to
the Spiral\Distribution\Bootloader\DistributionBootloader,
config Spiral\Bootloader\Distribution\DistributionConfig moved to
the Spiral\Distribution\Config\DistributionConfig.Spiral\Bootloader\Storage\StorageBootloader moved to
the Spiral\Storage\Bootloader\StorageBootloader,
config Spiral\Bootloader\Storage\StorageConfig moved to the Spiral\Storage\Config\StorageConfig.Spiral\Bootloader\Security\ValidationBootloader moved to
the Spiral\Validation\Bootloader\ValidationBootloader.Spiral\Bootloader\Views\ViewsBootloader moved to
the Spiral\Views\Bootloader\ViewsBootloader.$overwrite
changed from true to false in the Spiral\Boot\Environment.pushCallable in Spiral\Queue\QueueTrait.Spiral\DotEnv\Bootloader\DotenvBootloader must be moved from the LOAD
section to the
SYSTEM section in the application App.php file.PHP increased to ^8.1symfony/finder increased to ^5.3league/flysystem increased to ^2.3symfony/console increased to ^6.0Spiral\Snapshots\FileSnapshooter uses Verbosity enum instead of int flag.Spiral\Snapshots\FileSnapshooter uses ExceptionRendererInterface $renderer instead
of HandlerInterface $handler.Spiral\Snapshots\SnapshotterInterface usage replaced with Spiral\Exceptions\ExceptionReporterInterface in all
classes.bin/spiral. Uses the spiral/roadrunner-cli package instead.Spiral\Debug\StateConsumerInterface.boot method in Bootloaders. It will be executed after the init method is executed in
all Bootloaders.
The old boot method has been renamed to init. See High Impact Changes section.Bootloaders requested in the init and boot methods.
They no longer need to be specified explicitly in DEPENDENCIES property or in defineDependencies method.MONOLOG_DEFAULT_CHANNEL.Spiral\Exceptions\Reporter\FileReporter, which
implements Spiral\Exceptions\ExceptionReporterInterface
and can create text files with information about an exception.Adds deprecation for LogFactory DEFAULT const by @butschster in https://github.com/spiral/framework/pull/782
Full Changelog: https://github.com/spiral/framework/compare/2.14.0...2.14.1
[feature] Adding SerializerRegistry and ability to define job serializers by @msmakouz in https://github.com/spiral/framework/pull/753
SerializerRegistry and ability to define job serializers by @msmakouz in https://github.com/spiral/framework/pull/753withValue method by @butschster in https://github.com/spiral/framework/pull/750NamedArgumentsInstantiator with native PHP 8 behavior. by @donquixote in https://github.com/spiral/framework/pull/459Full Changelog: https://github.com/spiral/framework/compare/2.13.1...2.14.0
Nothing published for this version
Deprecated SAPI by @msmakouz in https://github.com/spiral/framework/pull/669
Full Changelog: https://github.com/spiral/framework/compare/2.12.0...2.13.0
Spiral\Http\SapiDispatcher is deprecated. Will be moved to spiral/sapi-bridge and removed in v3.0Spiral\Http\Emitter\SapiEmitter, Spiral\Http\Exception\EmitterException, Spiral\Http\EmitterInterface,
Spiral\Http\SapiRequestFactory is deprecated. Will be removed in version v3.0.
After the release of v3.0, must use the package spiral/sapi-bridge for SAPI functionality.
dumper component is deprecated and will be removed in v3.0chunkSize in the http configuration file.Queueable to mark classes that can be queued.
Added Spiral\Queue\QueueableDetector class to easily check if an object should be queued or not and get the
queue
from an attribute or getQueue method on the object.Marking deprecated code by @msmakouz in https://github.com/spiral/framework/pull/641
SapiEmitter by @roxblnfk in https://github.com/spiral/framework/pull/602yield will be sent as a stream chunk. By @roxblnfk in https://github.com/spiral/framework/pull/625psr/log dependency version by @roxblnfk in https://github.com/spiral/framework/pull/654self.version instead of * by @msmakouz in https://github.com/spiral/framework/pull/653Full Changelog: https://github.com/spiral/framework/compare/2.11.0...2.12.0
Spiral\Bootloader\Broadcast\BroadcastBootloader, Spiral\Bootloader\Http\WebsocketsBootloader
are deprecated. Will be removed in v3.0.Spiral\Command\Database\ListCommand, Spiral\Command\Database\TableCommand,
Spiral\Command\GRPC\GenerateCommand, Spiral\Command\GRPC\ListCommand, Spiral\Command\Migrate\AbstractCommand,
Spiral\Command\Migrate\InitCommand, Spiral\Command\Migrate\MigrateCommand, Spiral\Command\Migrate\ReplayCommand,
Spiral\Command\Migrate\RollbackCommand, Spiral\Command\Migrate\StatusCommand are deprecated. Will be removed
in v3.0.Spiral\Broadcast\Config\WebsocketsConfig, Spiral\Broadcast\Middleware\WebsocketsMiddleware,
Spiral\GRPC\Exception\CompileException, Spiral\GRPC\GRPCDispatcher, Spiral\GRPC\LocatorInterface,
Spiral\GRPC\ProtoCompiler, Spiral\GRPC\ServiceLocator, Spiral\Http\LegacyRrDispatcher, Spiral\Http\RrDispatcher
are deprecated. Will be removed in v3.0.Spiral\DataGrid\Annotation\DataGrid, Spiral\DataGrid\Bootloader\GridBootloader,
Spiral\DataGrid\Config\GridConfig, Spiral\DataGrid\Interceptor\GridInterceptor, Spiral\DataGrid\Response\GridResponse,
Spiral\DataGrid\Response\GridResponseInterface, Spiral\DataGrid\GridInput.addWriter in Spiral\DataGrid\Bootloader\GridBootloader.psr/log dependency from ^1.0 to 1 - 3Add queue injector by @roxblnfk in https://github.com/spiral/framework/pull/592
Full Changelog: https://github.com/spiral/framework/compare/2.10.0...2.11.0
Spiral\Boot\Environment #599One column per quarter.