From 27d0c5c3ef621ba79d815e049ff56f3871ef2e81 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 12 Feb 2021 11:12:42 +0100 Subject: [PATCH] Add test deficiencies in installed versions as the runtime autoloaders are not prepended and do not grant access to the latest data --- .../functional/installed-versions.test | 39 +++++++++++++++++++ .../functional/installed-versions/Hooks.php | 20 ++++++++++ .../installed-versions/composer.json | 21 ++++++++++ .../installed-versions/plugin-a/PluginA.php | 24 ++++++++++++ .../installed-versions/plugin-a/composer.json | 15 +++++++ .../installed-versions/plugin-b/PluginB.php | 24 ++++++++++++ .../installed-versions/plugin-b/composer.json | 15 +++++++ .../symfony-console/composer.json | 4 ++ .../symfony-process/composer.json | 4 ++ 9 files changed, 166 insertions(+) create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions.test create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/Hooks.php create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/composer.json create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/plugin-a/PluginA.php create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/plugin-a/composer.json create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/plugin-b/PluginB.php create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/plugin-b/composer.json create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/symfony-console/composer.json create mode 100644 tests/Composer/Test/Fixtures/functional/installed-versions/symfony-process/composer.json diff --git a/tests/Composer/Test/Fixtures/functional/installed-versions.test b/tests/Composer/Test/Fixtures/functional/installed-versions.test new file mode 100644 index 000000000..62c2092a6 --- /dev/null +++ b/tests/Composer/Test/Fixtures/functional/installed-versions.test @@ -0,0 +1,39 @@ +--RUN-- +update +--EXPECT-- +> Hooks::preUpdate +!!PreUpdate:["composer/ca-bundle","composer/composer","composer/semver","composer/spdx-licenses","composer/xdebug-handler","justinrainbow/json-schema","psr/log","react/promise","seld/jsonlint","seld/phar-utils","symfony/console","symfony/debug","symfony/filesystem","symfony/finder","symfony/polyfill-ctype","symfony/polyfill-mbstring","symfony/process"] +!!Versions:console:%[2-8]\.\d+\.\d+.0%;process:%[2-8]\.\d+\.\d+.0%;filesystem:%[2-8]\.\d+\.\d+.0% +Loading composer repositories with package information +Updating dependencies +Lock file operations: 6 installs, 0 updates, 0 removals + - Locking plugin/a (1.1.1) + - Locking plugin/b (2.2.2) + - Locking symfony/console (99999.1.2) + - Locking symfony/filesystem (%v?[2-8]\.\d+\.\d+%) + - Locking symfony/polyfill-ctype (%v?[1-8]\.\d+\.\d+%) + - Locking symfony/process (12345.1.2) +Writing lock file +Installing dependencies from lock file (including require-dev) +Package operations: 6 installs, 0 updates, 0 removals + - Downloading symfony/polyfill-ctype (%v?[1-8]\.\d+\.\d+%) + - Downloading symfony/filesystem (%v?[2-8]\.\d+\.\d+%) + - Installing symfony/console (99999.1.2): Symlinking from symfony-console + - Installing plugin/a (1.1.1): Symlinking from plugin-a +!!PluginA:1.1.1.0["root/pkg","symfony/console","composer/ca-bundle","composer/composer","composer/semver","composer/spdx-licenses","composer/xdebug-handler","justinrainbow/json-schema","psr/log","react/promise","seld/jsonlint","seld/phar-utils","symfony/debug","symfony/filesystem","symfony/finder","symfony/polyfill-ctype","symfony/polyfill-mbstring","symfony/process","plugin/a"] +!!Versions:console:99999.1.2.0;process:%[2-8]\.\d+\.\d+.0%;filesystem:%[2-8]\.\d+\.\d+.0% + - Installing plugin/b (2.2.2): Symlinking from plugin-b +!!PluginB:2.2.2.0["plugin/a","root/pkg","symfony/console","composer/ca-bundle","composer/composer","composer/semver","composer/spdx-licenses","composer/xdebug-handler","justinrainbow/json-schema","psr/log","react/promise","seld/jsonlint","seld/phar-utils","symfony/debug","symfony/filesystem","symfony/finder","symfony/polyfill-ctype","symfony/polyfill-mbstring","symfony/process","plugin/b"] +!!Versions:console:99999.1.2.0;process:%[2-8]\.\d+\.\d+.0%;filesystem:%[2-8]\.\d+\.\d+.0% + - Installing symfony/polyfill-ctype (%v?[1-8]\.\d+\.\d+%): Extracting archive + - Installing symfony/filesystem (%v?[2-8]\.\d+\.\d+%): Extracting archive + - Installing symfony/process (12345.1.2): Symlinking from symfony-process +Generating autoload files +2 packages you are using are looking for funding. +Use the `composer fund` command to find out more! +> Hooks::postUpdate +!!PostUpdate:["plugin/a","plugin/b","root/pkg","symfony/console","symfony/filesystem","symfony/polyfill-ctype","symfony/process","composer/ca-bundle","composer/composer","composer/semver","composer/spdx-licenses","composer/xdebug-handler","justinrainbow/json-schema","psr/log","react/promise","seld/jsonlint","seld/phar-utils","symfony/debug","symfony/finder","symfony/polyfill-mbstring"] +!!Versions:console:99999.1.2.0;process:12345.1.2.0;filesystem:%[2-8]\.\d+\.\d+.0% + +--EXPECT-EXIT-CODE-- +0 diff --git a/tests/Composer/Test/Fixtures/functional/installed-versions/Hooks.php b/tests/Composer/Test/Fixtures/functional/installed-versions/Hooks.php new file mode 100644 index 000000000..b215d1e52 --- /dev/null +++ b/tests/Composer/Test/Fixtures/functional/installed-versions/Hooks.php @@ -0,0 +1,20 @@ +