-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
[Maintenance] Add an exception for unavailable storages #862
Conversation
ef693ee
to
fcc6f73
Compare
@@ -13,7 +13,9 @@ | |||
|
|||
namespace Sylius\Bundle\ResourceBundle\Storage; | |||
|
|||
use Sylius\Component\Resource\Exception\StorageUnavailableException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there is ongoing initiative to move namespaces in 1.11, new exception should go directly into target namespace.
use Sylius\Component\Resource\Exception\StorageUnavailableException; | |
use Sylius\Resource\Exception\StorageUnavailableException; |
@@ -14,7 +14,9 @@ | |||
namespace spec\Sylius\Bundle\ResourceBundle\Storage; | |||
|
|||
use PhpSpec\ObjectBehavior; | |||
use Sylius\Component\Resource\Exception\StorageUnavailableException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Sylius\Component\Resource\Exception\StorageUnavailableException; | |
use Sylius\Resource\Exception\StorageUnavailableException; |
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\Component\Resource\Exception; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If for some reason legacy exception needs to be created, then it should become class alias, otherwise please move it to src/Component/src/Exception/StorageUnavailableException
|
||
namespace Sylius\Component\Resource\Exception; | ||
|
||
class StorageUnavailableException extends \RuntimeException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -13,24 +13,39 @@ | |||
|
|||
namespace Sylius\Resource\Storage; | |||
|
|||
use Sylius\Component\Resource\Exception\StorageUnavailableException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Sylius\Component\Resource\Exception\StorageUnavailableException; | |
use Sylius\Resource\Exception\StorageUnavailableException; |
fcc6f73
to
f7bf035
Compare
Thank you, @NoResponseMate! |
There's a bunch of issues open Sylius regarding cli/stateless actions resulting in fatals since session is not available when resolving something within a context.
Would be nice to have a unified way of knowing whether the storage medium can be accessed at all.