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 1414/**
1515 * @author Ben Roberts <ben@headsnet.com>
1616 */
17- class FlashMessageMappingException extends LogicException
17+ class FlashMessageImportanceMapperException extends LogicException
1818{
1919 public function __construct (string $ importance , string $ mappingClass )
2020 {
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Notifier \FlashMessage ;
1313
14- use Symfony \Component \Notifier \Exception \FlashMessageMappingException ;
14+ use Symfony \Component \Notifier \Exception \FlashMessageImportanceMapperException ;
1515
1616/**
1717 * @author Ben Roberts <ben@headsnet.com>
@@ -21,7 +21,7 @@ abstract class AbstractFlashMessageImportanceMapper
2121 public function flashMessageTypeFromImportance (string $ importance ): string
2222 {
2323 if (!\array_key_exists ($ importance , static ::IMPORTANCE_MAP )) {
24- throw new FlashMessageMappingException ($ importance , static ::class);
24+ throw new FlashMessageImportanceMapperException ($ importance , static ::class);
2525 }
2626
2727 return static ::IMPORTANCE_MAP [$ importance ];
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Notifier \FlashMessage ;
1313
14- use Symfony \Component \Notifier \Exception \FlashMessageMappingException ;
14+ use Symfony \Component \Notifier \Exception \FlashMessageImportanceMapperException ;
1515
1616/**
1717 * @author Ben Roberts <ben@headsnet.com>
1818 */
1919interface FlashMessageImportanceMapperInterface
2020{
2121 /**
22- * @throws FlashMessageMappingException
22+ * @throws FlashMessageImportanceMapperException
2323 */
2424 public function flashMessageTypeFromImportance (string $ importance ): string ;
2525}
Original file line number Diff line number Diff line change 1717use Symfony \Component \HttpFoundation \Session \Flash \FlashBag ;
1818use Symfony \Component \HttpFoundation \Session \Session ;
1919use Symfony \Component \Notifier \Channel \BrowserChannel ;
20- use Symfony \Component \Notifier \Exception \FlashMessageMappingException ;
20+ use Symfony \Component \Notifier \Exception \FlashMessageImportanceMapperException ;
2121use Symfony \Component \Notifier \FlashMessage \BootstrapFlashMessageImportanceMapper ;
2222use Symfony \Component \Notifier \FlashMessage \DefaultFlashMessageImportanceMapper ;
2323use Symfony \Component \Notifier \FlashMessage \FlashMessageImportanceMapperInterface ;
@@ -58,7 +58,7 @@ public function testUnknownImportanceMappingIsReported()
5858 $ notification ->importance ('unknown-importance-string ' );
5959 $ recipient = new Recipient ('hello@example.com ' );
6060
61- $ this ->expectException (FlashMessageMappingException ::class);
61+ $ this ->expectException (FlashMessageImportanceMapperException ::class);
6262
6363 $ browserChannel ->notify ($ notification , $ recipient );
6464 }
Original file line number Diff line number Diff line change 2222 "require-dev" : {
2323 "symfony/event-dispatcher-contracts" : " ^2|^3" ,
2424 "symfony/http-client-contracts" : " ^2|^3" ,
25+ "symfony/http-foundation" : " ^5.4|^6.0" ,
2526 "symfony/messenger" : " ^5.4|^6.0"
2627 },
2728 "conflict" : {
You can’t perform that action at this time.
0 commit comments