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

[FrameworkBundle][RemoteEvent][Routing][Scheduler] Add PHPDoc to attributes properties #51996

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

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FrameworkBundle][RemoteEvent][Routing][Scheduler] Add PHPDoc to attr…
…ibutes properties
  • Loading branch information
alexandre-daubois committed Jan 8, 2024
commit a1f43a94b7cddedb20b18bf02bdedc9ab67209ca
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsRoutingConditionService extends AutoconfigureTag
{
/**
* @param string|null $alias The alias of the service to use it in routing condition expressions
* @param int $priority Defines a priority that allows the routing condition service to override a service with the same alias
*/
public function __construct(
string $alias = null,
int $priority = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsRemoteEventConsumer
{
/**
* @param string $name The name of the remote event consumer, used to identify it when defining remote events
*/
public function __construct(
public string $name,
) {
Expand Down
18 changes: 15 additions & 3 deletions 18 src/Symfony/Component/Routing/Attribute/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,21 @@ class Route
private array $schemes;

/**
* @param array<string|\Stringable> $requirements
* @param string[]|string $methods
* @param string[]|string $schemes
* @param string|array<string,string>|null $path The route path (i.e. "/user/login")
* @param string|null $name The route name (i.e. "app_user_login")
* @param array<string|\Stringable> $requirements Requirements for the route attributes, @see https://symfony.com/doc/current/routing.html#parameters-validation
* @param array<string, mixed> $options Options for the route (i.e. ['prefix' => '/api'])
* @param array<string, mixed> $defaults Default values for the route attributes and query parameters
* @param string|null $host The host for which this route should be active (i.e. "localhost")
* @param string|string[] $methods The list of HTTP methods allowed by this route
* @param string|string[] $schemes The list of schemes allowed by this route (i.e. "https")
* @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
* @param int|null $priority The priority of the route if multiple ones are defined for the same path
* @param string|null $locale The locale accepted by the route
* @param string|null $format The format returned by the route (i.e. "json", "xml")
* @param bool|null $utf8 Whether the route accepts UTF-8 in its parameters
* @param bool|null $stateless Whether the route is defined as stateless or stateful, @see https://symfony.com/doc/current/routing.html#stateless-routes
* @param string|null $env The env in which the route is defined (i.e. "dev", "test", "prod")
*/
public function __construct(
string|array $path = null,
Expand Down
12 changes: 12 additions & 0 deletions 12 src/Symfony/Component/Scheduler/Attribute/AsCronTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class AsCronTask
{
/**
* @param string $expression The cron expression to define the task schedule (i.e. "5 * * * *")
* @param string|null $timezone The timezone used with the cron expression
* @param int|null $jitter The cron jitter, in seconds; for example, if set to 60, the cron
* will randomly wait for a number of seconds between 0 and 60 before
* executing which allows to avoid load spikes that can happen when many tasks
* run at the same time
* @param array<array-key, mixed>|string|null $arguments The arguments to pass to the cron task
* @param string $schedule The name of the schedule responsible for triggering the task
* @param string|null $method The method to run as the task when the attribute target is a class
* @param string[]|string|null $transports One or many transports through which the message scheduling the task will go
*/
public function __construct(
public readonly string $expression,
public readonly ?string $timezone = null,
Expand Down
13 changes: 13 additions & 0 deletions 13 src/Symfony/Component/Scheduler/Attribute/AsPeriodicTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class AsPeriodicTask
{
/**
* @param string|int $frequency A string (i.e. "every hour") or an integer (the number of seconds) representing the frequency of the task
* @param string|null $from A string representing the start time of the periodic task (i.e. "08:00:00")
* @param string|null $until A string representing the end time of the periodic task (i.e. "20:00:00")
* @param int|null $jitter The cron jitter, in seconds; for example, if set to 60, the cron
* will randomly wait for a number of seconds between 0 and 60 before
* executing which allows to avoid load spikes that can happen when many tasks
* run at the same time
* @param array<array-key, mixed>|string|null $arguments The arguments to pass to the cron task
* @param string $schedule The name of the schedule responsible for triggering the task
* @param string|null $method The method to run as the task when the attribute target is a class
* @param string[]|string|null $transports One or many transports through which the message scheduling the task will go
*/
public function __construct(
public readonly string|int $frequency,
public readonly ?string $from = null,
Expand Down
3 changes: 3 additions & 0 deletions 3 src/Symfony/Component/Scheduler/Attribute/AsSchedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsSchedule
{
/**
* @param string $name The name of the schedule that will be used when creating tasks
*/
public function __construct(
public string $name = 'default',
) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.