Skip to content

Commit 1896ce9

Browse files
authored
Merge pull request #47 from mineadmin/fixed/app-store
Fixed
2 parents 2ec46e1 + 4e3a400 commit 1896ce9

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/app-store/src/Packer/PackerFactory.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212

1313
namespace Xmo\AppStore\Packer;
1414

15-
use Hyperf\Context\ApplicationContext;
16-
1715
final 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
}

src/app-store/src/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)