Cover image for Drush for Developers.
Drush for Developers.
Title:
Drush for Developers.
Author:
Requena, Juampy Novillo.
ISBN:
9781784397036
Personal Author:
Edition:
2nd ed.
Physical Description:
1 online resource (187 pages)
Contents:
Drush for Developers Second Edition -- Table of Contents -- Drush for Developers Second Edition -- Credits -- About the Author -- About the Reviewers -- www.PacktPub.com -- Support files, eBooks, discount offers, and more -- Why subscribe? -- Free access for Packt account holders -- Preface -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Reader feedback -- Customer support -- Downloading the example code -- Errata -- Piracy -- Questions -- 1. Introduction, Installation, and Basic Usage -- Installation requirements -- Operating system -- PHP -- Installing Composer -- Drush installation on Linux and OSX -- Manual installation -- The Drush command structure -- Executing a command -- Providing arguments to a command -- Altering a command's behavior through options -- Structuring command invocations -- Command aliases -- Understanding Drush's context system -- Setting the context manually -- Summary -- 2. Keeping Database Configuration and Code Together -- Meeting the update path -- Rebuilding the registry -- Preparing the trap -- Breaking the registry -- Rebuilding Drupal's registry -- Running database updates -- Managing features -- Exporting configuration into code -- Running the update path on a different environment -- Analyzing results -- Reverting the feature components programmatically -- Summary -- 3. Running and Monitoring Tasks in Drupal Projects -- Running periodic tasks with cron -- Disabling Drupal's cron -- Verifying the current cron frequency -- Overriding cron frequency and exporting it to code -- Running cron with Drush -- Scheduling cron runs with Jenkins -- Installing Jenkins -- Creating a job through the web interface -- Monitoring cron runs -- Running a task outside cron -- Example - moving a Feeds importer from Drupal's cron to Drush -- Exporting the Feeds importer into code.

Writing a Drush command to trigger the Feeds importer -- Running long tasks in batches -- A sample Drush command using the Batch API -- Batch API operations -- Running the command and verifying the output -- Evaluating code on the fly and running scripts -- The php-eval command -- The php-script command -- A script to create nodes and revisions -- Logging messages in Drush -- The verbose and quiet modes -- Redirecting Drush output into a file -- Implementing your own logging mechanism -- Running a command in the background -- Summary -- 4. Error Handling and Debugging -- Validating input -- Validating an argument -- Validating options -- Ignoring options after the command name -- Allowing additional options -- Adding custom validation to a command -- Rolling back when an error happens -- Turning the update path into a single command -- Browsing hook implementations -- Inspecting the bootstrapping process -- Inspecting hook and function implementations -- Browsing and navigating hook implementations -- Viewing source code of a function or method -- Summary -- 5. Managing Local and Remote Environments -- Managing local environments -- Managing remote environments -- Verifying requirements -- Accessing a remote server through a public key -- Defining a group of remote site aliases for our project -- Using site aliases in commands -- Special site aliases -- Running a command on all site aliases of a group -- Avoiding a Drupal bootstrap with @none -- Referencing the current project with @self -- Adding site alias support to the update path -- Inspecting the command implementation and hooks -- Running the update path with a site alias -- Copying database and files between environments -- Defining Drush shell aliases for a team -- Blocking the execution of certain commands -- Ignoring tables on sql-sync -- Summary -- 6. Setting Up a Development Workflow.

Moving configuration, commands, and site aliases out of Drupal -- Installing Drupal Boilerplate -- Relocating Drush files -- Testing the new setup -- Configuring the development database for the team -- Configuring Jenkins to sync production to development -- Fine-tuning the development database -- Recreating the database on sql-sync -- Excluding table data from production -- Ignoring tables from production -- Sanitizing data -- Preventing e-mails from being sent -- Running post sql-sync tasks in local environments -- Summary -- Index.
Abstract:
This book is a best fit for backend developers with a basic knowledge of Drupal's APIs and some experience using the command line. Perhaps you already worked on one or two Drupal projects, but have never dived deep into Drush's toolset. In any case, this book will give you a lot of advice by covering real-world challenges in Drupal projects that can be solved using Drush.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Electronic Access:
Click to View
Holds: Copies: