Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)

« Appliquer un patch avec Composer dans drupal » : différence entre les versions

De AJLSM
Aller à la navigation Aller à la recherche
Page créée avec « Dans le fichier composer.json, ajouter <syntaxhighlight lang="bash">, "extra": { "composer-exit-on-patch-failure": true, "patchLevel": { ... »
 
Aucun résumé des modifications
 
Ligne 1 : Ligne 1 :
Dans le fichier composer.json, ajouter  
Dans le fichier composer.json, ajouter la section "patches" dans la section "extra", généralement en fin de fichier.<br />
 
Puis lancer : {{cmd|composer update}}<br />
<syntaxhighlight lang="bash">,
Ici, le "patch" corrige un problème de conflit entre le module Pleade et une version du thème "barrio".
    "extra": {
Le PATH du patch est relatif au fichier composer.json[[category:Drupal]][[category:Composer]]
<syntaxhighlight lang="bash">
    ,
    "extra": {
         "composer-exit-on-patch-failure": true,
         "composer-exit-on-patch-failure": true,
         "patchLevel": {
         "patchLevel": {
Ligne 22 : Ligne 25 :
             }
             }
         },
         },
"patches": {
"patches": {
"drupal/bootstrap_barrio": {
"drupal/bootstrap_barrio": {
"Notice: Error : Call to a member function bundle() on string dans bootstrap_barrio_theme_suggestions_page_alter": "web/patches/barrio.patch"
"Notice: Error : Call to a member function bundle() on string dans bootstrap_barrio_theme_suggestions_page_alter": "web/patches/barrio.patch"
}
}
}
    }
    }</syntaxhighlight>
}</syntaxhighlight>

Dernière version du 29 septembre 2020 à 11:49

Dans le fichier composer.json, ajouter la section "patches" dans la section "extra", généralement en fin de fichier.
Puis lancer : composer update
Ici, le "patch" corrige un problème de conflit entre le module Pleade et une version du thème "barrio". Le PATH du patch est relatif au fichier composer.json

     ,
     "extra": {
        "composer-exit-on-patch-failure": true,
        "patchLevel": {
            "drupal/core": "-p2"
        },
        "installer-paths": {
            "web/core": ["type:drupal-core"],
            "web/libraries/{$name}": ["type:drupal-library"],
            "web/modules/contrib/{$name}": ["type:drupal-module"],
            "web/profiles/contrib/{$name}": ["type:drupal-profile"],
            "web/themes/contrib/{$name}": ["type:drupal-theme"],
            "web/libraries/ckeditor/plugins/{$name}": ["vendor:ckeditor-plugin"],
            "drush/Commands/contrib/{$name}": ["type:drupal-drush"]
        },
        "drupal-scaffold": {
            "initial": {
                ".editorconfig": "../.editorconfig",
                ".gitattributes": "../.gitattributes"
            }
        },
	"patches": {
		"drupal/bootstrap_barrio": {
		"Notice: Error : Call to a member function bundle() on string dans bootstrap_barrio_theme_suggestions_page_alter": "web/patches/barrio.patch"
	}
    }
}