Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#166] Trim composer.json down to bare minimum. #203

Merged
merged 2 commits into from Jul 15, 2019

Conversation

jacine
Copy link
Contributor

@jacine jacine commented Jul 11, 2019

Needs testing, but I believe all of this can be removed.

@googlebot googlebot added the cla: yes Indicates CLA has been signed label Jul 11, 2019
@jacine jacine changed the title #166: Trim composer.json down to bare minimum. [#166]: Trim composer.json down to bare minimum. Jul 11, 2019
@jacine jacine changed the title [#166]: Trim composer.json down to bare minimum. [#166] Trim composer.json down to bare minimum. Jul 11, 2019
@jacine
Copy link
Contributor Author

jacine commented Jul 12, 2019

I tested this PR using the following steps, and it works:

  1. Clone the composer project git clone git@github.com:apigee/devportal-kickstart-project-composer.git kickstart
  2. Edit composer.json and add the following patch:
    "patches": {
      "apigee/apigee_devportal_kickstart": {
        "Trim composer.json down to bare minimum. ": "https://patch-diff.githubusercontent.com/raw/apigee/apigee-devportal-kickstart-drupal/pull/203.diff"
      }
    }
  1. Run composer require apigee/apigee_devportal_kickstart:dev-8.x-1.x. This will pull in the kickstart with this PR applied.

@kscheirer
Copy link
Contributor

Are you going to need "minimum-stability": "dev"? The default w/o that is stable, which caused my composer to refuse to install apigee_api_catalog (1.0-beta2). I didn't test this patch specifically though, that happened while working on something else.

@jacine
Copy link
Contributor Author

jacine commented Jul 15, 2019

Are you going to need "minimum-stability": "dev"? The default w/o that is stable, which caused my composer to refuse to install apigee_api_catalog (1.0-beta2). I didn't test this patch specifically though, that happened while working on something else.

No, we don't need this. We have it in the composer project, and that's where it actually works.

@jacine
Copy link
Contributor Author

jacine commented Jul 15, 2019

Here is the log of what happens when you install via the steps described here:

$ composer require apigee/apigee_devportal_kickstart:dev-8.x-1.x
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 108 installs, 0 updates, 0 removals
  - Installing cweagans/composer-patches (1.6.6): Loading from cache
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing composer/installers (v1.6.0): Loading from cache
  - Installing composer/semver (1.5.0): Loading from cache
  - Installing drupal-composer/drupal-scaffold (2.6.1): Loading from cache
  - Installing brumann/polyfill-unserialize (v1.0.4): Downloading (100%)
  - Installing typo3/phar-stream-wrapper (v2.1.2): Loading from cache
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing symfony/polyfill-php70 (v1.11.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.11.0): Loading from cache
  - Installing symfony/http-foundation (v3.4.29): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/dependency-injection (v3.4.29): Loading from cache
  - Installing symfony/polyfill-ctype (v1.11.0): Loading from cache
  - Installing twig/twig (v1.42.2): Loading from cache
  - Installing pear/pear_exception (v1.0.0): Loading from cache
  - Installing pear/console_getopt (v1.4.2): Loading from cache
  - Installing pear/pear-core-minimal (v1.10.9): Loading from cache
  - Installing pear/archive_tar (1.4.7): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Installing symfony/debug (v4.3.2): Loading from cache
  - Installing symfony/event-dispatcher (v3.4.29): Loading from cache
  - Installing symfony/http-kernel (v3.4.29): Loading from cache
  - Installing asm89/stack-cors (1.2.0): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing zendframework/zend-diactoros (1.8.6): Loading from cache
  - Installing symfony/psr-http-message-bridge (v1.2.0): Loading from cache
  - Installing masterminds/html5 (2.6.0): Loading from cache
  - Installing doctrine/lexer (1.0.2): Loading from cache
  - Installing egulias/email-validator (2.1.9): Loading from cache
  - Installing stack/builder (v1.0.5): Loading from cache
  - Installing zendframework/zend-stdlib (3.2.1): Loading from cache
  - Installing zendframework/zend-escaper (2.6.0): Loading from cache
  - Installing zendframework/zend-feed (2.12.0): Loading from cache
  - Installing easyrdf/easyrdf (0.9.1): Loading from cache
  - Installing symfony/routing (v3.4.29): Loading from cache
  - Installing symfony-cmf/routing (1.4.1): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.3.3): Loading from cache
  - Installing doctrine/annotations (v1.6.1): Loading from cache
  - Installing doctrine/reflection (v1.0.0): Loading from cache
  - Installing doctrine/event-manager (v1.0.0): Loading from cache
  - Installing doctrine/collections (v1.6.2): Loading from cache
  - Installing doctrine/cache (v1.8.0): Loading from cache
  - Installing doctrine/persistence (1.1.1): Loading from cache
  - Installing doctrine/inflector (v1.3.0): Loading from cache
  - Installing doctrine/common (v2.10.0): Loading from cache
  - Installing symfony/yaml (v3.4.29): Loading from cache
  - Installing symfony/polyfill-iconv (v1.11.0): Loading from cache
  - Installing symfony/process (v3.4.29): Loading from cache
  - Installing symfony/translation (v3.4.29): Loading from cache
  - Installing symfony/validator (v3.4.29): Loading from cache
  - Installing symfony/serializer (v3.4.29): Loading from cache
  - Installing symfony/console (v3.4.29): Loading from cache
  - Installing symfony/class-loader (v3.4.29): Loading from cache
  - Installing drupal/core (8.7.4): Loading from cache
  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/2018-07-05/2943172-kernel-test-base-3.patch (https://www.drupal.org/project/drupal/issues/2943172)

  - Installing webmozart/assert (1.4.0): Loading from cache
  - Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
  - Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (4.3.1): Loading from cache
  - Installing drupal/file_link (1.6.0): Loading from cache
  - Installing php-http/promise (v1.0.0): Loading from cache
  - Installing php-http/httplug (v1.1.0): Loading from cache
  - Installing php-http/guzzle6-adapter (v1.1.1): Loading from cache
  - Installing symfony/options-resolver (v4.3.2): Loading from cache
  - Installing clue/stream-filter (v1.4.1): Loading from cache
  - Installing php-http/message-factory (v1.0.2): Loading from cache
  - Installing php-http/message (1.7.2): Loading from cache
  - Installing php-http/client-common (1.9.1): Loading from cache
  - Installing symfony/inflector (v4.3.2): Loading from cache
  - Installing symfony/property-info (v4.3.2): Loading from cache
  - Installing symfony/property-access (v4.3.2): Loading from cache
  - Installing php-http/discovery (1.7.0): Loading from cache
  - Installing league/period (3.4.0): Loading from cache
  - Installing fightbulc/moment (1.30.0): Loading from cache
  - Installing apigee/apigee-client-php (2.0.3): Loading from cache
  - Installing drupal/key (1.8.0): Loading from cache
  - Installing drupal/entity (1.0.0-rc3): Loading from cache
  - Installing drupal/apigee_edge (1.0.0): Loading from cache
  - Installing drupal/apigee_api_catalog (1.0.0-rc2): Loading from cache
  - Installing drupal/components (1.1.0): Loading from cache
  - Installing drupal/radix (4.3.0): Loading from cache
  - Installing drupal/entity_reference_revisions (1.6.0): Loading from cache
  - Installing drupal/paragraphs (1.8.0): Loading from cache
  - Installing drupal/fontawesome (2.13.0): Loading from cache
  - Installing drupal/better_exposed_filters (3.0.0-alpha6): Loading from cache
  - Applying patches for drupal/better_exposed_filters
    https://www.drupal.org/files/issues/2018-10-05/bef-summary-attributes-3001967-4.patch (Fix issue with #summary_details introduced in Drupal 8.6.x)

  - Installing drupal/admin_toolbar (1.27.0): Loading from cache
  - Installing drupal/adminimal_admin_toolbar (1.9.0): Loading from cache
  - Installing drupal/token (1.5.0): Loading from cache
  - Installing drupal/ctools (3.2.0): Loading from cache
  - Installing drupal/pathauto (1.4.0): Loading from cache
  - Installing drupal/default_content (1.0.0-alpha8): Loading from cache
  - Installing apigee/apigee_devportal_kickstart (dev-8.x-1.x c27c6f0): Cloning c27c6f01ab from cache
  - Applying patches for apigee/apigee_devportal_kickstart
    https://patch-diff.githubusercontent.com/raw/apigee/apigee-devportal-kickstart-drupal/pull/203.diff (Trim composer.json down to bare minimum. )

  - Installing webmozart/path-util (2.3.0): Loading from cache
  - Installing webflo/drupal-finder (1.1.0): Loading from cache
  - Installing pear/console_table (v1.3.1): Loading from cache
  - Installing symfony/finder (v3.4.29): Loading from cache
  - Installing symfony/var-dumper (v3.4.29): Loading from cache
  - Installing dflydev/dot-access-data (v1.1.0): Loading from cache
  - Installing consolidation/output-formatters (3.5.0): Loading from cache
  - Installing consolidation/annotated-command (2.12.0): Loading from cache
  - Installing jakub-onderka/php-console-color (v0.2): Loading from cache
  - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache
  - Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
  - Installing nikic/php-parser (v4.2.2): Loading from cache
  - Installing psy/psysh (v0.9.9): Loading from cache
  - Installing drush/drush (8.3.0): Loading from cache
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/dependency-injection suggests installing symfony/config
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
pear/archive_tar suggests installing ext-xz (Lzma2 compression support.)
symfony/http-kernel suggests installing symfony/browser-kit
symfony/http-kernel suggests installing symfony/config
symfony/psr-http-message-bridge suggests installing nyholm/psr7 (For a super lightweight PSR-7/17 implementation)
zendframework/zend-feed suggests installing zendframework/zend-cache (Zend\Cache component, for optionally caching feeds between requests)
zendframework/zend-feed suggests installing zendframework/zend-db (Zend\Db component, for use with PubSubHubbub)
zendframework/zend-feed suggests installing zendframework/zend-http (Zend\Http for PubSubHubbub, and optionally for use with Zend\Feed\Reader)
zendframework/zend-feed suggests installing zendframework/zend-servicemanager (Zend\ServiceManager component, for easily extending ExtensionManager implementations)
zendframework/zend-feed suggests installing zendframework/zend-validator (Zend\Validator component, for validating email addresses used in Atom feeds and entries when using the Writer subcomponent)
easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
symfony/translation suggests installing symfony/config
symfony/validator suggests installing psr/cache-implementation (For using the metadata cache.)
symfony/validator suggests installing symfony/intl
symfony/validator suggests installing symfony/config
symfony/validator suggests installing symfony/expression-language (For using the Expression validator)
symfony/serializer suggests installing psr/cache-implementation (For using the metadata cache.)
symfony/serializer suggests installing symfony/config (For using the XML mapping loader.)
symfony/console suggests installing symfony/lock
symfony/class-loader suggests installing symfony/polyfill-apcu (For using ApcClassLoader on HHVM)
php-http/message suggests installing slim/slim (Used with Slim Framework PSR-7 implementation)
php-http/client-common suggests installing php-http/logger-plugin (PSR-3 Logger plugin)
php-http/client-common suggests installing php-http/cache-plugin (PSR-6 Cache plugin)
php-http/client-common suggests installing php-http/stopwatch-plugin (Symfony Stopwatch plugin)
symfony/property-info suggests installing psr/cache-implementation (To cache results)
symfony/property-info suggests installing symfony/doctrine-bridge (To use Doctrine metadata)
symfony/property-access suggests installing psr/cache-implementation (To cache access methods.)
php-http/discovery suggests installing puli/composer-plugin (Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details.)
drupal/paragraphs suggests installing drupal/entity_browser (Recommended for an improved user experience when using the Paragraphs library module)
pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
symfony/var-dumper suggests installing ext-symfony_debug
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
drush/drush suggests installing ext-pcntl (*)
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
Writing lock file
Generating autoload files
  - .csslintrc (https://git.drupalcode.org/project/drupal/raw/8.7.4/.csslintrc): Downloading (100%)
  - .editorconfig (https://git.drupalcode.org/project/drupal/raw/8.7.4/.editorconfig): Downloading (100%)
  - .eslintignore (https://git.drupalcode.org/project/drupal/raw/8.7.4/.eslintignore): Downloading (100%)
  - .eslintrc.json (https://git.drupalcode.org/project/drupal/raw/8.7.4/.eslintrc.json): Downloading (100%)
  - .gitattributes (https://git.drupalcode.org/project/drupal/raw/8.7.4/.gitattributes): Downloading (100%)
  - .ht.router.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/.ht.router.php): Downloading (100%)
  - .htaccess (https://git.drupalcode.org/project/drupal/raw/8.7.4/.htaccess): Downloading (100%)
  - index.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/index.php): Downloading (100%)
  - robots.txt (https://git.drupalcode.org/project/drupal/raw/8.7.4/robots.txt): Downloading (100%)
  - sites/default/default.services.yml (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/default/default.services.yml): Downloading (100%)
  - sites/default/default.settings.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/default/default.settings.php): Downloading (100%)
  - sites/development.services.yml (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/development.services.yml): Downloading (100%)    - sites/example.settings.local.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/example.settings.local.php): Downloading (100%)
  - sites/example.sites.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/example.sites.php): Downloading (100%)
  - update.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/update.php): Downloading (100%)
  - web.config (https://git.drupalcode.org/project/drupal/raw/8.7.4/web.config): Downloading (100%)
> DrupalComposer\DrupalScaffold\Plugin::scaffold
  - .csslintrc (https://git.drupalcode.org/project/drupal/raw/8.7.4/.csslintrc): Downloading (100%)
  - .editorconfig (https://git.drupalcode.org/project/drupal/raw/8.7.4/.editorconfig): Downloading (100%)
  - .eslintignore (https://git.drupalcode.org/project/drupal/raw/8.7.4/.eslintignore): Downloading (100%)
  - .eslintrc.json (https://git.drupalcode.org/project/drupal/raw/8.7.4/.eslintrc.json): Downloading (100%)
  - .gitattributes (https://git.drupalcode.org/project/drupal/raw/8.7.4/.gitattributes): Downloading (100%)
  - .ht.router.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/.ht.router.php): Downloading (100%)
  - .htaccess (https://git.drupalcode.org/project/drupal/raw/8.7.4/.htaccess): Downloading (100%)
  - index.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/index.php): Downloading (100%)
  - robots.txt (https://git.drupalcode.org/project/drupal/raw/8.7.4/robots.txt): Downloading (100%)
  - sites/default/default.services.yml (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/default/default.services.yml): Downloading (100%)
  - sites/default/default.settings.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/default/default.settings.php): Downloading (100%)
  - sites/development.services.yml (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/development.services.yml): Downloading (100%)    - sites/example.settings.local.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/example.settings.local.php): Downloading (100%)
  - sites/example.sites.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/sites/example.sites.php): Downloading (100%)
  - update.php (https://git.drupalcode.org/project/drupal/raw/8.7.4/update.php): Downloading (100%)
  - web.config (https://git.drupalcode.org/project/drupal/raw/8.7.4/web.config): Downloading (100%)

composer.json Outdated
"patchLevel": {
"drupal/core": "-p2"
},
"enable-patching": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this also needed in this project? I think it's only read in the main composer project to enable patching from subprojects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @arlina-espinoza! 😄 I pushed an update to remove it.

Copy link
Contributor

@arlina-espinoza arlina-espinoza left a comment

Choose a reason for hiding this comment

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

All looks good. Thanks @jacine :)

@jacine jacine merged commit 6cea4c6 into apigee:8.x-1.x Jul 15, 2019
@jacine jacine deleted the 166-composer-cleanup branch July 15, 2019 18:57
@jacine jacine added this to the 8.x-1.3 milestone Jul 16, 2019
@prophet108
Copy link

I tested this and it works perfectly! Thank you very much.

@jacine
Copy link
Contributor Author

jacine commented Jul 17, 2019

I tested this and it works perfectly! Thank you very much.

That's great @prophet108! Thanks for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates CLA has been signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants