Skip to content

Mark ExceptionInterfaces throwable #26702

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
Apr 3, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Jérôme Tamarelle <jerome@tamarelle.net>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
*
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Romain Neutron <imprec@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Charles Sarrazin <charles@sarraz.in>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Jérémy Derussé <jeremy@derusse.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Samuel Roze <samuel.roze@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This interface, like the equivalent ones throughout the other components (about 20 of them), is meant to be a marker, nothing more.

So, I would not extend \Throwable here. But if we decide to do so, would it make sense to do it on all our markers?

Copy link
Contributor Author

@ostrolucky ostrolucky Mar 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This marker is for exceptions though, shouldn't it guarantee it's used on exception classes only?

How about deprecating this interface and replacing it another interface, extending Throwable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecating implies to find a name for the replacement in addition to bother our users, I don't think it's worth the hassle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding name, it could be {Component}ExceptionInterface. E.g. ConsoleExceptionInterface.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to extend Throwable everywhere to semantically indicate that it is for exceptions. No need for deprecations as this should not break anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok at least somebody is with me, so I've applied this change in rest of the components as well.

{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Alexandre Salomé <alexandre.salome@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
* @author Fabien Potencier <fabien@symfony.com>
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}