diff --git a/src/Eccube/Service/PluginService.php b/src/Eccube/Service/PluginService.php index b19dc6b2930..e9bca4e1c70 100644 --- a/src/Eccube/Service/PluginService.php +++ b/src/Eccube/Service/PluginService.php @@ -444,18 +444,18 @@ public function checkPluginArchiveContent($dir, array $config_cache = []) } if (!is_array($meta)) { - throw new PluginException('config.yml not found or syntax error'); + throw new PluginException('composer.json not found or syntax error'); } if (!isset($meta['code']) || !$this->checkSymbolName($meta['code'])) { - throw new PluginException('config.yml code empty or invalid_character(\W)'); + throw new PluginException('composer.json code empty or invalid_character(\W)'); } if (!isset($meta['name'])) { - // nameは直接クラス名やPATHに使われるわけではないため文字のチェックはなしし - throw new PluginException('config.yml name empty'); + // nameは直接クラス名やPATHに使われるわけではないため文字のチェックはなし + throw new PluginException('composer.json name empty'); } if (!isset($meta['version'])) { - // versionは直接クラス名やPATHに使われるわけではないため文字のチェックはなしし - throw new PluginException('config.yml version invalid_character(\W) '); + // versionは直接クラス名やPATHに使われるわけではないため文字のチェックはなし + throw new PluginException('composer.json version invalid_character(\W) '); } } diff --git a/tests/Eccube/Tests/Service/PluginServiceTest.php b/tests/Eccube/Tests/Service/PluginServiceTest.php index f4d3a37ba36..acbf59238f4 100644 --- a/tests/Eccube/Tests/Service/PluginServiceTest.php +++ b/tests/Eccube/Tests/Service/PluginServiceTest.php @@ -79,8 +79,8 @@ protected function tearDown(): void /* 正しいプラグインの条件 * tar/zipアーカイブである - * 展開した直下のディレクトリにconfig.ymlがあり、正しいymlファイルである - * config.ymlの必須要素が規定の文字数、文字種で定義されている + * 展開した直下のディレクトリにcomposer.jsonがあり、正しいymlファイルである + * composer.jsonの必須要素が規定の文字数、文字種で定義されている * event.ymlが存在する場合、正しいymlである */ @@ -164,7 +164,7 @@ public function testInstallPluginEmptyError() $this->service->install($tmpfile); } - // config.ymlのフォーマット確認 + // composer.jsonのフォーマット確認 public function testConfigYmlFormat() { $tmpname = 'dummy'.mt_rand(); @@ -250,7 +250,7 @@ public function testConfigYmlFormat() } /** - * config.ymlに異常な項目がある場合 + * composer.jsonに異常な項目がある場合 */ public function testnstallPluginMalformedConfigError() { @@ -264,7 +264,7 @@ public function testnstallPluginMalformedConfigError() $config = []; $config['code'] = $tmpname; $config['version'] = $tmpname; - $tar->addFromString('config.yml', Yaml::dump($config)); + $tar->addFromString('composer.json', Yaml::dump($config)); // インストールできないはず $this->assertNull($this->service->install($tmpfile)); @@ -435,7 +435,7 @@ public function testGetDependentByCodeEccubePlugin() $tmpfile = $tmpdir.'/plugin.tar'; $tar = new \PharData($tmpfile); - $tar->addFromString('config.yml', Yaml::dump($config)); + $tar->addFromString('composer.json', Yaml::dump($config)); $jsonPHP = $this->createComposerJsonFile($config); $text = json_encode($jsonPHP); $tar->addFromString('composer.json', $text); @@ -471,7 +471,7 @@ public function testGetDependentByCodeOtherPlugin() $tmpfile = $tmpdir.'/plugin.tar'; $tar = new \PharData($tmpfile); - $tar->addFromString('config.yml', Yaml::dump($config)); + $tar->addFromString('composer.json', Yaml::dump($config)); $jsonPHP = $this->createComposerJsonFile($config); $text = json_encode($jsonPHP); $tar->addFromString('composer.json', $text); @@ -506,7 +506,7 @@ public function testGetDependentByCodeAllPlugin() $tmpfile = $tmpdir.'/plugin.tar'; $tar = new \PharData($tmpfile); - $tar->addFromString('config.yml', Yaml::dump($config)); + $tar->addFromString('composer.json', Yaml::dump($config)); $jsonPHP = $this->createComposerJsonFile($config); $text = json_encode($jsonPHP); $tar->addFromString('composer.json', $text); diff --git a/tests/Eccube/Tests/Service/PluginServiceWithExceptionTest.php b/tests/Eccube/Tests/Service/PluginServiceWithExceptionTest.php index 74b18457cc4..dd82484d8e3 100644 --- a/tests/Eccube/Tests/Service/PluginServiceWithExceptionTest.php +++ b/tests/Eccube/Tests/Service/PluginServiceWithExceptionTest.php @@ -62,7 +62,7 @@ public function testInstallPluginWithBrokenManager() $tmpfile = $tmpdir.'/plugin.tar'; $tar = new \PharData($tmpfile); - $tar->addFromString('config.yml', Yaml::dump($config)); + $tar->addFromString('composer.json', Yaml::dump($config)); $dummyManager = <<<'EOD'