octobercms / october

Self-hosted CMS platform based on the Laravel PHP Framework.
https://octobercms.com/
Other
11.04k stars 2.21k forks source link

Integrate existing dependencies into Marketplace plugin build process #2831

Closed LukeTowers closed 3 years ago

LukeTowers commented 7 years ago

We need to make composer aware of the existing dependencies loaded by the base October instance when it is being used during the build process for the plugins listed on the marketplace. This will accomplish two things:

  1. Prevent incompatible versions of libraries already being used by October from being loaded by the plugin as well
  2. Remove any unnecessary dependencies from plugin vendor directories when downloaded from the marketplace which will save disk space that is currently being wasted by having to load the duplicates.

In order to accomplish this, we will utilize the "replace" property in each plugin's composer.json file to specify the dependencies that get loaded by a base October instance so that Composer thinks that each plugin 'replaces' all of those dependencies so it will not load them when pulling in the plugin's actual dependencies. This will be accomplished using code similar to the following in the build process:

$baseOctoberDependencies = [
    "illuminate/support" => "5.1.*", 
    // etc. etc.
];

$pluginComposer = json_decode(File::get($pluginPath . '/composer.json'));
$pluginComposer['replace'] = array_merge($pluginComposer['replace'], $baseOctoberDependencies);
File::put($pluginPath . '/composer.json', json_encode($pluginComposer));

// Trigger "composer install"
// Remove composer.json & composer.lock
// Build complete
seanthepottingshed commented 7 years ago

@LukeTowers - yes please this would be absolutely yummy!

LukeTowers commented 7 years ago

This will get implemented by @daftspunk when the list of dependencies to "replace" is generated. I'll mostly likely be working on generating that list of dependencies. Was planning on doing that tonight but got side tracked by #2830. @seanthepottingshed If you'd like to help out, we need a list of all the dependencies that get loaded by a basic October instance and the composer version syntax that is used to load each of those dependencies.

Example: "illuminate/support" is loaded by a basic October instance, and the specific version syntax used to pull it in from whatever composer.json file requires it is "5.1.*".

seanthepottingshed commented 7 years ago

@LukeTowers apologies for my stupidity, but are you just after a list of dependency versions for a vanilla OctoberCMS install via 'composer install'

LukeTowers commented 7 years ago

Basically, yes. But not the fully qualified versions, i.e. not "illuminate/support": "5.1.39", we need the versions that include the precise version syntax that composer uses to get the most up to date versions of our dependencies (i.e. "illuminate/support": "5.1.*")

seanthepottingshed commented 7 years ago

@LukeTowers - Gotcha! Will do first thing tomorrow morning when I get to work

seanthepottingshed commented 7 years ago

@LukeTowers

Not too sure if the following is what you're after, I just went through my composer.lock file after a fresh install of October:

<?php

$baseOctoberDependencies = [
    /*
    |---------
    | PACKAGES
    |---------
    */
    // classpreloader/classpreloader 3.1.0 require
    'nikic/php-parser'                      => '^1.0|^2.0|^3.0',
    'php'                                   => '>=5.5.9',
    // classpreloader/classpreloader 3.1.0 require-dev
    'phpunit/phpunit'                       => '^4.8|^5.0',
    // composer/installers v1.3.0 require
    'composer-plugin-api'                   => '^1.0',
    // composer/installers v1.3.0 require-dev
    'composer/composer'                     => '1.0.*@dev',
    'phpunit/phpunit'                       => '4.1.*',
    // danielstjules/stringy 1.10.0 require
    'ext-mbstring'                          => '*',
    'php'                                   => '>=5.3.0',
    // danielstjules/stringy 1.10.0 require-dev
    'phpunit/phpunit'                       => '~4.0',
    // dnoegel/php-xdg-base-dir 0.1 require
    'php'                                   => '>=5.3.2',
    // dnoegel/php-xdg-base-dir 0.1 require-dev
    'phpunit/phpunit'                       => '@stable',
    // doctrine/annotations v1.4.0 require
    'doctrine/lexer'                        => '1.*',
    'php'                                   => '^5.6 || ^7.0',
    // doctrine/annotations v1.4.0 require-dev
    'doctrine/cache'                        => '1.*',
    'phpunit/phpunit'                       => '^5.7',
    // doctrine/cache v1.6.1 require
    'php'                                   => '~5.5|~7.0',
    // doctrine/cache v1.6.1 require-dev
    'phpunit/phpunit'                       => '~4.8|~5.0',
    'predis/predis'                         => '~1.0',
    'satooshi/php-coveralls'                => '~0.6',
    // doctrine/collections v1.4.0 require
    'php'                                   => '^5.6 || ^7.0',
    // doctrine/collections v1.4.0 require-dev
    'doctrine/coding-standard'              => '~0.1@dev',
    'phpunit/phpunit'                       => '^5.7',
    // doctrine/common v2.7.2 require
    'doctrine/annotations'                  => '1.*',
    'doctrine/cache'                        => '1.*',
    'doctrine/collections'                  => '1.*',
    'doctrine/inflector'                    => '1.*',
    'doctrine/lexer'                        => '1.*',
    'php'                                   => '~5.6|~7.0',
    // doctrine/common v2.7.2 require-dev
    'phpunit/phpunit'                       => '^5.4.6',
    // doctrine/dbal v2.5.12 require
    'doctrine/common'                       => '>=2.4,<2.8-dev',
    'php'                                   => '>=5.3.2',
    // doctrine/dbal v2.5.12 require-dev
    'phpunit/phpunit'                       => '4.*',
    'symfony/console'                       => '2.*||^3.0',
    // doctrine/inflector v1.1.0 require
    'php'                                   => '>=5.3.2',
    // doctrine/inflector v1.1.0 require-dev
    'phpunit/phpunit'                       => '4.*',
    // doctrine/lexer v1.0.1 require
    'php'                                   => '>=5.3.2',
    // erusev/parsedown 1.6.2 require
    'php'                                   => '>=5.3.0',
    // erusev/parsedown-extra 0.7.1 require
    'erusev/parsedown'                      => '~1.4',
    // jakub-onderka/php-console-color 0.1 require
    'php'                                   => '>=5.3.2',
    // jakub-onderka/php-console-color 0.1 require-dev
    'jakub-onderka/php-code-style'          => '1.0',
    'jakub-onderka/php-parallel-lint'       => '0.*',
    'jakub-onderka/php-var-dump-check'      => '0.*',
    'phpunit/phpunit'                       => '3.7.*',
    'squizlabs/php_codesniffer'             => '1.*',
    // jakub-onderka/php-console-highlighter v0.3.2 require
    'jakub-onderka/php-console-color'       => '~0.1',
    'php'                                   => '>=5.3.0',
    // jakub-onderka/php-console-highlighter v0.3.2 require-dev
    'jakub-onderka/php-code-style'          => '~1.0',
    'jakub-onderka/php-parallel-lint'       => '~0.5',
    'jakub-onderka/php-var-dump-check'      => '~0.1',
    'phpunit/phpunit'                       => '~4.0',
    'squizlabs/php_codesniffer'             => '~1.5',
    // jenssegers/date v3.2.10 require
    'nesbot/carbon'                         => '^1.0',
    'php'                                   => '>=5.4',
    'symfony/translation'                   => '^2.7|^3.0',
    // jenssegers/date v3.2.10 require-dev
    'phpunit/phpunit'                       => '^4.0|^5.0|^6.0',
    'satooshi/php-coveralls'                => '^1.0',
    // jeremeamia/SuperClosure 2.3.0 require
    'nikic/php-parser'                      => '^1.2|^2.0|^3.0',
    'php'                                   => '>=5.4',
    'symfony/polyfill-php56'                => '^1.0',
    // jeremeamia/SuperClosure 2.3.0 require-dev
    'phpunit/phpunit'                       => '^4.0|^5.0',
    // kriswallsmith/assetic v1.4.0 require
    'php'                                   => '>=5.3.1',
    'symfony/process'                       => '~2.1|~3.0',
    // kriswallsmith/assetic v1.4.0 require-dev
    'leafo/lessphp'                         => '^0.3.7',
    'leafo/scssphp'                         => '~0.1',
    'meenie/javascript-packer'              => '^1.1',
    'mrclay/minify'                         => '<2.3',
    'natxet/cssmin'                         => '3.0.4',
    'patchwork/jsqueeze'                    => '~1.0|~2.0',
    'phpunit/phpunit'                       => '~4.8 || ^5.6',
    'psr/log'                               => '~1.0',
    'ptachoire/cssembed'                    => '~1.0',
    'symfony/phpunit-bridge'                => '~2.7|~3.0',
    'twig/twig'                             => '~1.23|~2.0',
    'yfix/packager'                         => 'dev-master',
    // laravel/framework v5.1.46 require
    'classpreloader/classpreloader'         => '~2.0|~3.0',
    'danielstjules/stringy'                 => '~1.8',
    'doctrine/inflector'                    => '~1.0',
    'ext-mbstring'                          => '*',
    'ext-openssl'                           => '*',
    'jeremeamia/superclosure'               => '~2.0',
    'league/flysystem'                      => '~1.0',
    'monolog/monolog'                       => '~1.11',
    'mtdowling/cron-expression'             => '~1.0',
    'nesbot/carbon'                         => '~1.19',
    'paragonie/random_compat'               => '~1.4',
    'php'                                   => '>=5.5.9',
    'psy/psysh'                             => '0.7.*',
    'swiftmailer/swiftmailer'               => '~5.1',
    'symfony/console'                       => '2.7.*',
    'symfony/css-selector'                  => '2.7.*|2.8.*',
    'symfony/debug'                         => '2.7.*',
    'symfony/dom-crawler'                   => '2.7.*',
    'symfony/finder'                        => '2.7.*',
    'symfony/http-foundation'               => '2.7.*',
    'symfony/http-kernel'                   => '2.7.*',
    'symfony/process'                       => '2.7.*',
    'symfony/routing'                       => '2.7.*',
    'symfony/translation'                   => '2.7.*',
    'symfony/var-dumper'                    => '2.7.*',
    'vlucas/phpdotenv'                      => '~1.0',
    // laravel/framework v5.1.46 require-dev
    'aws/aws-sdk-php'                       => '~3.0',
    'iron-io/iron_mq'                       => '~2.0',
    'mockery/mockery'                       => '~0.9.4',
    'pda/pheanstalk'                        => '~3.0',
    'phpunit/phpunit'                       => '~4.0',
    'predis/predis'                         => '~1.0',
    // leafo/scssphp v0.6.7 require
    'php'                                   => '>=5.4.0',
    // leafo/scssphp v0.6.7 require-dev
    'kherge/box'                            => '~2.5',
    'phpunit/phpunit'                       => '~3.7',
    'squizlabs/php_codesniffer'             => '~2.5',
    // league/csv 8.2.1 require
    'ext-mbstring'                          => '*',
    'php'                                   => '>=5.5.0',
    // league/csv 8.2.1 require-dev
    'friendsofphp/php-cs-fixer'             => '^1.9',
    'phpunit/phpunit'                       => '^4.0',
    // league/flysystem 1.0.39 require
    'php'                                   => '>=5.5.9',
    // league/flysystem 1.0.39 require-dev
    'ext-fileinfo'                          => '*',
    'mockery/mockery'                       => '~0.9',
    'phpspec/phpspec'                       => '^2.2',
    'phpunit/phpunit'                       => '~4.8',
    // linkorb/jsmin-php 1.0.0 require
    'php'                                   => '>=5.0.0',
    // monolog/monolog 1.22.1 require
    'php'                                   => '>=5.3.0',
    'psr/log'                               => '~1.0',
    // monolog/monolog 1.22.1 require-dev
    'aws/aws-sdk-php'                       => '^2.4.9 || ^3.0',
    'doctrine/couchdb'                      => '~1.0@dev',
    'graylog2/gelf-php'                     => '~1.0',
    'jakub-onderka/php-parallel-lint'       => '0.9',
    'php-amqplib/php-amqplib'               => '~2.4',
    'php-console/php-console'               => '^3.1.3',
    'phpunit/phpunit'                       => '~4.5',
    'phpunit/phpunit-mock-objects'          => '2.3.0',
    'ruflin/elastica'                       => '>=0.90 <3.0',
    'sentry/sentry'                         => '^0.13',
    'swiftmailer/swiftmailer'               => '~5.3',
    // mtdowling/cron-expression v1.2.0 require
    'php'                                   => '>=5.3.2',
    // mtdowling/cron-expression v1.2.0 require-dev
    'phpunit/phpunit'                       => '~4.0|~5.0',
    // nesbot/carbon 1.22.1 require
    'php'                                   => '>=5.3.0',
    'symfony/translation'                   => '~2.6 || ~3.0',
    // nesbot/carbon 1.22.1 require-dev
    'friendsofphp/php-cs-fixer'             => '~2',
    'phpunit/phpunit'                       => '~4.0 || ~5.0',
    // nikic/php-parser v2.1.1 require
    'ext-tokenizer'                         => '*',
    'php'                                   => '>=5.4',
    // nikic/php-parser v2.1.1 require-dev
    'phpunit/phpunit'                       => '~4.0',
    // october/backend v1.0.417 require
    'composer/installers'                   => '~1.0',
    'october/rain'                          => '~1.0',
    'php'                                   => '>=5.5.9',
    // october/cms v1.0.417 require
    'composer/installers'                   => '~1.0',
    'october/rain'                          => '~1.0',
    'php'                                   => '>=5.5.9',
    // october/rain v1.0.417 require
    'doctrine/dbal'                         => '~2.4',
    'erusev/parsedown-extra'                => '~0.7',
    'jenssegers/date'                       => '~3.0',
    'kriswallsmith/assetic'                 => '~1.3',
    'leafo/scssphp'                         => '~0.6',
    'league/csv'                            => '~8.0',
    'linkorb/jsmin-php'                     => '~1.0',
    'oyejorge/less.php'                     => '~1.7',
    'php'                                   => '>=5.5.9',
    'symfony/yaml'                          => '2.8.*|3.0.*',
    'twig/twig'                             => '~1.30',
    // october/rain v1.0.417 require-dev
    'illuminate/database'                   => '5.1.*',
    'illuminate/events'                     => '5.1.*',
    'illuminate/filesystem'                 => '5.1.*',
    'illuminate/log'                        => '5.1.*',
    'illuminate/mail'                       => '5.1.*',
    'illuminate/pagination'                 => '5.1.*',
    'illuminate/queue'                      => '5.1.*',
    // october/system v1.0.417 require
    'composer/installers'                   => '~1.0',
    'october/rain'                          => '~1.0',
    'php'                                   => '>=5.5.9',
    // oyejorge/less.php v1.7.0.14 require
    'php'                                   => '>=5.3',
    // oyejorge/less.php v1.7.0.14 require-dev
    'phpunit/phpunit'                       => '~4.8.24',
    // paragonie / random_compat v1.4.2 require
    'php'                                   => '>=5.2.0',
    // paragonie / random_compat v1.4.2 require-dev
    'phpunit/phpunit'                       => '4.*|5.*',
    // psr/log 1.0.2 require
    'php'                                   => '>=5.3.0',
    // psy/psysh v0.7.2 require
    'dnoegel/php-xdg-base-dir'              => '0.1',
    'jakub-onderka/php-console-highlighter' => '0.3.*',
    'nikic/php-parser'                      => '^1.2.1|~2.0',
    'php'                                   => '>=5.3.9',
    'symfony/console'                       => '~2.3.10|^2.4.2|~3.0',
    'symfony/var-dumper'                    => '~2.7|~3.0',
    // psy/psysh v0.7.2 require-dev
    'fabpot/php-cs-fixer'                   => '~1.5',
    'phpunit/phpunit'                       => '~3.7|~4.0|~5.0',
    'squizlabs/php_codesniffer'             => '~2.0',
    'symfony/finder'                        => '~2.1|~3.0',
    // swiftmailer/swiftmailer v5.4.7 require
    'php'                                   => '>=5.3.3',
    // swiftmailer/swiftmailer v5.4.7 require-dev
    'mockery/mockery'                       => '~0.9.1',
    'symfony/phpunit-bridge'                => '~3.2',
    // symfony/console v2.7.26 require
    'php'                                   => '>=5.3.9',
    'symfony/debug'                         => '^2.7.2',
    // symfony/console v2.7.26 require-dev
    'psr/log'                               => '~1.0',
    'symfony/event-dispatcher'              => '~2.1',
    'symfony/process'                       => '~2.1',
    // symfony/css-selector v2.8.19 require
    'php'                                   => '>=5.3.9',
    // symfony/debug v2.7.26 require
    'php'                                   => '>=5.3.9',
    'psr/log'                               => '~1.0',
    // symfony/debug v2.7.26 require-dev
    'symfony/class-loader'                  => '~2.2',
    'symfony/http-kernel'                   => '~2.3.24|~2.5.9|^2.6.2',
    // symfony/dom-crawler v2.7.26 require
    'php'                                   => '>=5.3.9',
    // symfony/dom-crawler v2.7.26 require-dev
    'symfony/css-selector'                  => '~2.3',
    // symfony/event-dispatcher v2.8.19 require
    'php'                                   => '>=5.3.9',
    // symfony/event-dispatcher v2.8.19 require-dev
    'psr/log'                               => '~1.0',
    'symfony/config'                        => '^2.0.5|~3.0.0',
    'symfony/dependency-injection'          => '~2.6|~3.0.0',
    'symfony/expression-language'           => '~2.6|~3.0.0',
    'symfony/stopwatch'                     => '~2.3|~3.0.0',
    // symfony/finder v2.7.26 require
    'php'                                   => '>=5.3.9',
    // symfony/http-foundation v2.7.26 require
    'php'                                   => '>=5.3.9',
    'symfony/polyfill-mbstring'             => '~1.1',
    // symfony/http-foundation v2.7.26 require
    'symfony/expression-language'           => '~2.4',
    // symfony/http-kernel v2.7.26 require
    'php'                                   => '>=5.3.9',
    'psr/log'                               => '~1.0',
    'symfony/debug'                         => '^2.6.2',
    'symfony/event-dispatcher'              => '^2.6.7',
    'symfony/http-foundation'               => '~2.7.20|^2.8.13',
    // symfony/http-kernel v2.7.26 require-dev
    'symfony/browser-kit'                   => '~2.3',
    'symfony/class-loader'                  => '~2.1',
    'symfony/config'                        => '~2.7',
    'symfony/console'                       => '~2.3',
    'symfony/css-selector'                  => '^2.0.5',
    'symfony/dependency-injection'          => '~2.2',
    'symfony/dom-crawler'                   => '^2.0.5',
    'symfony/expression-language'           => '~2.4',
    'symfony/finder'                        => '^2.0.5',
    'symfony/process'                       => '^2.0.5',
    'symfony/routing'                       => '~2.2',
    'symfony/stopwatch'                     => '~2.3',
    // symfony/polyfill-mbstring v1.3.0 require
    'php'                                   => '>=5.3.3',
    // symfony/polyfill-util v1.3.0 require
    'php'                                   => '>=5.3.3',
    // symfony/process v2.7.26 require
    'php'                                   => '>=5.3.9',
    // symfony/routing v2.7.26 require
    'php'                                   => '>=5.3.9',
    // symfony/routing v2.7.26 require-dev
    'doctrine/annotations'                  => '~1.0',
    'doctrine/common'                       => '~2.2',
    'psr/log'                               => '~1.0',
    'symfony/config'                        => '~2.7',
    'symfony/expression-language'           => '~2.4',
    'symfony/http-foundation'               => '~2.3',
    'symfony/yaml'                          => '^2.0.5',
    // symfony/translation v2.7.26 require
    'php'                                   => '>=5.3.9',
    // symfony/translation v2.7.26 require-dev
    'psr/log'                               => '~1.0',
    'symfony/config'                        => '~2.7',
    'symfony/intl'                          => '~2.7.25|^2.8.18',
    'symfony/yaml'                          => '~2.2',
    // symfony/var-dumper v2.7.26 require
    'php'                                   => '>=5.3.9',
    // symfony/yaml v3.0.9 require
    'php'                                   => '>=5.5.9',
    // twig/twig v1.33.2 require
    'php'                                   => '>=5.2.7',
    // twig/twig v1.33.2 require-dev
    'psr/container'                         => '^1.0',
    'symfony/debug'                         => '~2.7',
    'symfony/phpunit-bridge'                => '~3.3@dev',
    // vlucas/phpdotenv v1.1.1 require
    'php'                                   => '>=5.3.2',
    // vlucas/phpdotenv v1.1.1 require-dev
    'phpunit/phpunit'                       => '~4.0',
    // wikimedia/composer-merge-plugin dev-master require
    'composer-plugin-api'                   => '^1.0',
    'php'                                   => '>=5.3.2',
    // wikimedia/composer-merge-plugin dev-master require-dev
    'composer/composer'                     => '~1.0.0',
    'jakub-onderka/php-parallel-lint'       => '~0.8',
    'phpunit/phpunit'                       => '~4.8|~5.0',
    'squizlabs/php_codesniffer'             => '~2.1.0',
    /*
    |-------------
    | PACKAGES DEV
    |-------------
    */
    // doctrine/instantiator 1.0.5 require
    'php'                                   => '>=5.3,<8.0-DEV',
    // doctrine/instantiator 1.0.5 require-dev
    'athletic/athletic'                     => '~0.1.8',
    'ext-pdo'                               => '*',
    'ext-phar'                              => '*',
    'phpunit/phpunit'                       => '~4.0',
    'squizlabs/php_codesniffer'             => '~2.0',
    // fzaninotto/faker v1.6.0 require
    'php'                                   => '^5.3.3|^7.0',
    // fzaninotto/faker v1.6.0 require-dev
    'ext-intl'                              => '*',
    'phpunit/phpunit'                       => '~4.0',
    'squizlabs/php_codesniffer'             => '~1.5',
    // phpdocumentor/reflection-common 1.0 require
    'php'                                   => '>=5.5',
    // phpdocumentor/reflection-common 1.0 require-dev
    'phpunit/phpunit'                       => '^4.6',
    // phpdocumentor/reflection-docblock 3.1.1 require
    'php'                                   => '>=5.5',
    'phpdocumentor/reflection-common'       => '^1.0@dev',
    'phpdocumentor/type-resolver'           => '^0.2.0',
    'webmozart/assert'                      => '^1.0',
    // phpdocumentor/reflection-docblock 3.1.1 require-dev
    'mockery/mockery'                       => '^0.9.4',
    'phpunit/phpunit'                       => '^4.4',
    // phpdocumentor/type-resolver 0.2.1 require
    'php'                                   => '>=5.5',
    'phpdocumentor/reflection-common'       => '^1.0',
    // phpdocumentor/type-resolver 0.2.1 require-dev
    'mockery/mockery'                       => '^0.9.4',
    'phpunit/phpunit'                       => '^5.2||^4.8.24',
    // phpspec/prophecy v1.7.0 require
    'doctrine/instantiator'                 => '^1.0.2',
    'php'                                   => '^5.3|^7.0',
    'phpdocumentor/reflection-docblock'     => '^2.0|^3.0.2',
    'sebastian/comparator'                  => '^1.1|^2.0',
    'sebastian/recursion-context'           => '^1.0|^2.0|^3.0',
    // phpspec/prophecy v1.7.0 require-dev
    'phpspec/phpspec'                       => '^2.5|^3.2',
    'phpunit/phpunit'                       => '^4.8 || ^5.6.5',
    // phpunit/php-code-coverage 2.2.4 require
    'php'                                   => '>=5.3.3',
    'phpunit/php-file-iterator'             => '~1.3',
    'phpunit/php-text-template'             => '~1.2',
    'phpunit/php-token-stream'              => '~1.3',
    'sebastian/environment'                 => '^1.3.2',
    'sebastian/version'                     => '~1.0',
    // phpunit/php-code-coverage 2.2.4 require-dev
    'ext-xdebug'                            => '>=2.1.4',
    'phpunit/phpunit'                       => '~4',
    // phpunit/php-file-iterator 1.4.2 require
    'php'                                   => '>=5.3.3',
    // phpunit/php-text-template 1.2.1 require
    'php'                                   => '>=5.3.3',
    // phpunit/php-timer 1.0.9 require
    'php'                                   => '^5.3.3 || ^7.0',
    // phpunit/php-timer 1.0.9 require-dev
    'phpunit/phpunit'                       => '^4.8.35 || ^5.7 || ^6.0',
    // phpunit/php-token-stream 1.4.11 require
    'ext-tokenizer'                         => '*',
    'php'                                   => '>=5.3.3',
    // phpunit/php-token-stream 1.4.11 require-dev
    'phpunit/phpunit'                       => '~4.2',
    // phpunit/phpunit 4.8.35 require
    'ext-dom'                               => '*',
    'ext-json'                              => '*',
    'ext-pcre'                              => '*',
    'ext-reflection'                        => '*',
    'ext-spl'                               => '*',
    'php'                                   => '>=5.3.3',
    'phpspec/prophecy'                      => '^1.3.1',
    'phpunit/php-code-coverage'             => '~2.1',
    'phpunit/php-file-iterator'             => '~1.4',
    'phpunit/php-text-template'             => '~1.2',
    'phpunit/php-timer'                     => '^1.0.6',
    'phpunit/phpunit-mock-objects'          => '~2.3',
    'sebastian/comparator'                  => '~1.2.2',
    'sebastian/diff'                        => '~1.2',
    'sebastian/environment'                 => '~1.3',
    'sebastian/exporter'                    => '~1.2',
    'sebastian/global-state'                => '~1.0',
    'sebastian/version'                     => '~1.0',
    'symfony/yaml'                          => '~2.1|~3.0',
    // phpunit/phpunit-mock-objects 2.3.8 require
    'doctrine/instantiator'                 => '^1.0.2',
    'php'                                   => '>=5.3.3',
    'phpunit/php-text-template'             => '~1.2',
    'sebastian/exporter'                    => '~1.2',
    // phpunit/phpunit-mock-objects 2.3.8 require-dev
    'phpunit/phpunit'                       => '~4.4',
    // phpunit/phpunit-selenium 1.4.2 require
    'ext-cur'                               => '*',
    'ext-do'                                => '*',
    'ph'                                    => '>=5.3.3',
    'phpunit/phpuni'                        => '~3.7|~4.0',
    'sebastian/comparato'                   => '~1.0',
    // sebastian/comparator 1.2.4 require
    'php'                                   => '>=5.3.3',
    'sebastian/diff'                        => '~1.2',
    'sebastian/exporter'                    => '~1.2 || ~2.0',
    // sebastian/comparator 1.2.4 require-dev
    'phpunit/phpunit'                       => '~4.4',
    // sebastian/diff 1.4.1 require
    'php'                                   => '>=5.3.3',
    // sebastian/diff 1.4.1 require-dev
    'phpunit/phpunit'                       => '~4.8',
    // sebastian/environment 1.3.8 require
    'php'                                   => '^5.3.3 || ^7.0',
    // sebastian/environment 1.3.8 require-dev
    'phpunit/phpunit'                       => '^4.8 || ^5.0',
    // sebastian/exporter 1.2.2 require
    'php'                                   => '>=5.3.3',
    'sebastian/recursion-context'           => '~1.0',
    // sebastian/exporter 1.2.2 require-dev
    'ext-mbstring'                          => '*',
    'phpunit/phpunit'                       => '~4.4',
    // sebastian/global-state 1.1.1 require
    'php'                                   => '>=5.3.3',
    // sebastian/global-state 1.1.1 require-dev
    'phpunit/phpunit'                       => '~4.2',
    // sebastian/recursion-context 1.0.5 require
    'php'                                   => '>=5.3.3',
    // sebastian/recursion-context 1.0.5 require-dev
    'phpunit/phpunit'                       => '~4.4',
    // ebmozart/assert 1.2.0 require
    'php'                                   => '^5.3.3 || ^7.0',
    // ebmozart/assert 1.2.0 require-dev
    'phpunit/phpunit'                       => '^4.6',
    'sebastian/version'                     => '^1.0.1',
];
LukeTowers commented 7 years ago

Pretty close @seanthepottingshed. We'll need to remove platform requirements (i.e. php,ext-mbstring, etc) as well as duplicates: twig/twig: '~1.23|~2.0' vs twig/twig: '~1.30' (although in that specific example octoberrain should be updated to require the same package versions that kriswallsmith/assetic does since that's what's actually required. I also don't think we'll need the require-dev ones either.

If you want to make those changes yourself, the please do them in a new comment instead of just editing the existing comment. Thanks for your work!

seanthepottingshed commented 7 years ago

@LukeTowers So platform requirements are just the actual require listings? Please excuse my ignorance, I usually just run composer install and hope things don't explode most of the time!

LukeTowers commented 7 years ago

the require are the regular requirements, the require-dev are requirements that are only for developing (usually phpunit) and shouldn't be installed on production

seanthepottingshed commented 7 years ago

Ahhh getting there... Will have another fettle tomorrow morning, thanks for the heads up.

norotaro commented 7 years ago

Based on @seanthepottingshed previous comment and after remove platform requirements and require-dev packages, I have the following: (please note that there is duplicated packages because I don't know how to deal with different package versions. Ex: 'nikic/php-parser' => '^1.0|^2.0|^3.0' and 'nikic/php-parser' => '^1.2.1|~2.0'. Bellow is a list of duplicated packages)

<?php
$baseOctoberDependencies = [
    'nikic/php-parser'                      => '^1.0|^2.0|^3.0', // classpreloader/classpreloader
    'nikic/php-parser'                      => '^1.2.1|~2.0', // psy/psysh
    'composer-plugin-api'                   => '^1.0', // composer/installers & wikimedia/composer-merge-plugin
    'doctrine/lexer'                        => '1.*', // doctrine/annotations
    'doctrine/annotations'                  => '1.*', // doctrine/common
    'doctrine/cache'                        => '1.*', // doctrine/common
    'doctrine/collections'                  => '1.*', // doctrine/common
    'doctrine/inflector'                    => '1.*', // doctrine/common
    'doctrine/inflector'                    => '~1.0', // laravel/framework
    'doctrine/common'                       => '>=2.4,<2.8-dev', // doctrine/dbal
    'erusev/parsedown'                      => '~1.4', // erusev/parsedown-extra
    'jakub-onderka/php-console-color'       => '~0.1', // jakub-onderka/php-console-highlighter
    'nesbot/carbon'                         => '^1.0', // jenssegers/date
    'nesbot/carbon'                         => '~1.19', // laravel/framework
    'symfony/translation'                   => '^2.7|^3.0', // jenssegers/date
    'symfony/polyfill-php56'                => '^1.0', // jeremeamia/SuperClosure
    'symfony/process'                       => '~2.1|~3.0', // kriswallsmith/assetic
    'symfony/process'                       => '2.7.*', // laravel/framework
    'classpreloader/classpreloader'         => '~2.0|~3.0', // laravel/framework
    'jeremeamia/superclosure'               => '~2.0', // laravel/framework
    'league/flysystem'                      => '~1.0', // laravel/framework
    'monolog/monolog'                       => '~1.11', // laravel/framework
    'mtdowling/cron-expression'             => '~1.0', // laravel/framework
    'paragonie/random_compat'               => '~1.4', // laravel/framework
    'psy/psysh'                             => '0.7.*', // laravel/framework
    'swiftmailer/swiftmailer'               => '~5.1', // laravel/framework
    'symfony/console'                       => '2.7.*', // laravel/framework
    'symfony/console'                       => '~2.3.10|^2.4.2|~3.0', // psy/psysh
    'symfony/css-selector'                  => '2.7.*|2.8.*', // laravel/framework
    'symfony/debug'                         => '2.7.*', // laravel/framework
    'symfony/debug'                         => '^2.7.2', // symfony/console
    'symfony/dom-crawler'                   => '2.7.*', // laravel/framework
    'symfony/finder'                        => '2.7.*', // laravel/framework
    'symfony/http-foundation'               => '2.7.*', // laravel/framework
    'symfony/http-foundation'               => '~2.7.20|^2.8.13', // symfony/http-kernel
    'symfony/http-kernel'                   => '2.7.*', // laravel/framework
    'symfony/routing'                       => '2.7.*', // laravel/framework
    'symfony/translation'                   => '2.7.*', // laravel/framework
    'symfony/translation'                   => '~2.6 || ~3.0', // nesbot/carbon
    'symfony/var-dumper'                    => '2.7.*', // laravel/framework
    'symfony/var-dumper'                    => '~2.7|~3.0', // psy/psysh
    'vlucas/phpdotenv'                      => '~1.0', // laravel/framework
    'psr/log'                               => '~1.0', // monolog/monolog & symfony/debug & symfony/http-kernel
    'composer/installers'                   => '~1.0', // october/backend & october/cms & october/system
    'october/rain'                          => '~1.0', // october/backend & october/cms & october/system
    'doctrine/dbal'                         => '~2.4', // october/rain
    'erusev/parsedown-extra'                => '~0.7', // october/rain
    'jenssegers/date'                       => '~3.0', // october/rain
    'kriswallsmith/assetic'                 => '~1.3', // october/rain
    'leafo/scssphp'                         => '~0.6', // october/rain
    'league/csv'                            => '~8.0', // october/rain
    'linkorb/jsmin-php'                     => '~1.0', // october/rain
    'oyejorge/less.php'                     => '~1.7', // october/rain
    'symfony/yaml'                          => '2.8.*|3.0.*', // october/rain
    'twig/twig'                             => '~1.30', // october/rain
    'dnoegel/php-xdg-base-dir'              => '0.1', // psy/psysh
    'jakub-onderka/php-console-highlighter' => '0.3.*', // psy/psysh
    'symfony/polyfill-mbstring'             => '~1.1', // symfony/http-foundation
    'symfony/expression-language'           => '~2.4', // symfony/http-foundation
    'symfony/debug'                         => '^2.6.2', // symfony/http-kernel
    'symfony/event-dispatcher'              => '^2.6.7', // symfony/http-kernel
];

Duplicated packages:

    'nikic/php-parser'                      => '^1.0|^2.0|^3.0', // classpreloader/classpreloader
    'nikic/php-parser'                      => '^1.2.1|~2.0', // psy/psysh

    'doctrine/inflector'                    => '1.*', // doctrine/common
    'doctrine/inflector'                    => '~1.0', // laravel/framework

    'nesbot/carbon'                         => '^1.0', // jenssegers/date
    'nesbot/carbon'                         => '~1.19', // laravel/framework

    'symfony/process'                       => '~2.1|~3.0', // kriswallsmith/assetic
    'symfony/process'                       => '2.7.*', // laravel/framework

    'symfony/console'                       => '2.7.*', // laravel/framework
    'symfony/console'                       => '~2.3.10|^2.4.2|~3.0', // psy/psysh

    'symfony/debug'                         => '2.7.*', // laravel/framework
    'symfony/debug'                         => '^2.7.2', // symfony/console

    'symfony/http-foundation'               => '2.7.*', // laravel/framework
    'symfony/http-foundation'               => '~2.7.20|^2.8.13', // symfony/http-kernel

    'symfony/translation'                   => '2.7.*', // laravel/framework
    'symfony/translation'                   => '~2.6 || ~3.0', // nesbot/carbon

    'symfony/var-dumper'                    => '2.7.*', // laravel/framework
    'symfony/var-dumper'                    => '~2.7|~3.0', // psy/psysh
seanthepottingshed commented 7 years ago

@norotaro you are a LEGEND, it was on my list of things to do today, so I really appreciate this ;o)

LukeTowers commented 7 years ago

Great job @norotaro, very much appreciated!

alvaro-canepa commented 6 years ago

It would be great to have the $baseOctoberDependencies on some setting or helper, based on installed build.
Maybe oc_dependencies() returns the array.

LukeTowers commented 6 years ago

@alvaro-canepa propose the implementation of such a function. I'm imagining a plugin that scans the composer.json / composer.lock files to get the currently installed versions of the dependencies used by the project.

alvaro-canepa commented 6 years ago

@LukeTowers I like the idea, a simple plugin, but need to have a updated list, for OC installation without composer. In all my works, I never use the shell to install October as a composer project, I prefer the UI installer. But I don't have composer.json / composer.lock. In that case, the plugin must have a prebuilder array with OC build number as key.

Sorry my English.

LukeTowers commented 6 years ago

@alvaro-canepa fair enough. Perhaps the solution is to have the installer leave the composer.lock in the update package as a part of the build process so that it would be accessible to the plugin. We're not going to want to manually maintain such a list.

github-actions[bot] commented 5 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.

github-actions[bot] commented 5 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.

daftspunk commented 5 years ago

There isn't really a usable list here, the most recent provided contains duplicated keys which would not work. I don't think. Can someone provide the final copy that is agreed upon?

LukeTowers commented 5 years ago

@daftspunk @bennothommo we'll have to update the list after the L6 upgrade anyways, a few of those dependencies have changed since this was first posted.

github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.

github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days.

github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days.

github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

LukeTowers commented 4 years ago

@daftspunk this is the latest update:

"composer/installers" => "v1.8.0",
     "dnoegel/php-xdg-base-dir" => "v0.1.1",
     "doctrine/cache" => "1.10.0",
     "doctrine/dbal" => "v2.10.1",
     "doctrine/event-manager" => "1.1.0",
     "doctrine/inflector" => "1.3.1",
     "doctrine/lexer" => "1.2.0",
     "dragonmantank/cron-expression" => "v2.3.0",
     "egulias/email-validator" => "2.1.17",
     "erusev/parsedown" => "1.7.4",
     "erusev/parsedown-extra" => "0.8.1",
     "jakub-onderka/php-console-color" => "v0.2",
     "jakub-onderka/php-console-highlighter" => "v0.4",
     "jenssegers/date" => "v3.5.0",
     "laravel/framework" => "v6.18.3",
     "laravel/tinker" => "v1.0.10",
     "league/commonmark" => "1.3.2",
     "league/csv" => "8.2.3",
     "league/flysystem" => "1.0.66",
     "linkorb/jsmin-php" => "1.0.0",
     "monolog/monolog" => "2.0.2",
     "nesbot/carbon" => "2.32.1",
     "nikic/php-parser" => "v4.3.0",
     "opis/closure" => "3.5.1",
     "paragonie/random_compat" => "v9.99.99",
     "phpoption/phpoption" => "1.7.3",
     "psr/container" => "1.0.0",
     "psr/log" => "1.1.3",
     "psr/simple-cache" => "1.0.1",
     "psy/psysh" => "v0.9.12",
     "ramsey/uuid" => "3.9.3",
     "scssphp/scssphp" => "1.0.8",
     "swiftmailer/swiftmailer" => "v6.2.3",
     "symfony/console" => "v4.4.6",
     "symfony/css-selector" => "v4.4.6",
     "symfony/debug" => "v4.4.6",
     "symfony/error-handler" => "v4.4.6",
     "symfony/event-dispatcher" => "v4.4.6",
     "symfony/event-dispatcher-contracts" => "v1.1.7",
     "symfony/finder" => "v4.4.6",
     "symfony/http-foundation" => "v4.4.6",
     "symfony/http-kernel" => "v4.4.6",
     "symfony/mime" => "v4.4.6",
     "symfony/polyfill-ctype" => "v1.15.0",
     "symfony/polyfill-iconv" => "v1.15.0",
     "symfony/polyfill-intl-idn" => "v1.15.0",
     "symfony/polyfill-mbstring" => "v1.15.0",
     "symfony/polyfill-php72" => "v1.15.0",
     "symfony/polyfill-php73" => "v1.15.0",
     "symfony/process" => "v4.4.6",
     "symfony/routing" => "v4.4.6",
     "symfony/service-contracts" => "v1.1.8",
     "symfony/translation" => "v4.4.6",
     "symfony/translation-contracts" => "v1.1.7",
     "symfony/var-dumper" => "v4.4.6",
     "symfony/yaml" => "v3.4.38",
     "tijsverkoyen/css-to-inline-styles" => "2.2.2",
     "twig/twig" => "v2.12.5",
     "vlucas/phpdotenv" => "v3.6.2",
     "wikimedia/composer-merge-plugin" => "dev-master",
     "wikimedia/less.php" => "v2.0.0",

This was obtained by installing a new copy of October via composer, switching it to L6 branches, running composer update --no-dev, and then using the following code in Tinkerwell:

$composer = json_decode(file_get_contents('composer.lock'));

$included = [];

foreach ($composer->packages as $package) {
  $included[$package->name] = $package->version;
}

$included;
bennothommo commented 4 years ago

@daftspunk A list of Illuminate libraries to replace too:

'illuminate/auth' => '6.0',
'illuminate/broadcasting' => '6.0',
'illuminate/bus' => '6.0',
'illuminate/cache' => '6.0',
'illuminate/config' => '6.0',
'illuminate/console' => '6.0',
'illuminate/container' => '6.0',
'illuminate/contracts' => '6.0',
'illuminate/cookie' => '6.0',
'illuminate/database' => '6.0',
'illuminate/encryption' => '6.0',
'illuminate/events' => '6.0',
'illuminate/filesystem' => '6.0',
'illuminate/hashing' => '6.0',
'illuminate/http' => '6.0',
'illuminate/log' => '6.0',
'illuminate/mail' => '6.0',
'illuminate/notifications' => '6.0',
'illuminate/pagination' => '6.0',
'illuminate/pipeline' => '6.0',
'illuminate/queue' => '6.0',
'illuminate/redis' => '6.0',
'illuminate/routing' => '6.0',
'illuminate/session' => '6.0',
'illuminate/support' => '6.0',
'illuminate/testing' => '6.0',
'illuminate/translation' => '6.0',
'illuminate/validation' => '6.0',
'illuminate/view' => '6.0',

Could we also get the following ignored by the Marketplace build as well:

'october/rain' => '1.0',
'october/system' => '1.0',
'october/cms' => '1.0',
'october/backend' => '1.0',
github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

LukeTowers commented 4 years ago

This needs to be completed before L6 goes live

LukeTowers commented 4 years ago

@daftspunk final results for v1.1.0:

"composer/installers" => "v1.9.0",
"dnoegel/php-xdg-base-dir" => "v0.1.1",
"doctrine/cache" => "1.10.2",
"doctrine/dbal" => "2.10.3",
"doctrine/event-manager" => "1.1.1",
"doctrine/inflector" => "2.0.3",
"doctrine/lexer" => "1.2.1",
"dragonmantank/cron-expression" => "v2.3.0",
"egulias/email-validator" => "2.1.20",
"erusev/parsedown" => "1.7.4",
"erusev/parsedown-extra" => "0.8.1",
"laravel/framework" => "v6.18.38",
"laravel/tinker" => "v2.4.2",
"league/commonmark" => "1.5.4",
"league/csv" => "9.5.0",
"league/flysystem" => "1.0.70",
"linkorb/jsmin-php" => "1.0.0",
"monolog/monolog" => "2.1.1",
"nesbot/carbon" => "2.39.1",
"nikic/php-parser" => "v4.9.1",
"october/backend" => "v1.1.0",
"october/cms" => "v1.1.0",
"october/rain" => "v1.1.0",
"october/system" => "v1.1.0",
"opis/closure" => "3.5.7",
"paragonie/random_compat" => "v9.99.99",
"phpoption/phpoption" => "1.7.5",
"psr/container" => "1.0.0",
"psr/log" => "1.1.3",
"psr/simple-cache" => "1.0.1",
"psy/psysh" => "v0.10.4",
"ramsey/uuid" => "3.9.3",
"scssphp/scssphp" => "1.2",
"swiftmailer/swiftmailer" => "v6.2.3",
"symfony/console" => "v4.4.13",
"symfony/css-selector" => "v4.4.13",
"symfony/debug" => "v4.4.13",
"symfony/error-handler" => "v4.4.13",
"symfony/event-dispatcher" => "v4.4.13",
"symfony/event-dispatcher-contracts" => "v1.1.9",
"symfony/finder" => "v4.4.13",
"symfony/http-foundation" => "v4.4.13",
"symfony/http-kernel" => "v4.4.13",
"symfony/mime" => "v4.4.13",
"symfony/polyfill-ctype" => "v1.18.1",
"symfony/polyfill-iconv" => "v1.18.1",
"symfony/polyfill-intl-idn" => "v1.18.1",
"symfony/polyfill-intl-normalizer" => "v1.18.1",
"symfony/polyfill-mbstring" => "v1.18.1",
"symfony/polyfill-php70" => "v1.18.1",
"symfony/polyfill-php72" => "v1.18.1",
"symfony/polyfill-php73" => "v1.18.1",
"symfony/polyfill-php80" => "v1.18.1",
"symfony/process" => "v4.4.13",
"symfony/routing" => "v4.4.13",
"symfony/service-contracts" => "v1.1.9",
"symfony/translation" => "v4.4.13",
"symfony/translation-contracts" => "v1.1.9",
"symfony/var-dumper" => "v4.4.13",
"symfony/yaml" => "v3.4.44",
"tijsverkoyen/css-to-inline-styles" => "2.2.3",
"twig/twig" => "v2.13.1",
"vlucas/phpdotenv" => "v3.6.7",
"wikimedia/composer-merge-plugin" => "v1.4.1",
"wikimedia/less.php" => "v2.0.0",
"illuminate/auth" => "v6.18.38",
"illuminate/broadcasting" => "v6.18.38",
"illuminate/bus" => "v6.18.38",
"illuminate/cache" => "v6.18.38",
"illuminate/config" => "v6.18.38",
"illuminate/console" => "v6.18.38",
"illuminate/container" => "v6.18.38",
"illuminate/contracts" => "v6.18.38",
"illuminate/cookie" => "v6.18.38",
"illuminate/database" => "v6.18.38",
"illuminate/encryption" => "v6.18.38",
"illuminate/events" => "v6.18.38",
"illuminate/filesystem" => "v6.18.38",
"illuminate/hashing" => "v6.18.38",
"illuminate/http" => "v6.18.38",
"illuminate/log" => "v6.18.38",
"illuminate/mail" => "v6.18.38",
"illuminate/notifications" => "v6.18.38",
"illuminate/pagination" => "v6.18.38",
"illuminate/pipeline" => "v6.18.38",
"illuminate/queue" => "v6.18.38",
"illuminate/redis" => "v6.18.38",
"illuminate/routing" => "v6.18.38",
"illuminate/session" => "v6.18.38",
"illuminate/support" => "v6.18.38",
"illuminate/translation" => "v6.18.38",
"illuminate/validation" => "v6.18.38",
"illuminate/view" => "v6.18.38",
github-actions[bot] commented 4 years ago

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

daftspunk commented 3 years ago

This will no longer be a requirement in the next update. Cheers all