SlideShare a Scribd company logo
1 of 11
Download to read offline
Drupal 8: gestire le dipendenze
Da Drush Make a Composer: cosa cambia?
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
La filosofia del cambiamento
● Drupal è maturato, non reinventa la ruota.
● Drupal si è aperto all’interoperabilità (Framework Interop Group - http:
//www.php-fig.org/ )
● Una installazione ‘vergine’ di Drupal contiene già componenti esterni alla
community (Twig, varie librerie Symfony, Guzzle, ecc)
● Da progetto.make a composer.json
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
Drush Make
Drush Make permette, tramite un file di testo, di gestire i componenti
(dipendenze) di una installazione Drupal (core, librerie, moduli) per permettere
una più facile distribuzione del codice e la derivante installazione Drupal.
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
Composer
Composer è nato per gestire le dipendenze in progetti PHP di qualsiasi tipo.
La sua versatilità e il suo standard de-facto lo hanno reso la trasposizione
naturale per gestire le dipendenze anche in Drupal 8 vista la ormai eterogenea
composizione della codebase Drupal (Drupal 7 lo supporta comunque
attraverso un modulo contrib).
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
Come cambia la nostra vita adesso?
Per i site-builder o chi non necessita di un controllo approfondito sulle versioni dei componenti della
propria installazione Drupal non molto.
● Un grande aiuto è dato da Composer Manager
https://www.drupal.org/project/composer_manager
Per i developer cambia la gestione delle dipendenze, del controllo delle versioni e dei componenti:
● Gestione ricorsiva delle dipendenze
● Generazione del file autoload.php
● Apertura di Drupal verso qualsiasi libreria PSR-1 / PSR-4 (Symfony, Zend, ecc)
● Sicurezza nella gestione delle versioni delle dipendenze (composer.lock)
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
composer create-project drupal-composer/drupal-project:8.x-dev myproject
--stability dev --no-interaction
Project template per Drupal 8
● https://packagist.org/packages/drupal-composer/drupal-project
Un comando per domarli
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
… oppure un custom composer.json
{
"name": "drupal/drupal",
"type": "project",
"require": {
"composer/installers": "^1.0.21",
"drupal/core": "~8.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"_readme": [
"By default Drupal loads the autoloader from ./core/vendor/autoload.php.",
"To change the autoloader you can edit ./autoload.php."
]
}
}
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
… oppure There is a module for thatTM
Composer Manager
● https://www.drupal.org/project/composer_manager
$ drush dl composer_manager
$ php modules/composer_manager/scripts/init.php
$ composer drupal-install
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
Non sono tutte rose e fiori
● Il core di Drupal 8 ha sotto controllo di versione la propria directory dei
vendor - https://www.drupal.org/node/1475510
● Cambieranno drasticamente tutte le nostre abitudini
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015
...ma
Dal cambiamento si può sempre imparare!
Drupal Social Club @sparkfabrik 2/10/2015
Grazie!
Domande?
Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com
Drupal Social Club @sparkfabrik 2/10/2015

More Related Content

What's hot

2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...Marco Parenzan
 
"ASP.NET Core e .NET Core" by Francesco Di Rienzo
"ASP.NET Core e .NET Core" by Francesco Di Rienzo"ASP.NET Core e .NET Core" by Francesco Di Rienzo
"ASP.NET Core e .NET Core" by Francesco Di RienzoThinkOpen
 
WUI con Google Polymer
WUI con Google PolymerWUI con Google Polymer
WUI con Google PolymerNaLUG
 
Una nuova ricetta per lo sviluppo in WordPress
Una nuova ricetta per lo sviluppo in WordPressUna nuova ricetta per lo sviluppo in WordPress
Una nuova ricetta per lo sviluppo in WordPressFrancesco Cozzi
 
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014Giorgio Cefaro
 
LinuxDay2012 - Android, PhoneGap and jQuery Mobile
LinuxDay2012 - Android, PhoneGap and jQuery MobileLinuxDay2012 - Android, PhoneGap and jQuery Mobile
LinuxDay2012 - Android, PhoneGap and jQuery MobileSalvatore Carotenuto
 
Introduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciutoIntroduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciutoDaniele Megna
 
Deploy PrestaShop con Docker
Deploy PrestaShop con DockerDeploy PrestaShop con Docker
Deploy PrestaShop con DockerBwlab
 

What's hot (10)

2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
 
"ASP.NET Core e .NET Core" by Francesco Di Rienzo
"ASP.NET Core e .NET Core" by Francesco Di Rienzo"ASP.NET Core e .NET Core" by Francesco Di Rienzo
"ASP.NET Core e .NET Core" by Francesco Di Rienzo
 
WUI con Google Polymer
WUI con Google PolymerWUI con Google Polymer
WUI con Google Polymer
 
Una nuova ricetta per lo sviluppo in WordPress
Una nuova ricetta per lo sviluppo in WordPressUna nuova ricetta per lo sviluppo in WordPress
Una nuova ricetta per lo sviluppo in WordPress
 
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
 
LinuxDay2012 - Android, PhoneGap and jQuery Mobile
LinuxDay2012 - Android, PhoneGap and jQuery MobileLinuxDay2012 - Android, PhoneGap and jQuery Mobile
LinuxDay2012 - Android, PhoneGap and jQuery Mobile
 
Introduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciutoIntroduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciuto
 
Deploy PrestaShop con Docker
Deploy PrestaShop con DockerDeploy PrestaShop con Docker
Deploy PrestaShop con Docker
 
Git best practices
Git best practicesGit best practices
Git best practices
 
Progetto Linux va a scuola
Progetto Linux va a scuolaProgetto Linux va a scuola
Progetto Linux va a scuola
 

Viewers also liked

Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
Docker for developers
Docker for developersDocker for developers
Docker for developerssparkfabrik
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentsparkfabrik
 
Da site builder a Drupal developer
Da site builder a Drupal developerDa site builder a Drupal developer
Da site builder a Drupal developersparkfabrik
 
Drupal for government: Iperbole, the civic network of the city of bologna
Drupal for government: Iperbole, the civic network of the city of bolognaDrupal for government: Iperbole, the civic network of the city of bologna
Drupal for government: Iperbole, the civic network of the city of bolognasparkfabrik
 
Drupal 8 - dal download del core alla pubblicazione in produzione
Drupal 8 - dal download del core alla pubblicazione in produzioneDrupal 8 - dal download del core alla pubblicazione in produzione
Drupal 8 - dal download del core alla pubblicazione in produzionesparkfabrik
 

Viewers also liked (6)

Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
Da site builder a Drupal developer
Da site builder a Drupal developerDa site builder a Drupal developer
Da site builder a Drupal developer
 
Drupal for government: Iperbole, the civic network of the city of bologna
Drupal for government: Iperbole, the civic network of the city of bolognaDrupal for government: Iperbole, the civic network of the city of bologna
Drupal for government: Iperbole, the civic network of the city of bologna
 
Drupal 8 - dal download del core alla pubblicazione in produzione
Drupal 8 - dal download del core alla pubblicazione in produzioneDrupal 8 - dal download del core alla pubblicazione in produzione
Drupal 8 - dal download del core alla pubblicazione in produzione
 

Similar to Drush make vs composer

Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernoDrupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernosparkfabrik
 
Creare distribuzioni con drupal
Creare distribuzioni con drupalCreare distribuzioni con drupal
Creare distribuzioni con drupalAlessandro Capra
 
Drupal - per chi vuole iniziare
Drupal - per chi vuole iniziareDrupal - per chi vuole iniziare
Drupal - per chi vuole iniziareSalvatore Paone
 
Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8DrupalDay
 
Drupal Day 2015 - Drupal 8 dal download del core alla pubblicazione in prod...
Drupal Day 2015 -  Drupal 8  dal download del core alla pubblicazione in prod...Drupal Day 2015 -  Drupal 8  dal download del core alla pubblicazione in prod...
Drupal Day 2015 - Drupal 8 dal download del core alla pubblicazione in prod...Vincenzo Di Biaggio
 
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...DrupalDay
 
Linux Embedded per l'automazione
Linux Embedded per l'automazioneLinux Embedded per l'automazione
Linux Embedded per l'automazioneDaniele Costarella
 
Link. php [santi caltabiano]
  Link. php [santi caltabiano]  Link. php [santi caltabiano]
Link. php [santi caltabiano]santi caltabiano
 
Sistemi di Virtualizzazione con Gnu/Linux Xen vs VMware
Sistemi di Virtualizzazione con Gnu/Linux Xen vs VMwareSistemi di Virtualizzazione con Gnu/Linux Xen vs VMware
Sistemi di Virtualizzazione con Gnu/Linux Xen vs VMwareClaudio Cardinali
 
Framework per la realizzazione di ria
Framework per la realizzazione di riaFramework per la realizzazione di ria
Framework per la realizzazione di riaLorenzo Bortolotto
 
Chi ha paura della command-line? - WordCamp Roma 2018
Chi ha paura della command-line? - WordCamp Roma 2018Chi ha paura della command-line? - WordCamp Roma 2018
Chi ha paura della command-line? - WordCamp Roma 2018Marco Chiesi
 
Enterprise Applications - Angular Day 2018
Enterprise Applications - Angular Day 2018Enterprise Applications - Angular Day 2018
Enterprise Applications - Angular Day 2018Paolo Galfione
 

Similar to Drush make vs composer (20)

Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernoDrupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
 
Flash e software libero
Flash e software liberoFlash e software libero
Flash e software libero
 
Creare distribuzioni con drupal
Creare distribuzioni con drupalCreare distribuzioni con drupal
Creare distribuzioni con drupal
 
Drupal - per chi vuole iniziare
Drupal - per chi vuole iniziareDrupal - per chi vuole iniziare
Drupal - per chi vuole iniziare
 
Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8
 
Drupal Day 2015 - Drupal 8 dal download del core alla pubblicazione in prod...
Drupal Day 2015 -  Drupal 8  dal download del core alla pubblicazione in prod...Drupal Day 2015 -  Drupal 8  dal download del core alla pubblicazione in prod...
Drupal Day 2015 - Drupal 8 dal download del core alla pubblicazione in prod...
 
Microsoft Fast - Overview
Microsoft Fast - OverviewMicrosoft Fast - Overview
Microsoft Fast - Overview
 
GNU Linux Programming introduction
GNU Linux Programming introductionGNU Linux Programming introduction
GNU Linux Programming introduction
 
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
 
Linux Embedded per l'automazione
Linux Embedded per l'automazioneLinux Embedded per l'automazione
Linux Embedded per l'automazione
 
TuxIsAlive
TuxIsAliveTuxIsAlive
TuxIsAlive
 
Link. php [santi caltabiano]
  Link. php [santi caltabiano]  Link. php [santi caltabiano]
Link. php [santi caltabiano]
 
Sistemi di Virtualizzazione con Gnu/Linux Xen vs VMware
Sistemi di Virtualizzazione con Gnu/Linux Xen vs VMwareSistemi di Virtualizzazione con Gnu/Linux Xen vs VMware
Sistemi di Virtualizzazione con Gnu/Linux Xen vs VMware
 
Infrastructure as Data
Infrastructure as DataInfrastructure as Data
Infrastructure as Data
 
Framework per la realizzazione di ria
Framework per la realizzazione di riaFramework per la realizzazione di ria
Framework per la realizzazione di ria
 
Linuxday2007
Linuxday2007Linuxday2007
Linuxday2007
 
Rich Internet Application
Rich Internet ApplicationRich Internet Application
Rich Internet Application
 
Chi ha paura della command-line? - WordCamp Roma 2018
Chi ha paura della command-line? - WordCamp Roma 2018Chi ha paura della command-line? - WordCamp Roma 2018
Chi ha paura della command-line? - WordCamp Roma 2018
 
Enterprise Applications - Angular Day 2018
Enterprise Applications - Angular Day 2018Enterprise Applications - Angular Day 2018
Enterprise Applications - Angular Day 2018
 
Silex, iniziamo
Silex, iniziamoSilex, iniziamo
Silex, iniziamo
 

More from sparkfabrik

KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on KubernetesKCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetessparkfabrik
 
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...sparkfabrik
 
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtsparkfabrik
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pagessparkfabrik
 
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal frontesparkfabrik
 
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...sparkfabrik
 
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP EcosystemWhat is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP Ecosystemsparkfabrik
 
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfsparkfabrik
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...sparkfabrik
 
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudsparkfabrik
 
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplanesparkfabrik
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue paginesparkfabrik
 
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)sparkfabrik
 
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!sparkfabrik
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSsparkfabrik
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedsparkfabrik
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIssparkfabrik
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guidesparkfabrik
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developerssparkfabrik
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes sparkfabrik
 

More from sparkfabrik (20)

KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on KubernetesKCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
 
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
 
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages
 
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte
 
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
 
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP EcosystemWhat is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
 
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdf
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
 
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloud
 
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplane
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagine
 
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
 
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWS
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIs
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developers
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes
 

Drush make vs composer

  • 1. Drupal 8: gestire le dipendenze Da Drush Make a Composer: cosa cambia? Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 2. La filosofia del cambiamento ● Drupal è maturato, non reinventa la ruota. ● Drupal si è aperto all’interoperabilità (Framework Interop Group - http: //www.php-fig.org/ ) ● Una installazione ‘vergine’ di Drupal contiene già componenti esterni alla community (Twig, varie librerie Symfony, Guzzle, ecc) ● Da progetto.make a composer.json Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 3. Drush Make Drush Make permette, tramite un file di testo, di gestire i componenti (dipendenze) di una installazione Drupal (core, librerie, moduli) per permettere una più facile distribuzione del codice e la derivante installazione Drupal. Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 4. Composer Composer è nato per gestire le dipendenze in progetti PHP di qualsiasi tipo. La sua versatilità e il suo standard de-facto lo hanno reso la trasposizione naturale per gestire le dipendenze anche in Drupal 8 vista la ormai eterogenea composizione della codebase Drupal (Drupal 7 lo supporta comunque attraverso un modulo contrib). Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 5. Come cambia la nostra vita adesso? Per i site-builder o chi non necessita di un controllo approfondito sulle versioni dei componenti della propria installazione Drupal non molto. ● Un grande aiuto è dato da Composer Manager https://www.drupal.org/project/composer_manager Per i developer cambia la gestione delle dipendenze, del controllo delle versioni e dei componenti: ● Gestione ricorsiva delle dipendenze ● Generazione del file autoload.php ● Apertura di Drupal verso qualsiasi libreria PSR-1 / PSR-4 (Symfony, Zend, ecc) ● Sicurezza nella gestione delle versioni delle dipendenze (composer.lock) Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 6. composer create-project drupal-composer/drupal-project:8.x-dev myproject --stability dev --no-interaction Project template per Drupal 8 ● https://packagist.org/packages/drupal-composer/drupal-project Un comando per domarli Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 7. … oppure un custom composer.json { "name": "drupal/drupal", "type": "project", "require": { "composer/installers": "^1.0.21", "drupal/core": "~8.0" }, "minimum-stability": "dev", "prefer-stable": true, "extra": { "_readme": [ "By default Drupal loads the autoloader from ./core/vendor/autoload.php.", "To change the autoloader you can edit ./autoload.php." ] } } Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 8. … oppure There is a module for thatTM Composer Manager ● https://www.drupal.org/project/composer_manager $ drush dl composer_manager $ php modules/composer_manager/scripts/init.php $ composer drupal-install Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 9. Non sono tutte rose e fiori ● Il core di Drupal 8 ha sotto controllo di versione la propria directory dei vendor - https://www.drupal.org/node/1475510 ● Cambieranno drasticamente tutte le nostre abitudini Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015
  • 10. ...ma Dal cambiamento si può sempre imparare! Drupal Social Club @sparkfabrik 2/10/2015
  • 11. Grazie! Domande? Vincenzo Di Biaggio - Sparkfabrik - @vincenzodb - http://sparkfabrik.com Drupal Social Club @sparkfabrik 2/10/2015