initial commit

This commit is contained in:
boris
2025-09-30 09:24:25 +01:00
committed by boris
parent a783a12c97
commit c7770ea03b
4695 changed files with 525784 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
<?php
namespace Symfony\Config\Framework\Messenger;
require_once __DIR__.\DIRECTORY_SEPARATOR.'BusConfig'.\DIRECTORY_SEPARATOR.'DefaultMiddlewareConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'BusConfig'.\DIRECTORY_SEPARATOR.'MiddlewareConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class BusConfig
{
private $defaultMiddleware;
private $middleware;
private $_usedProperties = [];
/**
* @template TValue of mixed
* @param TValue $value
* @default {"enabled":true,"allow_no_handlers":false,"allow_no_senders":true}
* @return \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig : static)
*/
public function defaultMiddleware(mixed $value = []): \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['defaultMiddleware'] = true;
$this->defaultMiddleware = $value;
return $this;
}
if (!$this->defaultMiddleware instanceof \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig) {
$this->_usedProperties['defaultMiddleware'] = true;
$this->defaultMiddleware = new \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "defaultMiddleware()" has already been initialized. You cannot pass values the second time you call defaultMiddleware().');
}
return $this->defaultMiddleware;
}
/**
* @template TValue of mixed
* @param TValue $value
* @return \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig : static)
*/
public function middleware(mixed $value = []): \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig|static
{
$this->_usedProperties['middleware'] = true;
if (!\is_array($value)) {
$this->middleware[] = $value;
return $this;
}
return $this->middleware[] = new \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig($value);
}
public function __construct(array $value = [])
{
if (array_key_exists('default_middleware', $value)) {
$this->_usedProperties['defaultMiddleware'] = true;
$this->defaultMiddleware = \is_array($value['default_middleware']) ? new \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig($value['default_middleware']) : $value['default_middleware'];
unset($value['default_middleware']);
}
if (array_key_exists('middleware', $value)) {
$this->_usedProperties['middleware'] = true;
$this->middleware = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig($v) : $v, $value['middleware']);
unset($value['middleware']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['defaultMiddleware'])) {
$output['default_middleware'] = $this->defaultMiddleware instanceof \Symfony\Config\Framework\Messenger\BusConfig\DefaultMiddlewareConfig ? $this->defaultMiddleware->toArray() : $this->defaultMiddleware;
}
if (isset($this->_usedProperties['middleware'])) {
$output['middleware'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Messenger\BusConfig\MiddlewareConfig ? $v->toArray() : $v, $this->middleware);
}
return $output;
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Symfony\Config\Framework\Messenger\BusConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class DefaultMiddlewareConfig
{
private $enabled;
private $allowNoHandlers;
private $allowNoSenders;
private $_usedProperties = [];
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function allowNoHandlers($value): static
{
$this->_usedProperties['allowNoHandlers'] = true;
$this->allowNoHandlers = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function allowNoSenders($value): static
{
$this->_usedProperties['allowNoSenders'] = true;
$this->allowNoSenders = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('allow_no_handlers', $value)) {
$this->_usedProperties['allowNoHandlers'] = true;
$this->allowNoHandlers = $value['allow_no_handlers'];
unset($value['allow_no_handlers']);
}
if (array_key_exists('allow_no_senders', $value)) {
$this->_usedProperties['allowNoSenders'] = true;
$this->allowNoSenders = $value['allow_no_senders'];
unset($value['allow_no_senders']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['allowNoHandlers'])) {
$output['allow_no_handlers'] = $this->allowNoHandlers;
}
if (isset($this->_usedProperties['allowNoSenders'])) {
$output['allow_no_senders'] = $this->allowNoSenders;
}
return $output;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\Framework\Messenger\BusConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class MiddlewareConfig
{
private $id;
private $arguments;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function arguments(ParamConfigurator|array $value): static
{
$this->_usedProperties['arguments'] = true;
$this->arguments = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('arguments', $value)) {
$this->_usedProperties['arguments'] = true;
$this->arguments = $value['arguments'];
unset($value['arguments']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['arguments'])) {
$output['arguments'] = $this->arguments;
}
return $output;
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace Symfony\Config\Framework\Messenger;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class RoutingConfig
{
private $senders;
private $_usedProperties = [];
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function senders(ParamConfigurator|array $value): static
{
$this->_usedProperties['senders'] = true;
$this->senders = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('senders', $value)) {
$this->_usedProperties['senders'] = true;
$this->senders = $value['senders'];
unset($value['senders']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['senders'])) {
$output['senders'] = $this->senders;
}
return $output;
}
}

View File

@@ -0,0 +1,74 @@
<?php
namespace Symfony\Config\Framework\Messenger\Serializer;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class SymfonySerializerConfig
{
private $format;
private $context;
private $_usedProperties = [];
/**
* Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default).
* @default 'json'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function format($value): static
{
$this->_usedProperties['format'] = true;
$this->format = $value;
return $this;
}
/**
* @return $this
*/
public function context(string $name, mixed $value): static
{
$this->_usedProperties['context'] = true;
$this->context[$name] = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('format', $value)) {
$this->_usedProperties['format'] = true;
$this->format = $value['format'];
unset($value['format']);
}
if (array_key_exists('context', $value)) {
$this->_usedProperties['context'] = true;
$this->context = $value['context'];
unset($value['context']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['format'])) {
$output['format'] = $this->format;
}
if (isset($this->_usedProperties['context'])) {
$output['context'] = $this->context;
}
return $output;
}
}

View File

@@ -0,0 +1,80 @@
<?php
namespace Symfony\Config\Framework\Messenger;
require_once __DIR__.\DIRECTORY_SEPARATOR.'Serializer'.\DIRECTORY_SEPARATOR.'SymfonySerializerConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class SerializerConfig
{
private $defaultSerializer;
private $symfonySerializer;
private $_usedProperties = [];
/**
* Service id to use as the default serializer for the transports.
* @default 'messenger.transport.native_php_serializer'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function defaultSerializer($value): static
{
$this->_usedProperties['defaultSerializer'] = true;
$this->defaultSerializer = $value;
return $this;
}
/**
* @default {"format":"json","context":[]}
*/
public function symfonySerializer(array $value = []): \Symfony\Config\Framework\Messenger\Serializer\SymfonySerializerConfig
{
if (null === $this->symfonySerializer) {
$this->_usedProperties['symfonySerializer'] = true;
$this->symfonySerializer = new \Symfony\Config\Framework\Messenger\Serializer\SymfonySerializerConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "symfonySerializer()" has already been initialized. You cannot pass values the second time you call symfonySerializer().');
}
return $this->symfonySerializer;
}
public function __construct(array $value = [])
{
if (array_key_exists('default_serializer', $value)) {
$this->_usedProperties['defaultSerializer'] = true;
$this->defaultSerializer = $value['default_serializer'];
unset($value['default_serializer']);
}
if (array_key_exists('symfony_serializer', $value)) {
$this->_usedProperties['symfonySerializer'] = true;
$this->symfonySerializer = new \Symfony\Config\Framework\Messenger\Serializer\SymfonySerializerConfig($value['symfony_serializer']);
unset($value['symfony_serializer']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['defaultSerializer'])) {
$output['default_serializer'] = $this->defaultSerializer;
}
if (isset($this->_usedProperties['symfonySerializer'])) {
$output['symfony_serializer'] = $this->symfonySerializer->toArray();
}
return $output;
}
}

View File

@@ -0,0 +1,185 @@
<?php
namespace Symfony\Config\Framework\Messenger;
require_once __DIR__.\DIRECTORY_SEPARATOR.'TransportConfig'.\DIRECTORY_SEPARATOR.'RetryStrategyConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class TransportConfig
{
private $dsn;
private $serializer;
private $options;
private $failureTransport;
private $retryStrategy;
private $rateLimiter;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function dsn($value): static
{
$this->_usedProperties['dsn'] = true;
$this->dsn = $value;
return $this;
}
/**
* Service id of a custom serializer to use.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function serializer($value): static
{
$this->_usedProperties['serializer'] = true;
$this->serializer = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function options(ParamConfigurator|array $value): static
{
$this->_usedProperties['options'] = true;
$this->options = $value;
return $this;
}
/**
* Transport name to send failed messages to (after all retries have failed).
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failureTransport($value): static
{
$this->_usedProperties['failureTransport'] = true;
$this->failureTransport = $value;
return $this;
}
/**
* @template TValue of mixed
* @param TValue $value
* @default {"service":null,"max_retries":3,"delay":1000,"multiplier":2,"max_delay":0,"jitter":0.1}
* @return \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig : static)
*/
public function retryStrategy(mixed $value = []): \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['retryStrategy'] = true;
$this->retryStrategy = $value;
return $this;
}
if (!$this->retryStrategy instanceof \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig) {
$this->_usedProperties['retryStrategy'] = true;
$this->retryStrategy = new \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "retryStrategy()" has already been initialized. You cannot pass values the second time you call retryStrategy().');
}
return $this->retryStrategy;
}
/**
* Rate limiter name to use when processing messages.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function rateLimiter($value): static
{
$this->_usedProperties['rateLimiter'] = true;
$this->rateLimiter = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('dsn', $value)) {
$this->_usedProperties['dsn'] = true;
$this->dsn = $value['dsn'];
unset($value['dsn']);
}
if (array_key_exists('serializer', $value)) {
$this->_usedProperties['serializer'] = true;
$this->serializer = $value['serializer'];
unset($value['serializer']);
}
if (array_key_exists('options', $value)) {
$this->_usedProperties['options'] = true;
$this->options = $value['options'];
unset($value['options']);
}
if (array_key_exists('failure_transport', $value)) {
$this->_usedProperties['failureTransport'] = true;
$this->failureTransport = $value['failure_transport'];
unset($value['failure_transport']);
}
if (array_key_exists('retry_strategy', $value)) {
$this->_usedProperties['retryStrategy'] = true;
$this->retryStrategy = \is_array($value['retry_strategy']) ? new \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig($value['retry_strategy']) : $value['retry_strategy'];
unset($value['retry_strategy']);
}
if (array_key_exists('rate_limiter', $value)) {
$this->_usedProperties['rateLimiter'] = true;
$this->rateLimiter = $value['rate_limiter'];
unset($value['rate_limiter']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['dsn'])) {
$output['dsn'] = $this->dsn;
}
if (isset($this->_usedProperties['serializer'])) {
$output['serializer'] = $this->serializer;
}
if (isset($this->_usedProperties['options'])) {
$output['options'] = $this->options;
}
if (isset($this->_usedProperties['failureTransport'])) {
$output['failure_transport'] = $this->failureTransport;
}
if (isset($this->_usedProperties['retryStrategy'])) {
$output['retry_strategy'] = $this->retryStrategy instanceof \Symfony\Config\Framework\Messenger\TransportConfig\RetryStrategyConfig ? $this->retryStrategy->toArray() : $this->retryStrategy;
}
if (isset($this->_usedProperties['rateLimiter'])) {
$output['rate_limiter'] = $this->rateLimiter;
}
return $output;
}
}

View File

@@ -0,0 +1,172 @@
<?php
namespace Symfony\Config\Framework\Messenger\TransportConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class RetryStrategyConfig
{
private $service;
private $maxRetries;
private $delay;
private $multiplier;
private $maxDelay;
private $jitter;
private $_usedProperties = [];
/**
* Service id to override the retry strategy entirely.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default 3
* @param ParamConfigurator|int $value
* @return $this
*/
public function maxRetries($value): static
{
$this->_usedProperties['maxRetries'] = true;
$this->maxRetries = $value;
return $this;
}
/**
* Time in ms to delay (or the initial value when multiplier is used).
* @default 1000
* @param ParamConfigurator|int $value
* @return $this
*/
public function delay($value): static
{
$this->_usedProperties['delay'] = true;
$this->delay = $value;
return $this;
}
/**
* If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)).
* @default 2
* @param ParamConfigurator|float $value
* @return $this
*/
public function multiplier($value): static
{
$this->_usedProperties['multiplier'] = true;
$this->multiplier = $value;
return $this;
}
/**
* Max time in ms that a retry should ever be delayed (0 = infinite).
* @default 0
* @param ParamConfigurator|int $value
* @return $this
*/
public function maxDelay($value): static
{
$this->_usedProperties['maxDelay'] = true;
$this->maxDelay = $value;
return $this;
}
/**
* Randomness to apply to the delay (between 0 and 1).
* @default 0.1
* @param ParamConfigurator|float $value
* @return $this
*/
public function jitter($value): static
{
$this->_usedProperties['jitter'] = true;
$this->jitter = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('max_retries', $value)) {
$this->_usedProperties['maxRetries'] = true;
$this->maxRetries = $value['max_retries'];
unset($value['max_retries']);
}
if (array_key_exists('delay', $value)) {
$this->_usedProperties['delay'] = true;
$this->delay = $value['delay'];
unset($value['delay']);
}
if (array_key_exists('multiplier', $value)) {
$this->_usedProperties['multiplier'] = true;
$this->multiplier = $value['multiplier'];
unset($value['multiplier']);
}
if (array_key_exists('max_delay', $value)) {
$this->_usedProperties['maxDelay'] = true;
$this->maxDelay = $value['max_delay'];
unset($value['max_delay']);
}
if (array_key_exists('jitter', $value)) {
$this->_usedProperties['jitter'] = true;
$this->jitter = $value['jitter'];
unset($value['jitter']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['maxRetries'])) {
$output['max_retries'] = $this->maxRetries;
}
if (isset($this->_usedProperties['delay'])) {
$output['delay'] = $this->delay;
}
if (isset($this->_usedProperties['multiplier'])) {
$output['multiplier'] = $this->multiplier;
}
if (isset($this->_usedProperties['maxDelay'])) {
$output['max_delay'] = $this->maxDelay;
}
if (isset($this->_usedProperties['jitter'])) {
$output['jitter'] = $this->jitter;
}
return $output;
}
}