File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 1212
1313namespace Xmo \AppStore \Packer ;
1414
15- use Hyperf \Context \ApplicationContext ;
16-
1715final class PackerFactory
1816{
1917 public function get (string $ type = 'json ' ): PackerInterface
2018 {
21- $ container = ApplicationContext::getContainer ();
2219 switch ($ type ) {
2320 case 'json ' :
24- return $ container -> make ( JsonPacker::class );
21+ return new JsonPacker ( );
2522 default :
2623 throw new \RuntimeException (sprintf ('%s Packer type not found ' , $ type ));
2724 }
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class Plugin
4141
4242 public static function getPacker (): PackerInterface
4343 {
44- return ApplicationContext:: getContainer ()-> get ( PackerFactory::class )->get ();
44+ return ( new PackerFactory () )->get ();
4545 }
4646
4747 public static function init (): void
You can’t perform that action at this time.
0 commit comments