How to use composer for installation profile?

I have a Drupal 8 installation profile with custom modules and themes and I am wondering how should I use composer so that I can run it and drupal core and other dependencies(like contrib modules) would get properly downloaded(and also Drupal’s cusom composer stuff would get properly applied as well)?

Is this possible at this time or the composer approach is still not complete?

Hyperledger composer blockchain updating endorsement policy

I am new to hyperledger. Have installed hyperledger 1.4. I use the composer to create .bna file and have been successful in installing it to a two org business network. I had used a specific endorsement policy on the install. I would like to update the policy. Is there a way to do it without having to install a new version of network? Endorsement policy is given during network start. How do I stop the existing business network and start it again with new endorsement policy?

Why is composer trying to install the Drupal 8.2.x-dev branch?

If I run composer install, I get…

Your requirements could not be resolved to an installable set of packages.    Problem 1     - drupal/core 8.2.x-dev requires symfony/psr-http-message-bridge v0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2] but these conflict with your requirements or minimum-stability. 

However, in the require section of my composer.json, I have…

"drupal/core": "8.6.13" 

So why is composer trying to install 8.2.x-dev?

Unable to apply patch using composer in Drupal core 8.6.4

I am unable to apply patch using composer in Drupal core 8.6.4. Can anyone help me to apply patch using composer? Here is process what i am doing :

"extra": { "enable-patching": true, "_readme": [ "By default Drupal loads the autoloader from ./vendor/autoload.php.", "To change the autoloader you can edit ./autoload.php.", "This file specifies the packages.drupal.org repository.", "You can read more about this composer repository at:", "https://www.drupal.c/node/2718229" ], "merge-plugin": { "include": [ "core/composer.json" ], "recurse": true, "replace": false, "merge-extra": false }, "installer-paths": { "core": ["type:drupal-core"], "modules/contrib/{$  name}": ["type:drupal-module"], "profiles/contrib/{$  name}": ["type:drupal-profile"], "themes/contrib/{$  name}": ["type:drupal-theme"], "drush/contrib/{$  name}": ["type:drupal-drush"], "modules/custom/{$  name}": ["type:drupal-custom-module"], "themes/custom/{$  name}": ["type:drupal-custom-theme"] }, "patches": { "drupal/core": { "Patch for View output used for entity reference options.": "https://www.drupal.org/files/issues/2019-01-10/2174633-238.patch" } } } 

Command: composer install – but nothing happens.

Thanks in advance.

Composer autoload

Estou com problemas na hr de adicionar uma class ao meu autoload, fica dando Class Routes not found! Alguém poderia me ajuda?

inserir a descrição da imagem aqui

composer.json

"autoload": {     "psr-4": {         "App\Http\Controllers\": "app/Http/Controllers/"     } }, 

Routes.php

<?php  namespace App\Http\Controllers;  class Routes {      public function route() {         return 'Ola';     }  } 

index.php

<?php  require 'vendor/autoload.php';  use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; use App\Http\Controllers;  $  mail = new PHPMailer(true); $  route = new Routes();  dd($  route->route()); 

Revert back to the previous dev version of a module using composer

Current last dev release of the Field Group module for drupal 8 was out on (29 Mar 2019). However, I need to download the previous dev version before the dev version release mentioned above.

The last dev release was out on (29 Mar 2019)

but I need the previous dev version which was out on (10 May 2017)

It is important for me to record this specific dev version in composer.json file so the same dev version of the module will be used on all environments.

How can I do that ?

Note: i can use any of Composer, Git or Drush commands.

Composer PHP issue

I’m trying to upgrade to Magento 2.3.1 and I’m running into a problem. I was on PHP 7.1.3 and noticed in the system requirements that it requires 7.1.3 and 7.2.X. We’ve upgraded the server PHP version to 7.2.16.

Running composer update after doing the other steps brings up this error:

[user@machine public_html]$   composer update Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 138 installs, 163 updates, 0 removals   - Installing magento/inventory-composer-installer (1.1.0): Loading from cache  Warning: Unsupported declare 'strict_types' in /home/site/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 6  Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/site/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 55 

Running $ php -v returns this info:

[user@machine public_html]$   php -v PHP 7.2.16 (cli) (built: Mar 25 2019 18:26:43) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies 

and in my composer.json I have:

... etc ... "config": {     "platform": {         "php": "7.2.16"     },     "use-include-path": true }, ... etc ... 

I’ve scoured the internet and it all leads back to upgrade PHP version – which … it is. What step am I missing?

Magento 2 Difference between git and composer patch and the errors faced in applying PRODSECBUG-2198

What is the difference between composer and git patch? Whether only the Magento file path is the difference between the two? Is there any major difference? What are the errors faced in applying PRODSECBUG-2198 patch? I applied the composer patch for Magento 2.1.15 using command patch –p0 < PRODSECBUG-2198-2.1-CE.composer.patch and it got applied without any errors, but the patch.applied.list file in app/etc was not created. Whereas when I tried to apply the patch for Magento 2.2.3 version the patch wasn’ t applied to cause many issues related with paths. Have anyone applied this patches for Magento 2.2+ versions please share the process you have followed.

Site works ok but composer complains about unmet requirements. Do I have a problem?

I am trying to get my permissions right, so I don’t have to run composer as root. As part of this process, I deleted vendor, core and composer.lock and ran composer install with my non-root user. The site appears to be working fine, despite this message composer displayed:

  Problem 1     - drupal/core 8.2.x-dev requires symfony/psr-http-message-bridge v0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2] but these conflict with your requirements or minimum-stability.     - don't install drupal/core-render 8.2.0|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.0-beta1|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.0-beta2|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.0-beta3|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.0-rc1|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.0-rc2|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.1|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.2|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.3|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.4|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.5|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.6|remove drupal/drupal dev-master     - don't install drupal/core-render 8.2.7|remove drupal/drupal dev-master      etcetera 

What does this mean? Is my site OK, or did I take a wrong turn?

I’m not sure why the composer message references “drupal/core 8.2.x-dev”. Here is the “require” section of my composer.json:

"require": {     "composer/installers": "^1.0.24",     "wikimedia/composer-merge-plugin": "^1.4",     "drupal/entity_clone": "^1.0@beta",     "drupal/features": "^3.8",     "drupal/metatag": "^1.8",     "drupal/webform": "^5.1",     "drupal/config_installer": "^1.8",     "drupal/entity_browser": "^2.1",     "drupal/media_entity_browser": "^1.0@beta",     "drupal/entity_embed": "^1.0@beta",     "drupal/file_browser": "^1.1",     "drupal/admin_menu_search": "^1.0",     "drupal/admin_toolbar": "^1.26",     "drupal/backup_migrate": "^4.0",     "drupal/block_field": "^1.0@alpha",     "drupal/contact_block": "^1.4",     "drupal/contribute": "^5.0@beta",     "drupal/ctools": "^3.2",     "drupal/entity_reference_revisions": "^1.6",     "drupal/facets": "^1.3",     "drupal/field_group": "^1.0",     "drupal/form_placeholder": "^1.0",     "drupal/formblock": "^1.0@beta",     "drupal/glazed_helper": "^1.3",     "drupal/google_analytics": "^3.0",     "drupal/honeypot": "^1.29",     "drupal/imce": "^1.7",     "drupal/insert_block": "1.x-dev",     "drupal/linkit": "^4.3",     "drupal/login_emailusername": "^1.1",     "drupal/material_admin": "^1.0@alpha",     "drupal/menu_link_attributes": "^1.0",     "drupal/minifyhtml": "^1.6",     "drupal/paragraphs": "^1.6",     "drupal/pathauto": "^1.3",     "drupal/redirect": "^1.3",     "drupal/require_login": "^2.0",     "drupal/search_api": "^1.11",     "drupal/simple_sitemap": "^3.0",     "drupal/simplenews": "^1.0@alpha",     "drupal/tfa": "^1.0@alpha",     "drupal/token": "^1.5",     "drupal/video_embed_field": "^2.0",     "drupal/view_unpublished": "^1.0@alpha",     "drupal/viewport": "^1.1",     "drupal/viewsreference": "^1.4",     "drupal/workflow_state_config": "^1.0@alpha",     "drupal/xmlsitemap": "^1.0@alpha",     "drupal/allowed_formats": "^1.1",     "drupal/asset_injector": "^2.4",     "drupal/taxonomy_access_fix": "^2.6",     "drupal/text_summary_options": "^1.0",     "drupal/migrate_source_csv": "^2.2",     "drupal/migrate_plus": "^4.1",     "drupal/migrate_tools": "^4.1",     "drupal/migrate_file": "^1.1",     "drupal/entityqueue": "^1.0@alpha",     "drupal/module_missing_message_fixer": "^1.0@beta",     "drupal/rules": "^3.0@alpha",     "ckeditor/autogrow": "^4.8",     "ckeditor/codemirror": "^1.17",     "ckeditor/fakeobjects": "^4.8",     "ckeditor/image": "^4.8",     "ckeditor/link": "^4.8",     "codemirror/codemirror": "^5.36",     "jquery/geocomplete": "^1.7",     "jquery/icheck": "^1.0",     "jquery/image-picker": "^0.3.0",     "jquery/inputmask": "^3.3",     "jquery/intl-tel-input": "^12.1",     "jquery/rateit": "^1.1",     "jquery/select2": "^4.0",     "jquery/timepicker": "^1.11",     "jquery/toggles": "^4.0",     "jquery/word-and-character-counter": "^2.5",     "progress-tracker/progress-tracker": "^1.4",     "signature_pad/signature_pad": "^2.3",     "drupal/image_widget_crop": "^2.2",     "drupal/crop": "^1.5",     "drupal/advagg": "^3.5",     "drupal/advagg_js_minify": "^3.5",     "drupal/advagg_css_minify": "^3.5",     "drupal/better_exposed_filters": "^3.0@alpha",     "drupal/block_visibility_groups_admin": "^1.3",     "drupal/chosen": "^2.6",     "drupal/chosen_field": "^2.6",     "drupal/content_export_csv": "^3.0@beta",     "drupal/contentimport": "^4.1",     "drupal/event": "1.x-dev",     "drupal/entity_reference_views_select": "^1.3",     "drupal/imce_search_plugin": "^1.0",     "drupal/inline_entity_form": "^1.0@RC",     "drupal/job": "^3.0@alpha",     "drupal/media_bulk_upload": "^1.0@alpha",     "drupal/memcache": "^2.0",     "drupal/purge_ui": "^3.0@beta",     "drupal/purge_processor_lateruntime": "^3.0@beta",     "drupal/purge_tokens": "^3.0@beta",     "drupal/twig_tweak": "^2.1",     "drupal/views_bulk_operations": "^2.5",     "drupal/block_visibility_groups": "^1.3",     "drush/drush": "^9.5",     "drupal/we_megamenu": "^1.5",     "drupal/views_infinite_scroll": "^1.5",     "drupal/embed": "^1.0",     "drupal/dropzonejs": "^2.0@alpha",     "drupal/purge": "^3.0@beta",     "drupal/address": "^1.4",     "drupal/acquia_connector": "^1.16",     "drupal/purge_purger_http": "^1.0@beta",     "drupal/smtp": "^1.0@beta",     "drupal/content_sync": "^2.1",     "drupal/console": "~1.0",     "drupal/devel": "^2.0",     "drupal/core": "8.6.13" },