File tree Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 14
14
/**
15
15
* @author Ben Roberts <ben@headsnet.com>
16
16
*/
17
- class FlashMessageMappingException extends LogicException
17
+ class FlashMessageImportanceMapperException extends LogicException
18
18
{
19
19
public function __construct (string $ importance , string $ mappingClass )
20
20
{
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Notifier \FlashMessage ;
13
13
14
- use Symfony \Component \Notifier \Exception \FlashMessageMappingException ;
14
+ use Symfony \Component \Notifier \Exception \FlashMessageImportanceMapperException ;
15
15
16
16
/**
17
17
* @author Ben Roberts <ben@headsnet.com>
@@ -21,7 +21,7 @@ abstract class AbstractFlashMessageImportanceMapper
21
21
public function flashMessageTypeFromImportance (string $ importance ): string
22
22
{
23
23
if (!\array_key_exists ($ importance , static ::IMPORTANCE_MAP )) {
24
- throw new FlashMessageMappingException ($ importance , static ::class);
24
+ throw new FlashMessageImportanceMapperException ($ importance , static ::class);
25
25
}
26
26
27
27
return static ::IMPORTANCE_MAP [$ importance ];
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Notifier \FlashMessage ;
13
13
14
- use Symfony \Component \Notifier \Exception \FlashMessageMappingException ;
14
+ use Symfony \Component \Notifier \Exception \FlashMessageImportanceMapperException ;
15
15
16
16
/**
17
17
* @author Ben Roberts <ben@headsnet.com>
18
18
*/
19
19
interface FlashMessageImportanceMapperInterface
20
20
{
21
21
/**
22
- * @throws FlashMessageMappingException
22
+ * @throws FlashMessageImportanceMapperException
23
23
*/
24
24
public function flashMessageTypeFromImportance (string $ importance ): string ;
25
25
}
Original file line number Diff line number Diff line change 17
17
use Symfony \Component \HttpFoundation \Session \Flash \FlashBag ;
18
18
use Symfony \Component \HttpFoundation \Session \Session ;
19
19
use Symfony \Component \Notifier \Channel \BrowserChannel ;
20
- use Symfony \Component \Notifier \Exception \FlashMessageMappingException ;
20
+ use Symfony \Component \Notifier \Exception \FlashMessageImportanceMapperException ;
21
21
use Symfony \Component \Notifier \FlashMessage \BootstrapFlashMessageImportanceMapper ;
22
22
use Symfony \Component \Notifier \FlashMessage \DefaultFlashMessageImportanceMapper ;
23
23
use Symfony \Component \Notifier \FlashMessage \FlashMessageImportanceMapperInterface ;
@@ -58,7 +58,7 @@ public function testUnknownImportanceMappingIsReported()
58
58
$ notification ->importance ('unknown-importance-string ' );
59
59
$ recipient = new Recipient ('hello@example.com ' );
60
60
61
- $ this ->expectException (FlashMessageMappingException ::class);
61
+ $ this ->expectException (FlashMessageImportanceMapperException ::class);
62
62
63
63
$ browserChannel ->notify ($ notification , $ recipient );
64
64
}
Original file line number Diff line number Diff line change 22
22
"require-dev" : {
23
23
"symfony/event-dispatcher-contracts" : " ^2|^3" ,
24
24
"symfony/http-client-contracts" : " ^2|^3" ,
25
+ "symfony/http-foundation" : " ^5.4|^6.0" ,
25
26
"symfony/messenger" : " ^5.4|^6.0"
26
27
},
27
28
"conflict" : {
You can’t perform that action at this time.
0 commit comments