-
-
Notifications
You must be signed in to change notification settings - Fork 251
Create OptionsResolver normalizers #1455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
9e13b6c
c95cc5e
f52d883
ecb9b81
1d9cb2b
3e25411
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -60,6 +60,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use Ratchet\Client\Connector; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use Ratchet\Client\WebSocket; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use Ratchet\RFC6455\Messaging\Message; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use React\Dns\Config\Config as DnsConfig; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use React\EventLoop\Loop; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use React\EventLoop\LoopInterface; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use React\EventLoop\TimerInterface; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -95,6 +96,29 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property PrivateChannelRepository $private_channels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property SoundRepository $sounds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property UserRepository $users | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array $options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property string $options['token'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property LoggerInterface $options['logger'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property LoopInterface $options['loop'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array|bool $options['loadAllMembers'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array $options['disabledEvents'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property bool $options['storeMessages'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array|bool $options['retrieveBans'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property int|null $options['large_threshold'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array|null $options['shard'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property int|null $options['shard_id'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property int|null $options['num_shards'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property int|null $options['shardId'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property int|null $options['shardCount'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array|null $options['presence'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property int $options['intents'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array $options['socket_options'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property DnsConfig|string $options['dnsConfig'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property string[] $options['cache'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property string $options['collection'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property bool $options['useTransportCompression'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+105
to
+125
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * @property array $options | |
| * @property string $options['token'] | |
| * @property LoggerInterface $options['logger'] | |
| * @property LoopInterface $options['loop'] | |
| * @property array|bool $options['loadAllMembers'] | |
| * @property array $options['disabledEvents'] | |
| * @property bool $options['storeMessages'] | |
| * @property array|bool $options['retrieveBans'] | |
| * @property int|null $options['large_threshold'] | |
| * @property array|null $options['shard'] | |
| * @property int|null $options['shard_id'] | |
| * @property int|null $options['num_shards'] | |
| * @property int|null $options['shardId'] | |
| * @property int|null $options['shardCount'] | |
| * @property array|null $options['presence'] | |
| * @property int $options['intents'] | |
| * @property array $options['socket_options'] | |
| * @property DnsConfig|string $options['dnsConfig'] | |
| * @property array $options['cache'] | |
| * @property string $options['collection'] | |
| * @property bool $options['useTransportCompression'] | |
| * @property array{ | |
| * token: string, | |
| * logger: LoggerInterface, | |
| * loop: LoopInterface, | |
| * loadAllMembers: array|bool, | |
| * disabledEvents: array, | |
| * storeMessages: bool, | |
| * retrieveBans: array|bool, | |
| * large_threshold: int|null, | |
| * shard: array|null, | |
| * shard_id: int|null, | |
| * num_shards: int|null, | |
| * shardId: int|null, | |
| * shardCount: int|null, | |
| * presence: array|null, | |
| * intents: int, | |
| * socket_options: array, | |
| * dnsConfig: DnsConfig|string, | |
| * cache: array, | |
| * collection: string, | |
| * useTransportCompression: bool | |
| * } $options |
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dnsConfig normalizer only runs when the caller explicitly sets the option; since dnsConfig has no default in the resolver, omitting it will bypass this normalizer and rely on separate manual initialization later in resolveOptions(). To fully centralize normalization, consider setting a default (e.g. null) so the normalizer always executes, and then remove the later manual dnsConfig fallback block.
Uh oh!
There was an error while loading. Please reload this page.