Skip to content

Conversation

@Jean85
Copy link
Contributor

@Jean85 Jean85 commented Nov 14, 2018

This starts from #682, DO NOT MERGE before that. See the reduced diff here.
Fully rebased, it's ready to be reviewed and merged now!

With this change, the ModulesIntegration is refactored to use jean85/pretty-package-versions instead of the whole composer/composer as an optional dependency. This has 2 consequences:

  1. The dependency tree of the suggested dependency is really smaller. It goes from this (2 extensions and 13 packages):
$ composer show -t composer/composer
composer/composer 1.7.3
├──composer/ca-bundle ^1.0
│  ├──ext-openssl *
│  ├──ext-pcre *
│  └──php ^5.3.2 || ^7.0
├──composer/semver ^1.0
│  └──php ^5.3.2 || ^7.0
├──composer/spdx-licenses ^1.2
│  └──php ^5.3.2 || ^7.0
├──composer/xdebug-handler ^1.1
│  ├──php ^5.3.2 || ^7.0
│  └──psr/log ^1.0
│     └──php >=5.3.0
├──justinrainbow/json-schema ^3.0 || ^4.0 || ^5.0
│  └──php >=5.3.3
├──php ^5.3.2 || ^7.0
├──psr/log ^1.0
│  └──php >=5.3.0
├──seld/jsonlint ^1.4
│  └──php ^5.3 || ^7.0
├──seld/phar-utils ^1.0
│  └──php >=5.3
├──symfony/console ^2.7 || ^3.0 || ^4.0
│  ├──php ^7.1.3
│  └──symfony/polyfill-mbstring ~1.0
│     └──php >=5.3.3
├──symfony/filesystem ^2.7 || ^3.0 || ^4.0
│  ├──php ^7.1.3
│  └──symfony/polyfill-ctype ~1.8
│     └──php >=5.3.3
├──symfony/finder ^2.7 || ^3.0 || ^4.0
│  └──php ^7.1.3
└──symfony/process ^2.7 || ^3.0 || ^4.0
   └──php ^7.1.3

... to this (2 packages):

jean85/pretty-package-versions 1.2 A wrapper for ocramius/package-versions to get pretty versions strings
├──ocramius/package-versions ^1.2.0
│  ├──composer-plugin-api ^1.0.0
│  └──php ^7.1.0
└──php ^7.0

The reported modules (tested on this exact package) goes from this:

[
    'clue/stream-filter' => 1.4.0.0,
    'jean85/pretty-package-versions' => 1.2.0.0,
    'ocramius/package-versions' => 1.3.0.0,
    'paragonie/random_compat' => 9.99.99.0,
    'php-http/client-common' => 1.8.1.0,
    'php-http/curl-client' => 1.7.1.0,
    'php-http/discovery' => 1.4.0.0,
    'php-http/httplug' => 1.1.0.0,
    'php-http/message' => 1.7.2.0,
    'php-http/message-factory' => 1.0.2.0,
    'php-http/promise' => 1.0.0.0,
    'psr/http-message' => 1.0.1.0,
    'ramsey/uuid' => 3.8.0.0,
    'symfony/options-resolver' => 3.4.18.0,
    'symfony/polyfill-ctype' => 1.10.0.0,
    'zendframework/zend-diactoros' => 1.8.6.0,
]

.. to this:

[
    'clue/stream-filter' => v1.4.0,
    'jean85/pretty-package-versions' => 1.2,
    'ocramius/package-versions' => 1.3.0,
    'paragonie/random_compat' => v9.99.99,
    'php-http/client-common' => 1.8.1,
    'php-http/curl-client' => v1.7.1,
    'php-http/discovery' => 1.4.0,
    'php-http/httplug' => v1.1.0,
    'php-http/message' => 1.7.2,
    'php-http/message-factory' => v1.0.2,
    'php-http/promise' => v1.0.0,
    'psr/http-message' => 1.0.1,
    'ramsey/uuid' => 3.8.0,
    'symfony/options-resolver' => v3.4.18,
    'symfony/polyfill-ctype' => v1.10.0,
    'zendframework/zend-diactoros' => 1.8.6,
    'composer/ca-bundle' => 1.1.3,
    'composer/composer' => 1.7.3,
    'composer/semver' => 1.4.2,
    'composer/spdx-licenses' => 1.5.0,
    'composer/xdebug-handler' => 1.3.0,
    'doctrine/annotations' => v1.6.0,
    'doctrine/instantiator' => 1.1.0,
    'doctrine/lexer' => v1.0.1,
    'friendsofphp/php-cs-fixer' => v2.13.1,
    'justinrainbow/json-schema' => 5.2.7,
    'monolog/monolog' => 1.24.0,
    'myclabs/deep-copy' => 1.8.1,
    'nette/bootstrap' => v2.4.6,
    'nette/di' => v2.4.14,
    'nette/finder' => v2.4.2,
    'nette/neon' => v2.4.3,
    'nette/php-generator' => v3.0.5,
    'nette/robot-loader' => v3.1.0,
    'nette/utils' => v2.5.3,
    'nikic/php-parser' => v4.1.0,
    'phar-io/manifest' => 1.0.3,
    'phar-io/version' => 2.0.1,
    'php-cs-fixer/diff' => v1.3.0,
    'php-http/mock-client' => 1.1.0,
    'phpdocumentor/reflection-common' => 1.0.1,
    'phpdocumentor/reflection-docblock' => 4.3.0,
    'phpdocumentor/type-resolver' => 0.4.0,
    'phpspec/prophecy' => 1.8.0,
    'phpstan/phpdoc-parser' => 0.3,
    'phpstan/phpstan' => 0.10.5,
    'phpstan/phpstan-phpunit' => 0.10,
    'phpunit/php-code-coverage' => 6.1.4,
    'phpunit/php-file-iterator' => 2.0.2,
    'phpunit/php-text-template' => 1.2.1,
    'phpunit/php-timer' => 2.0.0,
    'phpunit/php-token-stream' => 3.0.1,
    'phpunit/phpunit' => 7.4.3,
    'psr/log' => 1.0.2,
    'sebastian/code-unit-reverse-lookup' => 1.0.1,
    'sebastian/comparator' => 3.0.2,
    'sebastian/diff' => 3.0.1,
    'sebastian/environment' => 3.1.0,
    'sebastian/exporter' => 3.1.0,
    'sebastian/global-state' => 2.0.0,
    'sebastian/object-enumerator' => 3.0.3,
    'sebastian/object-reflector' => 1.1.1,
    'sebastian/recursion-context' => 3.0.0,
    'sebastian/resource-operations' => 2.0.1,
    'sebastian/version' => 2.0.1,
    'seld/jsonlint' => 1.7.1,
    'seld/phar-utils' => 1.0.1,
    'symfony/console' => v4.1.7,
    'symfony/event-dispatcher' => v4.1.7,
    'symfony/filesystem' => v4.1.7,
    'symfony/finder' => v4.1.7,
    'symfony/phpunit-bridge' => v4.1.7,
    'symfony/polyfill-mbstring' => v1.10.0,
    'symfony/polyfill-php70' => v1.10.0,
    'symfony/polyfill-php72' => v1.10.0,
    'symfony/process' => v4.1.7,
    'symfony/stopwatch' => v4.1.7,
    'theseer/tokenizer' => 1.1.0,
    'webmozart/assert' => 1.3.0,
    'sentry/sentry' => 2.0.x-dev@95780b3,
]

All the dependencies are reported, even indirect ones, and the root package is listed last.

@Jean85 Jean85 added this to the Release 2.0 milestone Nov 14, 2018
@Jean85 Jean85 self-assigned this Nov 14, 2018
@Jean85 Jean85 force-pushed the replace-modules-integration branch from 7b7136d to 95a88ad Compare November 16, 2018 09:37
@Jean85 Jean85 requested review from HazAT and ste93cry November 16, 2018 09:39
@Jean85 Jean85 changed the title [WIP] [2.0] Replace modules integration [2.0] Replace modules integration Nov 16, 2018
Copy link
Member

@HazAT HazAT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ste93cry ste93cry merged commit 6b63117 into 2.0 Nov 16, 2018
@ste93cry ste93cry deleted the replace-modules-integration branch November 16, 2018 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants