From 2cb2f128cffb4e664145c9a8a392b9666d014459 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Aug 2026 05:25:30 +0900 Subject: test(plugin): compare a real-plugin install against upstream Composer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run upstream Composer and Shirabe over pristine copies of a fixture project at the same path and require composer.lock, the whole vendor tree (including the plugin-generated GeneratedConfig.php), the plugin's IO lines and the exit code to match byte for byte. The plugin under test (phpstan/extension-installer 1.4.3) is downloaded by fixtures/e2e/fetch — pinned to an upstream commit and hash-verified — into a git-ignored directory rather than committed; the test skips while it is absent, like the other real-PHP prerequisites. Its dependencies are minimal stand-ins resolved from local repositories, so test runs stay offline. A zip dist would exercise the known lossy-string byte-precision debt in RemoteFilesystem, so the fixture serves the plugin through a path dist until that is resolved. Co-Authored-By: Claude Fable 5 --- .../plugin/fixtures/e2e/project/composer.json | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 crates/shirabe/tests/plugin/fixtures/e2e/project/composer.json (limited to 'crates/shirabe/tests/plugin/fixtures/e2e/project') diff --git a/crates/shirabe/tests/plugin/fixtures/e2e/project/composer.json b/crates/shirabe/tests/plugin/fixtures/e2e/project/composer.json new file mode 100644 index 00000000..d16b5383 --- /dev/null +++ b/crates/shirabe/tests/plugin/fixtures/e2e/project/composer.json @@ -0,0 +1,71 @@ +{ + "name": "shirabe/e2e-extension-installer", + "description": "E2E fixture project: install phpstan/extension-installer and let it generate its config.", + "repositories": [ + { + "type": "package", + "package": { + "name": "phpstan/extension-installer", + "version": "1.4.3", + "type": "composer-plugin", + "license": [ + "MIT" + ], + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "require": { + "php": "^7.2 || ^8.0", + "composer-plugin-api": "^2.0", + "phpstan/phpstan": "^1.9.0 || ^2.0" + }, + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "dist": { + "type": "path", + "url": "../ext/phpstan-extension-installer-1.4.3" + }, + "transport-options": { + "symlink": false + } + } + }, + { + "type": "path", + "url": "../packages/phpstan-phpstan", + "options": { + "symlink": false + } + }, + { + "type": "path", + "url": "../packages/acme-extension", + "options": { + "symlink": false + } + }, + { + "type": "path", + "url": "../packages/acme-phpstan-tools", + "options": { + "symlink": false + } + }, + { + "packagist.org": false + } + ], + "require": { + "phpstan/extension-installer": "1.4.3", + "acme/extension": "1.0.0", + "acme/phpstan-tools": "1.0.0" + }, + "config": { + "allow-plugins": { + "phpstan/extension-installer": true + } + } +} -- cgit v1.3.1