Skip to content

Commit 978fc1a

Browse files
committed
Throwable check
1 parent f7a2522 commit 978fc1a

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

phpstan-baseline.neon

-15
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ parameters:
2525
count: 1
2626
path: src/InitializerInterface.php
2727

28-
-
29-
message: "#^PHPDoc tag @throws with type Laminas\\\\ServiceManager\\\\ContainerException\\|Laminas\\\\ServiceManager\\\\Exception\\\\InvalidServiceException is not subtype of Throwable$#"
30-
count: 1
31-
path: src/PluginManagerInterface.php
32-
33-
-
34-
message: "#^PHPDoc tag @throws with type Psr\\\\Container\\\\ContainerExceptionInterface is not subtype of Throwable$#"
35-
count: 1
36-
path: src/ServiceLocatorInterface.php
37-
3828
-
3929
message: "#^PHPDoc tag @param has invalid value \\(bool\\)\\: Unexpected token \"\\\\n \", expected variable at offset 89$#"
4030
count: 1
@@ -45,11 +35,6 @@ parameters:
4535
count: 1
4636
path: src/ServiceManager.php
4737

48-
-
49-
message: "#^PHPDoc tag @throws with type Laminas\\\\ServiceManager\\\\Exception\\\\ExceptionInterface is not subtype of Throwable$#"
50-
count: 1
51-
path: src/ServiceManager.php
52-
5338
-
5439
message: "#^PHPDoc tag @param references unknown parameter\\: \\$abstractFactories$#"
5540
count: 1

src/Exception/ExceptionInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
/**
1414
* Base exception for all Laminas\ServiceManager exceptions.
1515
*/
16-
interface ExceptionInterface extends ContainerExceptionInterface
16+
interface ExceptionInterface extends ContainerExceptionInterface, \Throwable
1717
{
1818
}

src/PluginManagerInterface.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace Laminas\ServiceManager;
1010

1111
use Laminas\ServiceManager\Exception\InvalidServiceException;
12+
use Psr\Container\ContainerExceptionInterface;
1213

1314
/**
1415
* Interface for a plugin manager
@@ -24,7 +25,7 @@ interface PluginManagerInterface extends ServiceLocatorInterface
2425
* @return void
2526
* @throws InvalidServiceException If created instance does not respect the
2627
* constraint on type imposed by the plugin manager
27-
* @throws ContainerException if any other error occurs
28+
* @throws ContainerExceptionInterface&\Throwable if any other error occurs
2829
*/
2930
public function validate($instance);
3031
}

src/ServiceLocatorInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface ServiceLocatorInterface extends ContainerInterface
2626
* factory could be found to create the instance.
2727
* @throws Exception\ServiceNotCreatedException If factory/delegator fails
2828
* to create the instance.
29-
* @throws ContainerExceptionInterface if any other error occurs
29+
* @throws ContainerExceptionInterface&\Throwable if any other error occurs
3030
*/
3131
public function build($name, array $options = null);
3232
}

0 commit comments

Comments
 (0)