Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4bb38ee

Browse files
committed
Mark all dispatched event classes as final
1 parent 8d8d3d4 commit 4bb38ee

40 files changed

+77
-7
lines changed

src/Symfony/Component/Console/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CHANGELOG
77
* added `Question::setTrimmable` default to true to allow the answer to be trimmed
88
* added method `preventRedrawFasterThan()` and `forceRedrawSlowerThan()` on `ProgressBar`
99
* `Application` implements `ResetInterface`
10+
* marked all dispatched event classes as `@final`
1011

1112
4.3.0
1213
-----

src/Symfony/Component/Console/Event/ConsoleCommandEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Allows to do things before the command is executed, like skipping the command or changing the input.
1616
*
1717
* @author Fabien Potencier <[email protected]>
18+
*
19+
* @final since Symfony 4.4
1820
*/
1921
class ConsoleCommandEvent extends ConsoleEvent
2022
{

src/Symfony/Component/Console/Event/ConsoleTerminateEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* Allows to manipulate the exit code of a command after its execution.
2020
*
2121
* @author Francesco Levorato <[email protected]>
22+
*
23+
* @final since Symfony 4.4
2224
*/
2325
class ConsoleTerminateEvent extends ConsoleEvent
2426
{

src/Symfony/Component/Form/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CHANGELOG
1010
* deprecated using `int` or `float` as data for the `NumberType` when the `input` option is set to `string`
1111
* The type guesser guesses the HTML accept attribute when a mime type is configured in the File or Image constraint.
1212
* Overriding the methods `FormIntegrationTestCase::setUp()`, `TypeTestCase::setUp()` and `TypeTestCase::tearDown()` without the `void` return-type is deprecated.
13+
* marked all dispatched event classes as `@final`
1314

1415
4.3.0
1516
-----

src/Symfony/Component/Form/Event/PostSetDataEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* This event is dispatched at the end of the Form::setData() method.
1818
*
1919
* This event is mostly here for reading data after having pre-populated the form.
20+
*
21+
* @final since Symfony 4.4
2022
*/
2123
class PostSetDataEvent extends FormEvent
2224
{

src/Symfony/Component/Form/Event/PostSubmitEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* once the model and view data have been denormalized.
1919
*
2020
* It can be used to fetch data after denormalization.
21+
*
22+
* @final since Symfony 4.4
2123
*/
2224
class PostSubmitEvent extends FormEvent
2325
{

src/Symfony/Component/Form/Event/PreSetDataEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* It can be used to:
2020
* - Modify the data given during pre-population;
2121
* - Modify a form depending on the pre-populated data (adding or removing fields dynamically).
22+
*
23+
* @final since Symfony 4.4
2224
*/
2325
class PreSetDataEvent extends FormEvent
2426
{

src/Symfony/Component/Form/Event/PreSubmitEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* It can be used to:
2020
* - Change data from the request, before submitting the data to the form.
2121
* - Add or remove form fields, before submitting the data to the form.
22+
*
23+
* @final since Symfony 4.4
2224
*/
2325
class PreSubmitEvent extends FormEvent
2426
{

src/Symfony/Component/Form/Event/SubmitEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* transforms back the normalized data to the model and view data.
1919
*
2020
* It can be used to change data from the normalized representation of the data.
21+
*
22+
* @final since Symfony 4.4
2123
*/
2224
class SubmitEvent extends FormEvent
2325
{

src/Symfony/Component/HttpKernel/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CHANGELOG
1212
fallback directories. Resources like service definitions are usually loaded relative to the
1313
current directory or with a glob pattern. The fallback directories have never been advocated
1414
so you likely do not use those in any app based on the SF Standard or Flex edition.
15+
* Marked all dispatched event classes as `@final`
1516

1617
4.3.0
1718
-----

src/Symfony/Component/HttpKernel/Event/ControllerArgumentsEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* controller.
2323
*
2424
* @author Christophe Coevoet <[email protected]>
25+
*
26+
* @final since Symfony 4.4
2527
*/
2628
class ControllerArgumentsEvent extends FilterControllerArgumentsEvent
2729
{

src/Symfony/Component/HttpKernel/Event/ControllerEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* Controllers should be callables.
2222
*
2323
* @author Bernhard Schussek <[email protected]>
24+
*
25+
* @final since Symfony 4.4
2426
*/
2527
class ControllerEvent extends FilterControllerEvent
2628
{

src/Symfony/Component/HttpKernel/Event/ExceptionEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
* event.
2424
*
2525
* @author Bernhard Schussek <[email protected]>
26+
*
27+
* @final since Symfony 4.4
2628
*/
2729
class ExceptionEvent extends GetResponseForExceptionEvent
2830
{

src/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Triggered whenever a request is fully processed.
1616
*
1717
* @author Benjamin Eberlei <[email protected]>
18+
*
19+
* @final since Symfony 4.4
1820
*/
1921
class FinishRequestEvent extends KernelEvent
2022
{

src/Symfony/Component/HttpKernel/Event/ResponseEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* browser.
2020
*
2121
* @author Bernhard Schussek <[email protected]>
22+
*
23+
* @final since Symfony 4.4
2224
*/
2325
class ResponseEvent extends FilterResponseEvent
2426
{

src/Symfony/Component/HttpKernel/Event/TerminateEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* will always return the value of `HttpKernelInterface::MASTER_REQUEST`.
1919
*
2020
* @author Jordi Boggiano <[email protected]>
21+
*
22+
* @final since Symfony 4.4
2123
*/
2224
class TerminateEvent extends PostResponseEvent
2325
{

src/Symfony/Component/HttpKernel/Event/ViewEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* response is set.
2020
*
2121
* @author Bernhard Schussek <[email protected]>
22+
*
23+
* @final since Symfony 4.4
2224
*/
2325
class ViewEvent extends GetResponseForControllerResultEvent
2426
{

src/Symfony/Component/Mailer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CHANGELOG
1919
`Symfony\Component\Mailer\Transport\TransportFactoryInterface` and tagging with `mailer.transport_factory` tag in DI.
2020
* Added `Symfony\Component\Mailer\Test\TransportFactoryTestCase` to ease testing custom transport factories.
2121
* Added `SentMessage::getDebug()` and `TransportExceptionInterface::getDebug` to help debugging
22+
* Made `MessageEvent` final
2223

2324
4.3.0
2425
-----

src/Symfony/Component/Mailer/Event/MessageEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Fabien Potencier <[email protected]>
2222
*/
23-
class MessageEvent extends Event
23+
final class MessageEvent extends Event
2424
{
2525
private $message;
2626
private $envelope;

src/Symfony/Component/Messenger/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
pass a `RoutableMessageBus` instance instead.
99
* Added support for auto trimming of Redis streams.
1010
* `InMemoryTransport` handle acknowledged and rejected messages.
11+
* Made all dispatched worker event classes final.
1112

1213
4.3.0
1314
-----

src/Symfony/Component/Messenger/Event/SendMessageToTransportsEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @author Ryan Weaver <[email protected]>
2626
*/
27-
class SendMessageToTransportsEvent
27+
final class SendMessageToTransportsEvent
2828
{
2929
private $envelope;
3030

src/Symfony/Component/Messenger/Event/WorkerMessageFailedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* The event name is the class name.
2020
*/
21-
class WorkerMessageFailedEvent extends AbstractWorkerMessageEvent
21+
final class WorkerMessageFailedEvent extends AbstractWorkerMessageEvent
2222
{
2323
private $throwable;
2424
private $willRetry;

src/Symfony/Component/Messenger/Event/WorkerMessageHandledEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
*
1717
* The event name is the class name.
1818
*/
19-
class WorkerMessageHandledEvent extends AbstractWorkerMessageEvent
19+
final class WorkerMessageHandledEvent extends AbstractWorkerMessageEvent
2020
{
2121
}

src/Symfony/Component/Messenger/Event/WorkerMessageReceivedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The event name is the class name.
1818
*/
19-
class WorkerMessageReceivedEvent extends AbstractWorkerMessageEvent
19+
final class WorkerMessageReceivedEvent extends AbstractWorkerMessageEvent
2020
{
2121
private $shouldHandle = true;
2222

src/Symfony/Component/Messenger/Event/WorkerStoppedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
*
1717
* @author Robin Chalas <[email protected]>
1818
*/
19-
class WorkerStoppedEvent
19+
final class WorkerStoppedEvent
2020
{
2121
}

src/Symfony/Component/Security/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CHANGELOG
1010
* Added and implemented `PasswordUpgraderInterface`, for opportunistic password migrations
1111
* Added `Guard\PasswordAuthenticatedInterface`, an optional interface
1212
for "guard" authenticators that deal with user passwords
13+
* Marked all dispatched event classes as `@final`
1314

1415
4.3.0
1516
-----

src/Symfony/Component/Security/Core/Event/AuthenticationFailureEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* This event is dispatched on authentication failure.
1919
*
2020
* @author Johannes M. Schmitt <[email protected]>
21+
*
22+
* @final since Symfony 4.4
2123
*/
2224
class AuthenticationFailureEvent extends AuthenticationEvent
2325
{

src/Symfony/Component/Security/Core/Event/AuthenticationSuccessEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\Security\Core\Event;
1313

14+
/**
15+
* @final since Symfony 4.4
16+
*/
1417
class AuthenticationSuccessEvent extends AuthenticationEvent
1518
{
1619
}

src/Symfony/Component/Security/Core/Event/VoteEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @internal
2323
*/
24-
class VoteEvent extends Event
24+
final class VoteEvent extends Event
2525
{
2626
private $voter;
2727
private $subject;

src/Symfony/Component/Security/Http/Event/DeauthenticatedEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* Deauthentication happens in case the user has changed when trying to refresh the token.
1919
*
2020
* @author Hamza Amrouche <[email protected]>
21+
*
22+
* @final since Symfony 4.4
2123
*/
2224
class DeauthenticatedEvent extends Event
2325
{

src/Symfony/Component/Security/Http/Event/InteractiveLoginEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
/**
1919
* @author Fabien Potencier <[email protected]>
20+
*
21+
* @final since Symfony 4.4
2022
*/
2123
class InteractiveLoginEvent extends Event
2224
{

src/Symfony/Component/Security/Http/Event/SwitchUserEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* SwitchUserEvent.
2121
*
2222
* @author Fabien Potencier <[email protected]>
23+
*
24+
* @final since Symfony 4.4
2325
*/
2426
class SwitchUserEvent extends Event
2527
{

src/Symfony/Component/Workflow/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.4.0
5+
-----
6+
7+
* Marked all dispatched event classes as `@final`
8+
49
4.3.0
510
-----
611

src/Symfony/Component/Workflow/Event/AnnounceEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\Workflow\Event;
1313

14+
/**
15+
* @final since Symfony 4.4
16+
*/
1417
class AnnounceEvent extends Event
1518
{
1619
}

src/Symfony/Component/Workflow/Event/CompletedEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\Workflow\Event;
1313

14+
/**
15+
* @final since Symfony 4.4
16+
*/
1417
class CompletedEvent extends Event
1518
{
1619
}

src/Symfony/Component/Workflow/Event/EnterEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\Workflow\Event;
1313

14+
/**
15+
* @final since Symfony 4.4
16+
*/
1417
class EnterEvent extends Event
1518
{
1619
}

src/Symfony/Component/Workflow/Event/EnteredEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\Workflow\Event;
1313

14+
/**
15+
* @final since Symfony 4.4
16+
*/
1417
class EnteredEvent extends Event
1518
{
1619
}

src/Symfony/Component/Workflow/Event/GuardEvent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
/**
2020
* @author Fabien Potencier <[email protected]>
2121
* @author Grégoire Pineau <[email protected]>
22+
*
23+
* @final since Symfony 4.4
2224
*/
2325
class GuardEvent extends Event
2426
{

src/Symfony/Component/Workflow/Event/LeaveEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\Workflow\Event;
1313

14+
/**
15+
* @final since Symfony 4.4
16+
*/
1417
class LeaveEvent extends Event
1518
{
1619
}

src/Symfony/Component/Workflow/Event/TransitionEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace Symfony\Component\Workflow\Event;
1313

14+
/**
15+
* @final since Symfony 4.4
16+
*/
1417
class TransitionEvent extends Event
1518
{
1619
private $context;

0 commit comments

Comments
 (0)