Drupal project codebase can and should be managed with Composer, as it provides better and more reliable results when building codebase. Drupal Console is replacing Drush -based workflows fast.
Training 20.12.2016 by Perttu Ehn
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryMassimo Menichinelli
DIGITAL FABRICATION STUDIO (25438)
The course provides a general understanding on how to design and manufacture products and prototypes in a Fab Lab, using digital fabrication technologies and understanding their features and limits.
Students will learn how information shapes design, manufacturing and collaboration processes and artifacts in a Fab Lab. They will learn how to digitally fabricate a project or how to digitally modify an existing project; students will also learn how to manage, embed and retrieve information about a project. Projects and prototypes developed and manufactured in this course will not be interactive.
The course consists of lectures and a group project to be digitally fabricated, be it a project already designed but not yet realized or be it the modification of an existing project. Every lecture (3 hours) includes time for testing the technologies covered (1 hour) and for developing part of the group project and for receiving feedback about it (1 hour).
http://mlab.taik.fi/studies/courses/course?id=1963
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryMassimo Menichinelli
DIGITAL FABRICATION STUDIO (25438)
The course provides a general understanding on how to design and manufacture products and prototypes in a Fab Lab, using digital fabrication technologies and understanding their features and limits.
Students will learn how information shapes design, manufacturing and collaboration processes and artifacts in a Fab Lab. They will learn how to digitally fabricate a project or how to digitally modify an existing project; students will also learn how to manage, embed and retrieve information about a project. Projects and prototypes developed and manufactured in this course will not be interactive.
The course consists of lectures and a group project to be digitally fabricated, be it a project already designed but not yet realized or be it the modification of an existing project. Every lecture (3 hours) includes time for testing the technologies covered (1 hour) and for developing part of the group project and for receiving feedback about it (1 hour).
http://mlab.taik.fi/studies/courses/course?id=1963
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
Introduction to WP-CLI: Manage WordPress from the command lineBehzod Saidov
These are the slides from a talk given at WordCamp Riverside 2017:
https://2017.riverside.wordcamp.org/session/introduction-to-wp-cli-manage-wordpress-from-the-command-line/
The topic is about powerful tool WP-CLI than can help WordPress developers or power users a lot.
If you manage multiple WordPress websites or multiple environments of a WordPress website, you probably have experienced situations where you need to go through exact same steps on multiple websites. Clicking through wp-admin screens to change settings becomes time consuming. WP-CLI can be used to automate those tasks with ease.
During my presentation I’ll introduce the audience with the command line and WP-CLI, then I’ll go through some of the tasks that can be easily done using this tool. I’ll demonstrate some tasks running them on a sample WordPress website running in local development environment. Demonstrations will include tasks like pulling back the database to lower environments (qa/staging) and rewriting it, managing users, plugins, etc.
This worksheet accompanied a presentation by Steve Breker of Artefactual Systems, delivered as part of AtoM Camp Cambridge, a three-day boot camp held at St John's College, Cambridge University, May 9-11, 2017 For more information, see:
https://wiki.accesstomemory.org/Community/Camps/SJC2017
The presentation focused on the installation of Access to Memory, and the slides from it can be seen here:
https://www.slideshare.net/accesstomemory/installing-and-upgrading-atom
This handout showed attendees how Ansible can be used to automate the deployment process of AtoM, using the publicly available Ansible playbooks. You can find Artefactual's Ansible playbooks at:
https://github.com/artefactual/deploy-pub
Composer tools and frameworks for drupal.pptPromet Source
Composer is the de-facto php dependency management tool of the future. An ever-increasing number of useful open-source libraries are available for easy use via Packagist, the standard repository manager for Composer. As more and more Drupal contrib modules begin to depend on external libraries from Packagist, the motivation to use Composer to manage grows stronger; since Drupal 8 Core, and Drush 7 are now also using Composer to manage dependencies, the best way to insure that all of the requirements are resolved correctly is to manage everything from a top-level project composer.json file.
B-Translator as a Software Engineering ProjectDashamir Hoxha
The project B-Translator will be presented, trying to illustrate through it some software development/engineering concepts and practices (how they are actually applied in this project).
"A re-usable Ansible role to deploy projects".
When deploying software to production, it pays to have an automated process in place. This presentation describes a workflow to deploy your project (those familiar with Capistrano wil recognize this method), and then takes you step by step through an Ansible role that you can simply implement in your own ansible scripts.
make is a basic tool to define pipelines of shell commands.
It is useful if you have many shell scripts and commands, and you want to organize them.
Even if it has been written to automatize the build of compiled language programs, make is also useful in bioinformatics and other fields.
A soup to nuts presentation on using Composer and repository servers to manage and leverage shared code libraries for personal projects to the largest enterprise.
Developers need to be able to run an application on an environment as closely matched to production as possible. We can already do this through Vagrant.The problem with Vagrant is that it is slow and takes a lot of resources both in cpu and space. Docker doesn't have this problem and gives you a tool to create hundreds of different application environments on the same machine and distribute them through a registry. As Git replaced SVN, so has Docker replaced vagrant for application environment setups.Leave the future behind, own today (like a boss).
With Composer as an integral part of Laravel 4 PHP framework, PHP programmers finaly have a way to break the complex projects into smaller independent units (Laravel Packages) that can later easily be used in any other project. This brings code reusibilty to a completely new level. Lecture describes the proccess of creating a simple Laravel package with Facade and Artisan CLI support. Detailed walkthorugh is available as a github project as well: https://github.com/orangehill/Laravel-Workbench-Walkthrough
The web is growing fast and online games and other compute-intensive applications expand their user-bases every day. These trends create a growing demand on performance in JavaScript applications. Even though JavaScript has benefited from huge performance improvements in recent years, there is great potential for an even faster web. Browser technologies such as asm.js or Google’s NativeClient enable near-native performance in browsers. More recent efforts led to the specification of WebAssembly, the future vendor-independent standard for native webapps. This talk takes a closer look at Emscripten, a toolchain that transpiles C++ to asm.js. The talk answers questions regarding performance and about the integration with the popular CMake build system.
This post demonstrates how to containerize a spring boot application using docker. Please refer the git hub link provided in the post to get the source code used.
An Introduction to Makefile.
about 23 slides to present you a quick start to the make utility, its usage and working principles. Some tips/examples in order to understand and write your own
Makefiles.
In this presentation you will learn why this utility continues to hold its top position in project build software, despite many younger competitors.
Visit Do you know Magazine : https://www.facebook.com/douknowmagazine
This is the presentation I would have loved to see when I started using Composer with Drupal. Based on my experience working with Composer and Drupal 7 + Drupal 8.
Learn about the basics working with the Dependency Management for PHP: Composer. Dicover the commands, files (composer.lock and composer.json), the pros but also the cons of using the tool.
This was presented in October 2016 in Cebu for Cebu Drupal Meetups, and Drupalcamp Japan 2017 in Tokyo in January 2017.
Introduction to WP-CLI: Manage WordPress from the command lineBehzod Saidov
These are the slides from a talk given at WordCamp Riverside 2017:
https://2017.riverside.wordcamp.org/session/introduction-to-wp-cli-manage-wordpress-from-the-command-line/
The topic is about powerful tool WP-CLI than can help WordPress developers or power users a lot.
If you manage multiple WordPress websites or multiple environments of a WordPress website, you probably have experienced situations where you need to go through exact same steps on multiple websites. Clicking through wp-admin screens to change settings becomes time consuming. WP-CLI can be used to automate those tasks with ease.
During my presentation I’ll introduce the audience with the command line and WP-CLI, then I’ll go through some of the tasks that can be easily done using this tool. I’ll demonstrate some tasks running them on a sample WordPress website running in local development environment. Demonstrations will include tasks like pulling back the database to lower environments (qa/staging) and rewriting it, managing users, plugins, etc.
This worksheet accompanied a presentation by Steve Breker of Artefactual Systems, delivered as part of AtoM Camp Cambridge, a three-day boot camp held at St John's College, Cambridge University, May 9-11, 2017 For more information, see:
https://wiki.accesstomemory.org/Community/Camps/SJC2017
The presentation focused on the installation of Access to Memory, and the slides from it can be seen here:
https://www.slideshare.net/accesstomemory/installing-and-upgrading-atom
This handout showed attendees how Ansible can be used to automate the deployment process of AtoM, using the publicly available Ansible playbooks. You can find Artefactual's Ansible playbooks at:
https://github.com/artefactual/deploy-pub
Composer tools and frameworks for drupal.pptPromet Source
Composer is the de-facto php dependency management tool of the future. An ever-increasing number of useful open-source libraries are available for easy use via Packagist, the standard repository manager for Composer. As more and more Drupal contrib modules begin to depend on external libraries from Packagist, the motivation to use Composer to manage grows stronger; since Drupal 8 Core, and Drush 7 are now also using Composer to manage dependencies, the best way to insure that all of the requirements are resolved correctly is to manage everything from a top-level project composer.json file.
B-Translator as a Software Engineering ProjectDashamir Hoxha
The project B-Translator will be presented, trying to illustrate through it some software development/engineering concepts and practices (how they are actually applied in this project).
"A re-usable Ansible role to deploy projects".
When deploying software to production, it pays to have an automated process in place. This presentation describes a workflow to deploy your project (those familiar with Capistrano wil recognize this method), and then takes you step by step through an Ansible role that you can simply implement in your own ansible scripts.
make is a basic tool to define pipelines of shell commands.
It is useful if you have many shell scripts and commands, and you want to organize them.
Even if it has been written to automatize the build of compiled language programs, make is also useful in bioinformatics and other fields.
A soup to nuts presentation on using Composer and repository servers to manage and leverage shared code libraries for personal projects to the largest enterprise.
Developers need to be able to run an application on an environment as closely matched to production as possible. We can already do this through Vagrant.The problem with Vagrant is that it is slow and takes a lot of resources both in cpu and space. Docker doesn't have this problem and gives you a tool to create hundreds of different application environments on the same machine and distribute them through a registry. As Git replaced SVN, so has Docker replaced vagrant for application environment setups.Leave the future behind, own today (like a boss).
With Composer as an integral part of Laravel 4 PHP framework, PHP programmers finaly have a way to break the complex projects into smaller independent units (Laravel Packages) that can later easily be used in any other project. This brings code reusibilty to a completely new level. Lecture describes the proccess of creating a simple Laravel package with Facade and Artisan CLI support. Detailed walkthorugh is available as a github project as well: https://github.com/orangehill/Laravel-Workbench-Walkthrough
The web is growing fast and online games and other compute-intensive applications expand their user-bases every day. These trends create a growing demand on performance in JavaScript applications. Even though JavaScript has benefited from huge performance improvements in recent years, there is great potential for an even faster web. Browser technologies such as asm.js or Google’s NativeClient enable near-native performance in browsers. More recent efforts led to the specification of WebAssembly, the future vendor-independent standard for native webapps. This talk takes a closer look at Emscripten, a toolchain that transpiles C++ to asm.js. The talk answers questions regarding performance and about the integration with the popular CMake build system.
This post demonstrates how to containerize a spring boot application using docker. Please refer the git hub link provided in the post to get the source code used.
An Introduction to Makefile.
about 23 slides to present you a quick start to the make utility, its usage and working principles. Some tips/examples in order to understand and write your own
Makefiles.
In this presentation you will learn why this utility continues to hold its top position in project build software, despite many younger competitors.
Visit Do you know Magazine : https://www.facebook.com/douknowmagazine
This is the presentation I would have loved to see when I started using Composer with Drupal. Based on my experience working with Composer and Drupal 7 + Drupal 8.
Learn about the basics working with the Dependency Management for PHP: Composer. Dicover the commands, files (composer.lock and composer.json), the pros but also the cons of using the tool.
This was presented in October 2016 in Cebu for Cebu Drupal Meetups, and Drupalcamp Japan 2017 in Tokyo in January 2017.
Managing your Drupal project with ComposerMatt Glaman
Drupal 8 is all about getting off the island and leveraging things invented elsewhere. With that, we must use a package manager tool. PHP's de facto package manager is now Composer. However, adopting Composer has been a rough spot with the Drupal community.
In this presentation, Matt Glaman will explore Composer and how using it will streamline your workflow.
Lean Drupal Repositories with Composer and DrushPantheon
Composer is the industry-standard PHP dependency manager that is now in use in Drupal 8 core. This session will show the current best practices for using Composer, drupal-composer, drupal-scaffold, Drush, Drupal Console and Drush site-local aliases to streamline your Drupal 7 and Drupal 8 site repositories for optimal use on teams.
Composer is the de-facto php dependency management tool of the future. An ever-increasing number of useful open-source libraries are available for easy use via Packagist, the standard repository manager for Composer. As more and more Drupal contrib modules begin to depend on external libraries from Packagist, the motivation to use Composer to manage grows stronger; since Drupal 8 Core, and Drush 7 are now also using Composer to manage dependencies, the best way to ensure that all of the requirements are resolved correctly is to manage everything from a top-level project composer.json file.
This deck examines the different ways that Composer can be used to manage your project code, and how these new practices will influence how you use Drush and deploy code.
Watch the session video: https://www.youtube.com/watch?v=WNS3d_wzZ2Y
Pantheon's Greg Anderson presents on the topic of using Composer with Drupal and Drush. Composer is a dependency manager that has become the de-facto standard for managing the components used in any sort of PHP library or application. Drupal is no exception to this, and in this presentation, Greg showed that the future is already here: it is completely possible to use native Composer functions to manage the modules and themes used in a Drupal site. In this capacity, Composer can take over the functions usually performed with drush make, drush pm-download, and drush pm-update.
Composer tools and frameworks for DrupalPromet Source
This presentation from Drupal GovCon 2015 reviews the composer framework and toolkit for dependency management in Drupal. If your Drupal project is using PHP libraries outside of the Drupal ecosystem then you can benefit by adopting this powerful workflow today.
Docker for developers on mac and windowsDocker, Inc.
The whole Docker ecosystem exists today because of every single developer who found ways of using Docker to improve how they build software; whether streamlining production deployments, speeding up continuous integration systems or standing up an application on your laptop to hack on. In this talk we want to take a step back and look at where Docker sits today from the software developers point of view - and then jump ahead and talk about where it might go in the future. In this talk, we’ll discuss:
* Making Docker an everyday part of the developing software on the desktop, with Docker for Windows and Docker for Mac
* Docker Compose, and the future of describing applications as code
* How Docker provides the best tools for developing applications destined to run on any Kubernetes cluster
This session should be of interest to anyone who writes software; from people who want to hack on a few personal projects, to polyglot open source programmers and to professional developers working in tightly controlled environments. Everyone deserves a better developer experience.
Drupal 8 improvements for developer productivity php symfony and moreAcquia
This was a webinar hosted by Acquia. Ron Northcutt, a solutions architect at Acquia discussed improvements in Drupal 8 that will surely boost productivity for Drupal developers.
B-Translator helps to get feedback about l10n (translations of the programs). It tries to collect very small translation contributions from a wide crowd of people and to dilute them into something useful. It is developed as a Drupal7 profile and the code is hosted on GitHub. Here I describe the development setup and process that I use for this project. Most of the the tips are project specific, however some of them can be used on any Drupal project.
Drupal 8 - Improving your development workflowvaluebound
Planning to improve software development workflow for your new project? Get answers to your questions. In this presentation, Malabya of Valuebound will help you learn about the codebase, local development, composer workflow and deployment of a project.
Be a happier developer with Docker: Tricks of the tradeNicola Paolucci
The talk will teach developers to automate and streamline their development environment setups using Docker, covering awesome tricks to make the experience smooth, fast, powerful and repeatable.The topics covered will be a selection amongst:
- Sharing folders into containers
- Transparent tunnels, dynamic ports for your apps
- Tiny Core Linux - the secret horse to super fast container automation
- Dockerfile caching tricks
- Cheap orchestration tricks
Efficient development workflows with composernuppla
Composer is a great tool for managing a project's dependencies - however, as with many tools there are various ways to use it. That's why this session will provide you an overview of possible workflows and shows practical solutions for building and deploying composer-managed projects. It covers experiences with handling Drupal projects and focus on approaches that can be shared across projects and team members.
Topics:
- Introduction: What is composer and how to use it with Drupal
- Build & deployment workflows for composer-managed projects
- Composer & Drupal: Challenges & solutions
- Creating re-usable packages
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
Exove's CTO Kalle Varisvirta shares his insights on diversity in recruitment. Kalle has many years of experience in recruiting software developers. Exove is a company with a diverse & inclusive workforce – and we are very proud of it! Read more about us: exove.com.
Kalle was one of the speakers in the Agile Search HR meetup on 28 March and he gave this presentation there.
Mitä saavutettavuusdirektiivi pitää sisälläänExove
Mitä saavutettavuusdirektiivi pitää sisällään, Kimmo Sääskilahti, Annanpura
Kimmo Sääskilahden puheenvuoro Exoven seminaarissa "Saavutettavuus ja käytettävyys verkkopalveluissa" 15.2.2019
Life with digital services after GDPR by Kalle Varisvirta, Exove
Seminar Exove and Bird & Bird 26th April 2018: GDPR tulee - mitä tapahtuu h-hetken jälkeen
Exove Extends keynote on Dec 13th, 2017
Developing truly personalised experiences by Simon Chapman from Acquia
Acquia powers some of the world’s biggest and most well-known websites, delivering personalised content whatever the channel, location or device. We’ll take a deep dive into the technologies and components of the Acquia platform and explore traditional development methods versus headless or decoupled architectures. We’ll outline the benefits of using modern JS frameworks whilst delivering personalised experiences that capture your customers ‘in the moment’, which ultimately can be measured through analytics...and as your customer data grows, we’ll talk about how this ‘big data’ can be used to drive reporting, customer journeys and the ‘next best action’.
Adventures In Programmatic Branding – How To Design With Algorithms And How T...Exove
IxDA Helsinki x Exove meetup 19.10.2017
Adventures In Programmatic Branding – How To Design With Algorithms And How To Tame Metaballs?
by AKI-VILLE PÖYKIÖ
We created a fluid, ever-changing brand for Women in Tech, a diversity in technology movement kickstarted in Singapore. ED’s design director Aki-Ville Pöykiö tells the story and how we survived an algorithm gone rogue.
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
This 7-second Brain Wave Ritual Attracts Money To You.!nirahealhty
Discover the power of a simple 7-second brain wave ritual that can attract wealth and abundance into your life. By tapping into specific brain frequencies, this technique helps you manifest financial success effortlessly. Ready to transform your financial future? Try this powerful ritual and start attracting money today!
Italy Agriculture Equipment Market Outlook to 2027harveenkaur52
Agriculture and Animal Care
Ken Research has an expertise in Agriculture and Animal Care sector and offer vast collection of information related to all major aspects such as Agriculture equipment, Crop Protection, Seed, Agriculture Chemical, Fertilizers, Protected Cultivators, Palm Oil, Hybrid Seed, Animal Feed additives and many more.
Our continuous study and findings in agriculture sector provide better insights to companies dealing with related product and services, government and agriculture associations, researchers and students to well understand the present and expected scenario.
Our Animal care category provides solutions on Animal Healthcare and related products and services, including, animal feed additives, vaccination
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfFlorence Consulting
Quattordicesimo Meetup di Milano, tenutosi a Milano il 23 Maggio 2024 dalle ore 17:00 alle ore 18:30 in presenza e da remoto.
Abbiamo parlato di come Axpo Italia S.p.A. ha ridotto il technical debt migrando le proprie APIs da Mule 3.9 a Mule 4.4 passando anche da on-premises a CloudHub 1.0.
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
5. Drush recap
“Drush is a command line shell and Unix scripting interface for Drupal.“
- www.drush.org
Build codebase based on the recipe (.make-file)
$ drush make my-makefile.make
Download and enable modules, themes
Set variables, reset passwords, rebuild or revert features…
Write your own custom commands to do practically anything with Drupal
Drush is not a dependency manager, but a fixed recipe for the codebase
10. Set up a project repository (localdev…!)
You add project requirements
$ composer require drupal/drupal
Composer will solve requirement's dependencies
Commit composer.json and composer.lock -files to Git
Don’t commit code hosted elsewhere - Drupal core,
modules, libraries
Workflow with the Composer
11. Use Composer template for Drupal, it comes with
steroids!
$ composer create-project drupal-composer/
drupal-project:8.x-dev coolio --stability
dev —no-interaction --prefer-dist
Workflow
Image: http://www.e-steroid.com/steroid-articles/negative-effects-of-steroids.html
12. Use Composer template for Drupal
$ composer create-project drupal-composer/
drupal-project:8.x-dev coolio --stability
dev --no-interaction --prefer-dist
Composer may be installed globally or per project1)
Composer == composer.phar -file,“Php ARchive”
Workflow
1) https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx
13. Use Composer template for Drupal
$ composer create-project drupal-composer/
drupal-project:8.x-dev coolio --stability
dev --no-interaction --prefer-dist
create-project creates a new project from an existing
project (think git clone)
Workflow
14. Use Composer template for Drupal
$ composer create-project drupal-composer/
drupal-project:8.x-dev coolio --stability
dev --no-interaction --prefer-dist
Use Composer template for Drupal as the base
8.x project version (relates to the Drupal core version)
-dev use dev -version, ie. a git commit (latest one in this
case)
Workflow
15. Use Composer template for Drupal
$ composer create-project drupal-composer/
drupal-project:8.x-dev coolio --stability
dev --no-interaction --prefer-dist
coolio is the directory where the project will be
created
also where composer.json and composer.lock files
will be created
Workflow
22. Web root is in
coolio/web
All libraries are protected from direct access
coolio/vendor/*
vendor code rarely needs to be accessible directly from the
world
index.php
core/update.php (well...)
Folder structure
26. $ composer require drupal/core:8.2.2
Changes core version 8.2.3 -> 8.2.2 (with template project)
$ composer require drupal/ctools
$ composer require drupal/commerce:2.0-beta3
List the modules you have with Drupal:
$ composer show drupal/*
Remove a module - affects composer.json and the codebase, too
$ composer remove drupal/ctools
Add Drush and Registry Rebuild module (Drupal 7 only)
$ composer add drush/drush:7.* drupal/registry_rebuild
Recipes
Get some modules (composer)
zsh requires quoted parameter when it contains an asterisk: $ composer show "drupal/*"
27. You request a (Drupal) package
$ composer require drupal/ctools
Composer finds it (https://packages.drupal.org/8)
Composer updates composer.json -file
Composer downloads the package
Composer checks if this new package has other requirements
(composer.json file)
Composer searches for the requirement… => this is a dependency tree!
Composer dependency resolving 1/2
zsh requires quoted parameter when it contains an asterisk: $ composer show "drupal/*"
28. All good!
&&
Write composer.lock file
OR
Exception!!! Exception!!!
&&
Revert the changes in composer.json file
Composer dependency resolving 2/2
zsh requires quoted parameter when it contains an asterisk: $ composer show "drupal/*"
29. 1. Clone project repository.
2. Run composer install
Composer reads composer.lock -file
Composer retrieves all the required dependencies
Composer generates autoloader
3. That’s it!
(+ some vagrant up and Drupal site installs)
zsh requires quoted parameter when it contains an asterisk: $ composer show "drupal/*"
Fellow developer’s local
30. Run composer update to get the latest available
(version constraints!)
Update code
Write updates to composer.lock -file
Change version (ie change version constraints)
$ composer require drupal/commerce:2.*
zsh requires quoted parameter when it contains an asterisk: $ composer show "drupal/*"
How to do code updates?
32. Three digits; 1.2.3
1st changes might be backwards incompatible (major)
API removals, API changes
2nd changes with API additions, new features (minor)
3rd changes with bug fixes (patch)
Semantic versioning
33. Range
Comparison operators, specified range of allowed versions
>=1.0
>=1.0 <2.0
>=1.0 <1.1 || >=1.2
1.0 - 2.0
Wildcard
* is a wildcard: 1.0.* is the
equivalent of >=1.0 <1.1
https://getcomposer.org/doc/articles/versions.md
Constraints
34. Tilde
~ specifies a minimum version, but allows the last digit
specified to go up: ~1.2 is the equivalent of >= 1.2 <
2.*
Caret
^ sticks closer to semantic versioning; sub-major version
updates should not break anything: ^1.2.3 is equivalent
to >=1.2.3 <2.0.0
https://getcomposer.org/doc/articles/versions.md
Constraints
35. Specify allowed versions, not a specific version
composer.lock -file will contain the specific version which composer
install will use
drupal/core:8.2.2 => drupal/core:~8.2 or drupal/
core:^8.2
drupal/commerce:2.0-beta3 => drupal/commerce:~2
drupal/ctools:~3
Git HEAD (not recommended):
drupal/console:dev-1.x
drupal/console:dev-master - for GitHub
https://getcomposer.org/doc/articles/versions.md
Constraints
37. Problem:
Feature or fix you must have may be in Git, but not in the latest
release
Solution:
Use a specified Git commit
More recipes
38. Use a specified Git commit
; Optionally provide git branch so Drush
; can write that to .info file
projects[ctools][download][branch] = "8.x-3.x"
; Git commit hash
projects[ctools][download][revision] = 1fe3649
More recipes
39. Use a specified Git commit
projects:
ctools:
download:
# Optionally provide git branch so
# Drush can write that to .info file
branch: 8.x-3.x
# Git commit hash
revision: 1fe3649
More recipes
40. Use a specified Git commit
$ composer require drupal/ctools:dev-3.x#1fe3649
More recipes
41. Use a specified Git commit
READ: never use HEAD (“latest whatever code”)
More recipes
42. Problem:
-> Found and fixed a bug in a contrib module, and now you need to
use your fixes (a patch file) from drupal.org? No prob.
-> Perhaps you were lazy and never uploaded the patch? No prob
either.
Solution: Drush and Composer can apply remote and local patches
Patching modules
45. Install module field_group
$ composer require drupal/field_group:1.0-rc4
Edit composer.json and edit (or add) "extra":
"extra": {
"patches": {
"drupal/field_group": {
"A patch with URL”: “https://www.drupal.org/files/issues/
field_group-empty_group_nonnumeric_index-2761159-2-D8.patch",
“Local patch (path relative to composer.json)”: "patches/
field_group-fix_it.patch"
}
}
}
Apply the patches and update composer.lock -file
$ composer install # applies the patch
$ composer update --lock # writes patch info to .lock file
Patching modules
46. There is a module for that… but it requires an external library!
As an example:
Chosen -module is a wrapper for chosen-library
Chosen library must be downloaded separately
Other libraries
Image: https://opensource.com/life/16/1/indiahacks-2016
49. Manually add new item to your repository -section in composer.json:
"repositories": [{
"type": “package",
"package": {
"name": "customlibs/chosen",
"version": "master",
"dist": {
"type": "zip",
"url": "https://github.com/harvesthq/chosen/releases/download/1.4.2/
chosen_v1.4.2.zip",
"reference": “1.4.2"
},
"autoload": {
"classmap": ["."]
}
}],
Request the library
$ composer require customlibs/chosen:1.4.2
Then update your packages as per what you've just done:
$ composer update
NOTE: Chosen modules declares this dependency in Drupal 8 version via composer.json
Other libraries
Image: https://opensource.com/life/16/1/indiahacks-2016
51. Briefly about Drupal Console
Composer manages (Drupal) codebase
Drupal Console does tricks with Drupal itself (Drupal 8)
Help your self by aliasing drupal if it is not in your $PATH
#localdev VM bash alias is
alias drupal="/vagrant/drupal_root/vendor/
drupal/console/bin/drupal"
57. Some random commands
Go nuts!
$ drupal [-l=local-1.example.com] list
$ drupal [--uri=local-1.example.com] list
Get help!
$ drupal help [topic]
Documentation https://drupalconsole.com/docs , also in
Vietnamese and Hindi among some other languages
NOTE: Drupal Console v1.0.0-rc12 (not yet released) is needed
for properly working (automated) multisite installation process
60. Take also look at these
Composer template for Drupal projects
https://github.com/drupal-composer/drupal-project
Improving your Drupal 8 development workflow
by Jesus Manuel Olivas
http://weknowinc.com/talks/2016/drupalgov-workflow
Drupal Console Docs
https://drupalconsole.com/docs