From 5f3440d2454ff4e2550135abb5f07a7087009c3e Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Wed, 3 Sep 2025 19:54:09 +0200 Subject: [PATCH] fix composer.json not being generated for private plugins --- src/Command/PluginCommand.php | 2 +- .../Plugin/SimpleExample/composer.json | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 tests/comparisons/Plugin/SimpleExample/composer.json diff --git a/src/Command/PluginCommand.php b/src/Command/PluginCommand.php index 3bf567d1d..dd3460b85 100644 --- a/src/Command/PluginCommand.php +++ b/src/Command/PluginCommand.php @@ -238,7 +238,7 @@ protected function _generateFiles( if (!$this->isVendor) { $vendorFiles = [ - '.gitignore.twig', 'README.md.twig', 'composer.json.twig', 'phpunit.xml.dist.twig', + '.gitignore.twig', 'README.md.twig', 'phpunit.xml.dist.twig', 'bootstrap.php.twig', 'schema.sql.twig', ]; diff --git a/tests/comparisons/Plugin/SimpleExample/composer.json b/tests/comparisons/Plugin/SimpleExample/composer.json new file mode 100644 index 000000000..9a29c6357 --- /dev/null +++ b/tests/comparisons/Plugin/SimpleExample/composer.json @@ -0,0 +1,24 @@ +{ + "name": "your-name-here/simple-example", + "description": "SimpleExample plugin for CakePHP", + "type": "cakephp-plugin", + "license": "MIT", + "require": { + "php": ">=8.1", + "cakephp/cakephp": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.1" + }, + "autoload": { + "psr-4": { + "SimpleExample\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "SimpleExample\\Test\\": "tests/", + "Cake\\Test\\": "vendor/cakephp/cakephp/tests/" + } + } +}