Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0ffe6da

Browse filesBrowse files
[FrameworkBundle][RemoteEvent][Routing][Scheduler] Add PHPDoc to attributes properties
1 parent 6c3d377 commit 0ffe6da
Copy full SHA for 0ffe6da

File tree

6 files changed

+134
-3
lines changed
Filter options

6 files changed

+134
-3
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Routing/Attribute/AsRoutingConditionService.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Routing/Attribute/AsRoutingConditionService.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
#[\Attribute(\Attribute::TARGET_CLASS)]
4242
class AsRoutingConditionService extends AutoconfigureTag
4343
{
44+
/**
45+
* @param string|null $alias The alias of the service to use it in routing condition expressions
46+
* @param int $priority The priority of the service when gathered in a service iterator or locator
47+
*/
4448
public function __construct(
4549
string $alias = null,
4650
int $priority = 0,

‎src/Symfony/Component/RemoteEvent/Attribute/AsRemoteEventConsumer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/RemoteEvent/Attribute/AsRemoteEventConsumer.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
class AsRemoteEventConsumer
1919
{
2020
public function __construct(
21+
/**
22+
* The name of the remote event consumer, used to identify it when defining remote events.
23+
*/
2124
public string $name,
2225
) {
2326
}

‎src/Symfony/Component/Routing/Attribute/Route.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Attribute/Route.php
+50-3Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,72 @@ class Route
3030
private array $schemes;
3131

3232
/**
33-
* @param array<string|\Stringable> $requirements
34-
* @param string[]|string $methods
35-
* @param string[]|string $schemes
33+
* @param string|array<string,string>|null $path The route path (i.e. "/user/login")
34+
* @param string|string[] $methods The list of HTTP methods allowed by this route
35+
* @param string|string[] $schemes The list of schemes allowed by this route (i.e. "https")
36+
* @param string|null $locale The locale accepted by the route
37+
* @param string|null $format The format returned by the route (i.e. "json", "xml")
38+
* @param bool|null $utf8 Whether the route accepts UTF-8 in its parameters
39+
* @param bool|null $stateless Whether the route is defined as stateless or stateful (@see https://symfony.com/doc/current/routing.html#stateless-routes)
3640
*/
3741
public function __construct(
3842
string|array $path = null,
43+
44+
/**
45+
* The route name (i.e. "app_user_login").
46+
*/
3947
private ?string $name = null,
48+
49+
/**
50+
* Requirements for the route attributes.
51+
*
52+
* @see https://symfony.com/doc/current/routing.html#parameters-validation
53+
*
54+
* @var array<string|\Stringable>
55+
*/
4056
private array $requirements = [],
57+
58+
/**
59+
* Other route configuration like its prefix (i.e. ['prefix' => '/api']).
60+
*
61+
* @var array<string, mixed>
62+
*/
4163
private array $options = [],
64+
65+
/**
66+
* The default values for the route attributes and query parameters.
67+
*
68+
* @var array<string, mixed>
69+
*/
4270
private array $defaults = [],
71+
72+
/**
73+
* A host for which the route will be matched.
74+
*/
4375
private ?string $host = null,
4476
array|string $methods = [],
4577
array|string $schemes = [],
78+
79+
/**
80+
* An expression that must evaluate to true for the route to be matched.
81+
*
82+
* @see https://symfony.com/doc/current/routing.html#matching-expressions
83+
*/
4684
private ?string $condition = null,
85+
86+
/**
87+
* The evaluation priority of the route if multiple are
88+
* defined with the same path.
89+
*/
4790
private ?int $priority = null,
4891
string $locale = null,
4992
string $format = null,
5093
bool $utf8 = null,
5194
bool $stateless = null,
95+
96+
/**
97+
* The env in which the route is defined (i.e. "dev", "test", "prod").
98+
*/
5299
private ?string $env = null
53100
) {
54101
if (\is_array($path)) {

‎src/Symfony/Component/Scheduler/Attribute/AsCronTask.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Attribute/AsCronTask.php
+35Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,47 @@
2020
class AsCronTask
2121
{
2222
public function __construct(
23+
/**
24+
* The cron expression to define the task schedule (i.e. "5 * * * *").
25+
*/
2326
public readonly string $expression,
27+
28+
/**
29+
* The timezone used with the cron expression.
30+
*/
2431
public readonly ?string $timezone = null,
32+
33+
/**
34+
* The cron jitter, in seconds. For example, if set to 60, the cron
35+
* will randomly wait for a number of seconds between 0 and 60 before
36+
* executing. This allows to avoid load spikes that can happen when many tasks
37+
* run at the same time.
38+
*/
2539
public readonly ?int $jitter = null,
40+
41+
/**
42+
* The arguments to pass to the cron task.
43+
*
44+
* @var array<array-key, mixed>|string|null
45+
*/
2646
public readonly array|string|null $arguments = null,
47+
48+
/**
49+
* The name of the schedule responsible for triggering the task.
50+
*/
2751
public readonly string $schedule = 'default',
52+
53+
/**
54+
* The method to run as the task when the attribute target is a class.
55+
*/
2856
public readonly ?string $method = null,
57+
58+
/**
59+
* One or many transports through which the message scheduling
60+
* the task will go.
61+
*
62+
* @var string[]|string|null
63+
*/
2964
public readonly array|string|null $transports = null,
3065
) {
3166
}

‎src/Symfony/Component/Scheduler/Attribute/AsPeriodicTask.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Attribute/AsPeriodicTask.php
+39Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,52 @@
2020
class AsPeriodicTask
2121
{
2222
public function __construct(
23+
/**
24+
* A string or an integer representing the frequency of the task (i.e. "every hour").
25+
*/
2326
public readonly string|int $frequency,
27+
28+
/**
29+
* A string representing the start time of the periodic task (i.e. "08:00:00").
30+
*/
2431
public readonly ?string $from = null,
32+
33+
/**
34+
* A string representing the end time of the periodic task (i.e. "20:00:00").
35+
*/
2536
public readonly ?string $until = null,
37+
38+
/**
39+
* The cron jitter, in seconds. For example, if set to 60, the cron
40+
* will randomly wait for a number of seconds between 0 and 60 before
41+
* executing. This allows to avoid load spikes that can happen when many tasks
42+
* run at the same time.
43+
*/
2644
public readonly ?int $jitter = null,
45+
46+
/**
47+
* The arguments to pass to the cron task.
48+
*
49+
* @var array<array-key, mixed>|string|null
50+
*/
2751
public readonly array|string|null $arguments = null,
52+
53+
/**
54+
* The name of the schedule responsible for triggering the task.
55+
*/
2856
public readonly string $schedule = 'default',
57+
58+
/**
59+
* The method to run as the task when the attribute target is a class.
60+
*/
2961
public readonly ?string $method = null,
62+
63+
/**
64+
* One or many transports through which the message scheduling
65+
* the task will go.
66+
*
67+
* @var string[]|string|null
68+
*/
3069
public readonly array|string|null $transports = null,
3170
) {
3271
}

‎src/Symfony/Component/Scheduler/Attribute/AsSchedule.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Attribute/AsSchedule.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
class AsSchedule
2121
{
2222
public function __construct(
23+
/**
24+
* The name of the schedule that will be used when creating tasks.
25+
*/
2326
public string $name = 'default',
2427
) {
2528
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.