From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush...
Transcript of From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush...
![Page 1: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/1.jpg)
From D7 to D8: My experience
Drupal Day Murcia 2015
#DdayMurcia2015 - @jlbellido
![Page 2: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/2.jpg)
You already know me from...
#DdayMurcia2015 - @jlbellido
José Luis Bellido (jlbellido)
Other sessions like:● Render API - DrupalCamp Spain 2015
Member of:● Asociación española de Drupal● Drupal Sevilla
You can find me:● @jose_lakatos● https://www.drupal.org/u/jlbellido● https://github.com/jlbellido
![Page 3: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/3.jpg)
#DdayMurcia2015 - @jlbellido
We’re hiring!
![Page 4: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/4.jpg)
#DdayMurcia2015 - @jlbellido
Why Are we here today?
![Page 5: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/5.jpg)
Table of Contents
#DdayMurcia2015 - @jose_lakatos
● Background && Context.● Reset yourself.● Useful points of documentation.● Useful tools.● Looking back.
![Page 6: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/6.jpg)
1. Background & Context.
#DdayMurcia2015 - @jlbellido
![Page 7: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/7.jpg)
1. Background && Context : Why Drupal 8?
#DdayMurcia2015 - @jlbellido
● Only a few contrib modules.● Release planned for at the same time that
Drupal 8.0.0 should be.● Research project.● Drupal 8 already includes some of the desired
features.● Contribute back!
![Page 8: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/8.jpg)
1. Background && Context : Previous sessions.
#DdayMurcia2015 - @jlbellido
Thinking about starting *now* a project with Drupal 8? Here is my story. by @penyaskito
![Page 9: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/9.jpg)
2. Reset yourself.
#DdayMurcia2015 - @jlbellido
![Page 10: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/10.jpg)
2. Reset yourself : My starting point
#DdayMurcia2015 - @jlbellido
● Drupal developer for 3+ years● Lack of a real experience with
other technologies.● Learned about good practices
hard to implement in drupal 7.● Living in the island.● Attendee of several events.
![Page 11: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/11.jpg)
2. Reset yourself: Forget almost all.
#DdayMurcia2015 - @jlbellido
“Just keep in mind the concepts and good practices. Forget everything else.”
![Page 12: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/12.jpg)
2. Reset yourself
#DdayMurcia2015 - @jlbellido
“Read and learn modern PHP concepts. Traits, Plugins..Will be your friends.”
Must read: http://www.phptherightway.com/
![Page 13: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/13.jpg)
2. Reset yourself
#DdayMurcia2015 - @jlbellido
“Don’t stay in the surface. Dig in the concept.”
![Page 14: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/14.jpg)
2. Reset yourself
#DdayMurcia2015 - @jlbellido
“Reset and review your current development process”
![Page 15: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/15.jpg)
2. Reset yourself
#DdayMurcia2015 - @jlbellido
“The best examples you can find are in Core!”
![Page 16: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/16.jpg)
2. Reset yourself
#DdayMurcia2015 - @jlbellido
“Have a good test coverage in your project and maintain it.”
![Page 17: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/17.jpg)
3. Useful points of documentation.
#DdayMurcia2015 - @jlbellido
![Page 18: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/18.jpg)
3. Useful points of documentation:
#DdayMurcia2015 - @jlbellido
Drupal.org change records.
@drupal8changes
![Page 19: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/19.jpg)
3. Useful points of documentation:
#DdayMurcia2015 - @jlbellido
Drupal 8 Contrib Porting Tracker
![Page 20: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/20.jpg)
3. Useful points of documentation:
#DdayMurcia2015 - @jlbellido
Drupal API Documentation
![Page 21: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/21.jpg)
3. Useful points of documentation:
#DdayMurcia2015 - @jlbellido
Youtube channel of Drupal Association
AED's channel in Vimeo
![Page 22: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/22.jpg)
3. Useful points of documentation:
#DdayMurcia2015 - @jlbellido
The Examples module
Your help is needed for having more examples!
● New examples:○ Content entity example.○ Config entity example.○ Tour example.○ Plugin system example.
● Already ported examples:○ Cache example○ Field permission example○ js example
![Page 23: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/23.jpg)
4. Useful Tools.
#DrupalDayMurcia2015 - Jose Luis Bellido
![Page 24: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/24.jpg)
4. Useful tools: Drupal Console
#DdayMurcia2015 - @jlbellido
Drupal Console
http://drupalconsole.com/
![Page 25: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/25.jpg)
4. Useful tools: Drush
VS Drupal Console
#DdayMurcia2015 - @jlbellido
![Page 26: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/26.jpg)
#DdayMurcia2015 - @jlbellido
![Page 27: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/27.jpg)
4. Useful tools: Drush && Drupal Console
#DdayMurcia2015 - @jlbellido
Drush from Drupal Console: $ drupal drush [arguments]
Drupal Console from Drush: Call Drupal Console commands natively from Drush #1337
![Page 28: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/28.jpg)
4. Useful tools
#DdayMurcia2015 - @jlbellido
XDebug
● dpm() now is not useful.● Knowing better how it’s built.● Run custom short scripts in
run time!● Definitely required.
PHP Debugging [AED: Virtual BoF]
![Page 29: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/29.jpg)
4. Useful tools
#DdayMurcia2015 - @jlbellido
Debugging Twig Templates
![Page 30: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/30.jpg)
4. Useful tools
#DdayMurcia2015 - @jlbellido
Web Profiler
● Included in Devel (D8+).● Search and inspect final
queries run!● Tons of other tools!
![Page 31: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/31.jpg)
4. Useful tools
#DdayMurcia2015 - @jlbellido
Composer &&
Composer manager
● We’re getting out the island!● Using Composer in a Drupal
project.● Composer in relation to
Drush Make
![Page 32: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/32.jpg)
#DdayMurcia2015 - @jlbellido
5. Looking back
![Page 33: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/33.jpg)
#DdayMurcia2015 - @jlbellido
Questions? Answers?
![Page 34: From D7 to D8: My experience · Using Composer in a Drupal project. Composer in relation to Drush Make. #DdayMurcia2015 - @jlbellido 5. Looking back. #DdayMurcia2015 - @jlbellido](https://reader033.fdocuments.us/reader033/viewer/2022043009/5f9d1b912a80f608db440d39/html5/thumbnails/34.jpg)
#DdayMurcia2015 - @jlbellido