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 cf2372a

Browse filesBrowse files
[FrameworkBundle][RemoteEvent][Routing][Scheduler] Add PHPDoc to attributes properties
1 parent 4932cbe commit cf2372a
Copy full SHA for cf2372a

File tree

6 files changed

+50
-3
lines changed
Filter options

6 files changed

+50
-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 Defines a priority that allows the routing condition service to override a service with the same alias
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
@@ -17,6 +17,9 @@
1717
#[\Attribute(\Attribute::TARGET_CLASS)]
1818
class AsRemoteEventConsumer
1919
{
20+
/**
21+
* @param string $name The name of the remote event consumer, used to identify it when defining remote events
22+
*/
2023
public function __construct(
2124
public string $name,
2225
) {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Attribute/Route.php
+15-3Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,21 @@ class Route
2626
private array $schemes;
2727

2828
/**
29-
* @param array<string|\Stringable> $requirements
30-
* @param string[]|string $methods
31-
* @param string[]|string $schemes
29+
* @param string|array<string,string>|null $path The route path (i.e. "/user/login")
30+
* @param string|null $name The route name (i.e. "app_user_login")
31+
* @param array<string|\Stringable> $requirements Requirements for the route attributes, @see https://symfony.com/doc/current/routing.html#parameters-validation
32+
* @param array<string, mixed> $options Options for the route (i.e. ['prefix' => '/api'])
33+
* @param array<string, mixed> $defaults Default values for the route attributes and query parameters
34+
* @param string|null $host The host for which this route should be active (i.e. "localhost")
35+
* @param string|string[] $methods The list of HTTP methods allowed by this route
36+
* @param string|string[] $schemes The list of schemes allowed by this route (i.e. "https")
37+
* @param string|null $condition An expression that must evaluate to true for the route to be matched, @see https://symfony.com/doc/current/routing.html#matching-expressions
38+
* @param int|null $priority The priority of the route if multiple ones are defined for the same path
39+
* @param string|null $locale The locale accepted by the route
40+
* @param string|null $format The format returned by the route (i.e. "json", "xml")
41+
* @param bool|null $utf8 Whether the route accepts UTF-8 in its parameters
42+
* @param bool|null $stateless Whether the route is defined as stateless or stateful, @see https://symfony.com/doc/current/routing.html#stateless-routes
43+
* @param string|null $env The env in which the route is defined (i.e. "dev", "test", "prod")
3244
*/
3345
public function __construct(
3446
string|array $path = null,

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Attribute/AsCronTask.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@
1919
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
2020
class AsCronTask
2121
{
22+
/**
23+
* @param string $expression The cron expression to define the task schedule (i.e. "5 * * * *")
24+
* @param string|null $timezone The timezone used with the cron expression
25+
* @param int|null $jitter The cron jitter, in seconds; for example, if set to 60, the cron
26+
* will randomly wait for a number of seconds between 0 and 60 before
27+
* executing which allows to avoid load spikes that can happen when many tasks
28+
* run at the same time
29+
* @param array<array-key, mixed>|string|null $arguments The arguments to pass to the cron task
30+
* @param string $schedule The name of the schedule responsible for triggering the task
31+
* @param string|null $method The method to run as the task when the attribute target is a class
32+
* @param string[]|string|null $transports One or many transports through which the message scheduling the task will go
33+
*/
2234
public function __construct(
2335
public readonly string $expression,
2436
public readonly ?string $timezone = null,

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Scheduler/Attribute/AsPeriodicTask.php
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
2020
class AsPeriodicTask
2121
{
22+
/**
23+
* @param string|int $frequency A string or an integer representing the frequency of the task (i.e. "every hour")
24+
* @param string|null $from A string representing the start time of the periodic task (i.e. "08:00:00")
25+
* @param string|null $until A string representing the end time of the periodic task (i.e. "20:00:00")
26+
* @param int|null $jitter The cron jitter, in seconds; for example, if set to 60, the cron
27+
* will randomly wait for a number of seconds between 0 and 60 before
28+
* executing which allows to avoid load spikes that can happen when many tasks
29+
* run at the same time
30+
* @param array<array-key, mixed>|string|null $arguments The arguments to pass to the cron task
31+
* @param string $schedule The name of the schedule responsible for triggering the task
32+
* @param string|null $method The method to run as the task when the attribute target is a class
33+
* @param string[]|string|null $transports One or many transports through which the message scheduling the task will go
34+
*/
2235
public function __construct(
2336
public readonly string|int $frequency,
2437
public readonly ?string $from = null,

‎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
@@ -19,6 +19,9 @@
1919
#[\Attribute(\Attribute::TARGET_CLASS)]
2020
class AsSchedule
2121
{
22+
/**
23+
* @param string $name The name of the schedule that will be used when creating tasks
24+
*/
2225
public function __construct(
2326
public string $name = 'default',
2427
) {

0 commit comments

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