File tree Expand file tree Collapse file tree 8 files changed +19
-18
lines changed
Expand file tree Collapse file tree 8 files changed +19
-18
lines changed Original file line number Diff line number Diff line change 6565 'constant_case ' => [
6666 'case ' => 'lower ' ,
6767 ],
68+ 'global_namespace_import ' => [
69+ 'import_classes ' => true ,
70+ 'import_constants ' => true ,
71+ 'import_functions ' => true ,
72+ ],
6873 'class_attributes_separation ' => true ,
6974 'combine_consecutive_unsets ' => true ,
7075 'declare_strict_types ' => true ,
Original file line number Diff line number Diff line change 2020 }
2121 },
2222 "require" : {
23- "php" : " >=7.4 " ,
23+ "php" : " >=8.0 " ,
2424 "doctrine/instantiator" : " ^1.0" ,
25- "hyperf/utils" : " ^2.2|^3.0" ,
25+ "hyperf/context" : " ^3.0" ,
26+ "hyperf/contract" : " ^3.0" ,
2627 "pimple/pimple" : " ^3.3"
2728 },
2829 "require-dev" : {
Original file line number Diff line number Diff line change 2424
2525class Container implements ContainerInterface
2626{
27- /**
28- * @var Pimple\Container
29- */
30- protected $ pimple ;
31-
3227 /**
3328 * @var ReflectionClass[]
3429 */
3530 protected $ reflection = [];
3631
37- public function __construct (Pimple \Container $ pimple )
32+ public function __construct (protected Pimple \Container $ pimple )
3833 {
39- $ this ->pimple = $ pimple ;
4034 $ this ->pimple [ContainerInterface::class] = $ this ;
4135 $ this ->pimple [PsrContainerInterface::class] = $ this ;
4236 }
Original file line number Diff line number Diff line change 1111 */
1212namespace Hyperf \Pimple ;
1313
14- use Hyperf \Utils \ApplicationContext ;
14+ use Hyperf \Context \ApplicationContext ;
1515use Pimple ;
1616
1717class ContainerFactory
1818{
19- protected $ providers = [];
20-
21- public function __construct (array $ providers = [])
19+ public function __construct (protected array $ providers = [])
2220 {
23- $ this ->providers = $ providers ;
2421 }
2522
2623 public function __invoke ()
Original file line number Diff line number Diff line change 1111 */
1212namespace Hyperf \Pimple \Exception ;
1313
14+ use Exception ;
1415use Psr \Container \ContainerExceptionInterface ;
1516
16- class InvalidDefinitionException extends \ Exception implements ContainerExceptionInterface
17+ class InvalidDefinitionException extends Exception implements ContainerExceptionInterface
1718{
1819}
Original file line number Diff line number Diff line change 1212namespace Hyperf \Pimple \Exception ;
1313
1414use Psr \Container \NotFoundExceptionInterface ;
15+ use RuntimeException ;
1516
16- class NotFoundException extends \ RuntimeException implements NotFoundExceptionInterface
17+ class NotFoundException extends RuntimeException implements NotFoundExceptionInterface
1718{
1819}
Original file line number Diff line number Diff line change 1111 */
1212namespace Hyperf \Pimple \Exception ;
1313
14+ use Exception ;
1415use Psr \Container \ContainerExceptionInterface ;
1516
16- class NotSupportException extends \ Exception implements ContainerExceptionInterface
17+ class NotSupportException extends Exception implements ContainerExceptionInterface
1718{
1819}
Original file line number Diff line number Diff line change 1616use Hyperf \Utils \ApplicationContext ;
1717use HyperfTest \Stub \BarProvider ;
1818use HyperfTest \Stub \Foo ;
19+ use Mockery ;
1920use Psr \Container \ContainerInterface ;
2021
2122/**
@@ -26,7 +27,7 @@ class ContainerFactoryTest extends AbstractTestCase
2627{
2728 public function testContainerFactory ()
2829 {
29- ApplicationContext::setContainer (\ Mockery::mock (ContainerInterface::class));
30+ ApplicationContext::setContainer (Mockery::mock (ContainerInterface::class));
3031
3132 $ container = (new ContainerFactory ())();
3233
You can’t perform that action at this time.
0 commit comments