spiral/framework
Spiral Framework is a high-performance, long-running full-stack PHP framework with 60+ PSR-compatible components. Powered by RoadRunner for resident-memory apps, it supports GRPC, queues, WebSockets, background workers, and more.
SpanInterface singleton rebindingTracerInterface in the AbstractTracer::runScope method\Spiral\Core\Scope is public nownikic/php-parser v5AppEnvironment 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.SpanInterface@ inside a string that is not a directivehttp scopeBinder::bind methodArrayStorage::setMultiple() now returns true instead of false.ServerRequestInterface is always resolved into a Proxy in the http scopeEventDispatcher is now injected into CacheManagerDebugBootloader now uses a Factory Proxy to resolve collectors.
Unresolved collectors don't break state populating flow.Introspector.GuardScope has been deprecated. Use GuardInterface directly instead.RecursiveProxyException will be
thrown in this case.AbstractTarget.spiral/interceptors.spira/hmvc is deprecated now.Spiral\Queue\TaskInterface and Spiral\Queue\Task which will contain all the necessary data
for job processing.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.Spiral\Command\Tokenizer\InfoCommand console command.Spiral\Command\Tokenizer\ValidateCommand console command for validating Tokenizer listeners.Spiral\Debug\Config\DebugConfig has been added for easy addition of tags and collectors.Spiral\Boot\Bootloader\BootloaderRegistryInterface and Spiral\Boot\Bootloader\BootloaderRegistry
to allow for easier management of bootloaders.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.visibility in the Storage configurationTokenizer Info console commandnull instead of using unset in the reset methodhasInstance in the parent scopehasInstance methodforce parameter to the bindSingleton methodbaseDirectory 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 constructorAuthTransportMiddlewarecountPages correctly in constructorSpiral\Console\Attribute\Option attribute.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.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\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.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\ErrorHandlerMiddlewareheaders parameter in the job handlers.headers in the Spiral\Queue\Options and new
interface Spiral\Queue\ExtendedOptionsInterface.Spiral\Core\Container and
Spiral\Core\ContainerScope.Spiral\Filter\ValidationHandlerMiddleware for handling filter validation exception.0 value in route parameter.setDefaultValidator
in the Spiral\Validation\Bootloader\ValidationBootloader.Spiral\Stempler\Transform\Import\Bundlespiral/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.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.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 - 3Spiral\Boot\Environment #599Spiral\Session\SessionFactoryInterface. Now you can use custom implementation of
sessions.Spiral\Scaffolder\Command\MigrationCommand, Spiral\Scaffolder\Command\Database\RepositoryCommand,
Spiral\Scaffolder\Command\Database\EntityCommand is deprecated. Will be moved to spiral/cycle-bridge and
removed in v3.0Spiral\Scaffolder\Declaration\MigrationDeclaration is deprecated. Will be moved
to spiral/cycle-bridge
and removed in v3.0PHP increased to ^7.4queue and cache propertiesSpiral\Mailer\Message is no longer final and is available for extensiongetQueuePipeline of Spiral\SendIt\Config\MailerConfig class is deprecated.
Use method getQueue instead. Added environment variables MAILER_QUEUE and MAILER_QUEUE_CONNECTIONSpiral\Validation\Checker\EntityChecker, Spiral\Auth\Cycle\Token, Spiral\Auth\Cycle\TokenStorage,
Spiral\Cycle\RepositoryInjector, Spiral\Cycle\SchemaCompiler, is deprecated.
Will be moved to spiral/cycle-bridge and removed in v3.0Spiral\Command\Cycle\MigrateCommand, Spiral\Command\Cycle\SyncCommand,
Spiral\Command\Cycle\UpdateCommand is deprecated. Will be moved to spiral/cycle-bridge and removed in v3.0Spiral\Bootloader\Cycle\AnnotatedBootloader, Spiral\Bootloader\Cycle\CycleBootloader,
Spiral\Bootloader\Cycle\ProxiesBootloader, Spiral\Bootloader\Cycle\SchemaBootloader is deprecated.
Use spiral/cycle-bridge insteadSpiral\Domain\CycleInterceptor is deprecated.
Will be moved to spiral/cycle-bridge and removed in v3.0Spiral\Scaffolder\Declaration\Database\Entity\AnnotatedDeclaration,
Spiral\Scaffolder\Declaration\Database\RepositoryDeclaration is deprecated. Will be moved
to spiral/cycle-bridge
and removed in v3.0spiral/data-grid-bridge is deprecated. Will be moved to spiral/cycle-bridge and removed in v3.0spiral/annotations is deprecated. Use spiral/attributes insteaddoctrine/annotations increased to ^1.12sync driver for mail queue (#398)New Functionality
spiral/storage component (See https://spiral.dev/docs/component-storage)spiral/distribution component (See https://spiral.dev/docs/component-distribution)spiral/attributes component (See https://spiral.dev/docs/component-attributes)High Impact Changes
league/flysystem: ^2.0 dependency.Other Features
High Impact Changes
monolog/monolog increased to ^2.2Other Features
now parameter in datetime checkerilike postgres filterGuardInterceptorBug Fixes
High Impact Changes
symfony/translation increased to ^5.1symfony/console increased to ^5.1symfony/finder increased to ^5.1Medium Impact Changes
zend/zend-diactoros was replaced by laminas/laminas-diactoros ^2.3Spiral\Debug\Dumper class marked as finalOther Features
any, none conditionsJobRegistry with the ability to route jobs into custom pipelinesencrypt:key is no longer privateroute:list by @ncounotNull validation rulegrpc:generate command by @matthewhall-ca-trimpath and musl targetTableCommand render for fragmentsroute:list commandPUSH message anymoreroave/security-advisoriesspiral/validation dependencyDatetimeChecker in the ValidationBootloaderspiral/filterscycle/proxy-factory dependencyspiral/jobs updated to 2.0JsonPayloadBootload to JsonPayloadParserBootloaderJsonPayloadMiddleware and JsonPayloadBootloaderjobs (queue) and grpc servicesFragmentInterface in db:table commandview:compile won't compile NativeEngine templates anymoredumprr function (dump to STDERR)\n after each migrationvendor/bin/spiral get-binary on linux machinesgrpc:generate command now includes all proto files from given directoryRbacBootloader renamed to GuardBootloadervendor/bin/spiral get-binary command to download application server by @Alex-Bonduri function restoredEncrypter
Session
Framework
bind() function to specify IoC dependencies in configsCommon
Core
DBAL
Models
Stempler
ODM
Storage
How can I help you explore Laravel packages today?