Skip to content

Navigation Menu

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 64e7b07

Browse filesBrowse files
[FrameworkBundle][RemoteEvent][Routing][Scheduler] Add PHPDoc to attributes properties
1 parent f3a09b9 commit 64e7b07
Copy full SHA for 64e7b07

File tree

6 files changed

+121
-3
lines changed
Filter options

6 files changed

+121
-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/Annotation/Route.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Annotation/Route.php
+45-3Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,67 @@ 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|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
51+
* attributes (@see https://symfony.com/doc/current/routing.html#parameters-validation).
52+
*
53+
* @var array<string|\Stringable>
54+
*/
4055
private array $requirements = [],
56+
57+
/**
58+
* Other route configuration like its prefix (i.e. ['prefix' => '/api']).
59+
*/
4160
private array $options = [],
61+
62+
/**
63+
* The default values for the route attributes and
64+
* query parameters.
65+
*/
4266
private array $defaults = [],
67+
68+
/**
69+
* A host for which the route will be matched.
70+
*/
4371
private ?string $host = null,
4472
array|string $methods = [],
4573
array|string $schemes = [],
74+
75+
/**
76+
* An expression that must evaluate to true for the route
77+
* to be matched (@see https://symfony.com/doc/current/routing.html#matching-expressions).
78+
*/
4679
private ?string $condition = null,
80+
81+
/**
82+
* The evaluation priority of the route if multiple are
83+
* defined with the same path.
84+
*/
4785
private ?int $priority = null,
4886
string $locale = null,
4987
string $format = null,
5088
bool $utf8 = null,
5189
bool $stateless = null,
90+
91+
/**
92+
* The env in which the route is defined (i.e. "dev", "test", "prod").
93+
*/
5294
private ?string $env = null
5395
) {
5496
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
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,43 @@
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+
*/
2644
public readonly array|string|null $arguments = null,
45+
46+
/**
47+
* The name of the schedule responsible for triggering the task.
48+
*/
2749
public readonly string $schedule = 'default',
50+
51+
/**
52+
* The method to run as the task when the attribute target is a class.
53+
*/
2854
public readonly ?string $method = null,
55+
56+
/**
57+
* One or many transports through which the message scheduling
58+
* the task will go.
59+
*/
2960
public readonly array|string|null $transports = null,
3061
) {
3162
}

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Attribute/AsPeriodicTask.php
+35Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,48 @@
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+
*/
2749
public readonly array|string|null $arguments = null,
50+
51+
/**
52+
* The name of the schedule responsible for triggering the task.
53+
*/
2854
public readonly string $schedule = 'default',
55+
56+
/**
57+
* The method to run as the task when the attribute target is a class.
58+
*/
2959
public readonly ?string $method = null,
60+
61+
/**
62+
* One or many transports through which the message scheduling
63+
* the task will go.
64+
*/
3065
public readonly array|string|null $transports = null,
3166
) {
3267
}

‎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.