Build site
This commit is contained in:
parent
6f8d067847
commit
0c7de8559a
743 changed files with 92961 additions and 0 deletions
|
@ -0,0 +1,270 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-GB">
|
||||
<head>
|
||||
<title>Announcing the Drupal VM Generator | Oliver Davies</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<meta property="og:url" content="https://www.oliverdavies.uk/blog/2016/02/15/announcing-the-drupal-vm-generator">
|
||||
<meta property="og:title" content="Announcing the Drupal VM Generator"/>
|
||||
|
||||
|
||||
|
||||
<meta property="og:image" content="https://www.oliverdavies.uk/assets/images/me-precedent.jpg"/>
|
||||
<meta property="og:image:height" content="327"/>
|
||||
<meta property="og:image:type" content="image/jpg">
|
||||
<meta property="og:image:width" content="327"/>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/main.css">
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/blog-post.css">
|
||||
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=57" sizes="57x57">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=114" sizes="114x114">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=72" sizes="72x72">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=144" sizes="144x144">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=60" sizes="60x60">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=120" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=76" sizes="76x76">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=152" sizes="152x152">
|
||||
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=160" sizes="160x160">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=96" sizes="96x96">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=32" sizes="32x32">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=16" sizes="16x16">
|
||||
</head>
|
||||
<body class="">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="https://www.oliverdavies.uk/">Oliver Davies</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="">
|
||||
<a href="/">About</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/experience">Experience</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/testimonials">Testimonials</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/talks">Talks</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
<a href="/blog">Blog</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/contact">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> </div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<main class="col-md-9">
|
||||
<h1>Announcing the Drupal VM Generator</h1>
|
||||
|
||||
<p class="posted">15th February 2016</p>
|
||||
|
||||
<p>For the past few weeks I’ve been working on a personal side project, based on Drupal VM. It’s called the <a href="https://github.com/opdavies/drupal-vm-generator">Drupal VM Generator</a>, and over the weekend I’ve added the final features and fixed the remaining issues, and tagged the 1.0.0 release.</p>
|
||||
|
||||
<p><img src="/assets/images/blog/drupalvm-generate-repo.png" alt="" /></p>
|
||||
|
||||
<h2 id="what-is-drupal-vm%3F">What is Drupal VM?</h2>
|
||||
|
||||
<p><a href="http://www.drupalvm.com">Drupal VM</a> is a project created and maintained by <a href="http://www.jeffgeerling.com">Jeff Geerling</a>. It’s a <a href="http://www.vagrantup.com">Vagrant</a> virtual machine for Drupal development that is provisioned using <a href="https://www.ansible.com">Ansible</a>.</p>
|
||||
|
||||
<p>What is different to a regular Vagrant VM is that uses a file called <code>config.yml</code> to configure the machine. Settings such as <code>vagrant_hostname</code>, <code>drupalvm_webserver</code> and <code>drupal_core_path</code> are stored as YAML and passed into the <code>Vagrantfile</code> and the <code>playbook.yml</code> file which is used when the Ansible provisioner runs.</p>
|
||||
|
||||
<p>In addition to some essential Ansible roles for installing and configuring packages such as Git, MySQL, PHP and Drush, there are also some roles that are conditional and only installed based on the value of other settings. These include Apache, Nginx, Solr, Varnish and Drupal Console.</p>
|
||||
|
||||
<h2 id="what-does-the-drupal-vm-generator-do%3F">What does the Drupal VM Generator do?</h2>
|
||||
|
||||
<blockquote>
|
||||
<p>The Drupal VM Generator is a Symfony application that allows you to quickly create configuration files that are minimal and use-case specific.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>Drupal VM comes with an <a href="https://github.com/geerlingguy/drupal-vm/blob/master/example.config.yml">example.config.yml file</a> that shows all of the default variables and their values. When I first started using it, I’d make a copy of <code>example.config.yml</code>, rename it to <code>config.yml</code> and edit it as needed, but a lot of the examples aren’t needed for every use case. If you’re using Nginx as your webserver, then you don’t need the Apache virtual hosts. If you are not using Solr on this project, then you don’t need the Solr variables.</p>
|
||||
|
||||
<p>For a few months, I’ve kept and used boilerplace versions of <code>config.yml</code> - one for Apache and one for Nginx. These are minimal, so have most of the comments removed and only the variables that I regularly need, but these can still be quite time consuming to edit each time, and if there are additions or changes upstream, then I have two versions to maintain.</p>
|
||||
|
||||
<p>The Drupal VM Generator is a Symfony application that allows you to quickly create configuration files that are minimal and use-case specific. It uses the <a href="http://symfony.com/doc/current/components/console/introduction.html">Console component</a> to collect input from the user, <a href="http://twig.sensiolabs.org">Twig</a> to generate the file, the <a href="http://symfony.com/doc/current/components/filesystem/introduction.html">Filesystem component</a> to write it.</p>
|
||||
|
||||
<p>Based on the options passed to it and/or answers that you provide, it generates a custom, minimal <code>config.yml</code> file for your project.</p>
|
||||
|
||||
<p>Here’s an example of it in action:</p>
|
||||
|
||||
<p><img src="/assets/images/blog/drupalvm-generate-example-2.gif" alt="'An animated gif showing the interaction process and the resulting config.yml file'" /></p>
|
||||
|
||||
<p>You can also define options when calling the command and skip any or all questions. Running the following would bypass all of the questions and create a new file with no interaction or additional steps.</p>
|
||||
<code data-gist-id="24e569577ca4b72f049d" data-gist-file="with-options.sh"></code>
|
||||
<h2 id="where-do-i-get-it%3F">Where do I get it?</h2>
|
||||
|
||||
<p>The project is hosted on <a href="https://github.com/opdavies/drupal-vm-generator">GitHub</a>, and there are installation instructions within the <a href="https://github.com/opdavies/drupal-vm-generator/blob/master/README.md#installation">README</a>.</p>
|
||||
|
||||
<div class="github-card" data-github="opdavies/drupal-vm-generator" data-width="400" data-height="" data-theme="default"></div>
|
||||
|
||||
<p>The recommended method is via downloading the phar file (the same as Composer and Drupal Console). You can also clone the GitHub repository and run the command from there. I’m also wanting to upload it to Packagist so that it can be included if you manage your projects with Composer.</p>
|
||||
|
||||
<p>Please log any bugs or feature requests in the <a href="https://github.com/opdavies/drupal-vm-generator/issues">GitHub issue tracker</a>, and I’m more than happy to receive pull requests.</p>
|
||||
|
||||
<p>If you’re interested in contributing, please feel free to fork the repository and start doing so, or contact me with any questions.</p>
|
||||
|
||||
<p><strong>Update 17/02/16:</strong> The autoloading issue is now fixed if you require the package via Composer, and this has been tagged as the <a href="https://github.com/opdavies/drupal-vm-generator/releases/tag/1.0.1">1.0.1 release</a></p>
|
||||
|
||||
<p class="tags">
|
||||
Tags:
|
||||
<a href="https://www.oliverdavies.uk/blog/tags/drupal">drupal</a>, <a href="https://www.oliverdavies.uk/blog/tags/drupal-planet">drupal-planet</a>, <a href="https://www.oliverdavies.uk/blog/tags/drupal-vm">drupal-vm</a>, <a href="https://www.oliverdavies.uk/blog/tags/drupal-vm-generator">drupal-vm-generator</a>, <a href="https://www.oliverdavies.uk/blog/tags/symfony">symfony</a> </p>
|
||||
<div class="post-pager is-flex">
|
||||
<div class="is-half">
|
||||
<a href="/blog/2015/12/22/programmatically-load-an-entityform-in-drupal-7">
|
||||
« Programmatically Load an Entityform in Drupal 7
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="is-half text-right">
|
||||
<a href="/blog/2016/05/03/simplifying-drupal-migrations-with-xautoload">
|
||||
Simplifying Drupal Migrations with xautoload »
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-author">
|
||||
<h2>About the Author</h2>
|
||||
|
||||
<img src="//images.oliverdavies.uk/assets/images/me-precedent.jpg" alt="Picture of Oliver" class="img-circle">
|
||||
|
||||
<p>Oliver Davies is a Web Developer, System Administrator and Drupal specialist based in the UK. He is a Senior Developer at <a href="https://microserve.io">Microserve</a> and also provides freelance consultancy services for Drupal websites, PHP applications and Linux servers.</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="panel badges text-center">
|
||||
<a class="badge--da-member" href="https://assoc.drupal.org/membership" title="I’m a Drupal Association member.">
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/da-individual-member.png"
|
||||
alt="Drupal Association Individual Member"
|
||||
width="152"
|
||||
>
|
||||
</a>
|
||||
|
||||
<a href="http://drupalcores.com/#opdavies">
|
||||
<img
|
||||
alt="I built Drupal 8 with hand holding a wrench on blue background"
|
||||
src="//images.oliverdavies.uk/assets/images/drupal-8.jpg"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/badges/acquia-certified-developer-drupal-8.png"
|
||||
alt="Acquia Certified Developer - Drupal 8 Exam Badge"
|
||||
height="147" width="147"
|
||||
/>
|
||||
|
||||
<a href="http://conference.phpnw.org.uk/phpnw17">
|
||||
<img src="//images.oliverdavies.uk/assets/images/badges/phpnw17.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="availability panel panel-default">
|
||||
<div class="panel-heading">Availability</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-up text-warning"></i>
|
||||
|
||||
|
||||
Currently have limited part-time capacity
|
||||
</p>
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-down text-danger"></i>
|
||||
|
||||
Currently no spare full-time capacity.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="latest-posts panel panel-default">
|
||||
<div class="latest-posts__heading panel-heading">Latest blog posts</div>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/06/09/introducing-the-drupal-meetups-twitterbot">
|
||||
Introducing the Drupal Meetups Twitterbot
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">9th June, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/20/turning-drupal-module-into-feature">
|
||||
Turning Your Custom Drupal Module into a Feature
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">20th May, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/15/drupalcamp-bristol-early-bird-tickets-sessions-sponsors">
|
||||
DrupalCamp Bristol 2017 - Early Bird Tickets, Call for Sessions, Sponsors
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">15th May, 2017</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> </div>
|
||||
<footer class="container">
|
||||
<p class="copyright">
|
||||
© 2010-2017 Oliver Davies. Built with <a href="https://sculpin.io">Sculpin</a>.
|
||||
</p>
|
||||
|
||||
<div class="meetups">
|
||||
<h2>Things that I organise</h2>
|
||||
<ul>
|
||||
<li class="meetups--drupal-bristol">
|
||||
<a href="http://www.drupalbristol.org.uk" title="Drupal Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupal-bristol.jpeg" alt="Drupal Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--drupalcamp-bristol">
|
||||
<a href="http://www.drupalcampbristol.co.uk" title="DrupalCamp Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupalcamp-bristol.png" alt="DrupalCamp Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--phpsw">
|
||||
<a href="http://phpsw.uk" title="PHPSW">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/phpsw.jpeg" alt="PHPSW">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://www.oliverdavies.uk/assets/js/site.js"></script>
|
||||
|
||||
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-11967257-1', 'auto'); ga('send', 'pageview');</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,317 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-GB">
|
||||
<head>
|
||||
<title>Simplifying Drupal Migrations with xautoload | Oliver Davies</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<meta property="og:url" content="https://www.oliverdavies.uk/blog/2016/05/03/simplifying-drupal-migrations-with-xautoload">
|
||||
<meta property="og:title" content="Simplifying Drupal Migrations with xautoload"/>
|
||||
|
||||
|
||||
|
||||
<meta property="og:image" content="https://www.oliverdavies.uk/assets/images/me-precedent.jpg"/>
|
||||
<meta property="og:image:height" content="327"/>
|
||||
<meta property="og:image:type" content="image/jpg">
|
||||
<meta property="og:image:width" content="327"/>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/main.css">
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/blog-post.css">
|
||||
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=57" sizes="57x57">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=114" sizes="114x114">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=72" sizes="72x72">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=144" sizes="144x144">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=60" sizes="60x60">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=120" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=76" sizes="76x76">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=152" sizes="152x152">
|
||||
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=160" sizes="160x160">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=96" sizes="96x96">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=32" sizes="32x32">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=16" sizes="16x16">
|
||||
</head>
|
||||
<body class="">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="https://www.oliverdavies.uk/">Oliver Davies</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="">
|
||||
<a href="/">About</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/experience">Experience</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/testimonials">Testimonials</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/talks">Talks</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
<a href="/blog">Blog</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/contact">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> </div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<main class="col-md-9">
|
||||
<h1>Simplifying Drupal Migrations with xautoload</h1>
|
||||
|
||||
<p class="posted">3rd May 2016</p>
|
||||
|
||||
<h2 id="what-is-xautoload%3F">What is xautoload?</h2>
|
||||
|
||||
<p><a href="https://www.drupal.org/project/xautoload">xautoload</a> is a Drupal module that enables the autoloading of PHP classes, in the same way that you would do so in a <a href="http://getcomposer.org">Composer</a> based project such as Drupal 8 or Symfony.</p>
|
||||
|
||||
<p>It supports both the <a href="http://www.php-fig.org/psr/psr-0/">PSR-0</a> and <a href="http://www.php-fig.org/psr/psr-4/">PSR-4</a> standards, as well as providing a wildcard syntax for Drupal’s <code>file[]</code> syntax in .info files.</p>
|
||||
|
||||
<p>To use it, download and enable it from Drupal.org as you would for any other module, and then add it as a dependency within your module. The xautoload project page suggests including a minimum version in this format:</p>
|
||||
|
||||
<pre><code class="language-ini">dependencies[] = xautoload (>= 7.x-5.0)
|
||||
</code></pre>
|
||||
|
||||
<p>This will ensure that the version of xautoload is 7.x-5.0 or newer.</p>
|
||||
|
||||
<h2 id="how-to-use-it">How to use it</h2>
|
||||
|
||||
<h3 id="wildcard-syntax-for-.info-files">Wildcard syntax for .info files</h3>
|
||||
|
||||
<p>Here is an example .info file for a migrate module.</p>
|
||||
|
||||
<pre><code class="language-ini">; foo_migrate.info
|
||||
|
||||
name = Foo Migration
|
||||
core = 7.x
|
||||
package = Foo
|
||||
|
||||
files[] = includes/user.inc
|
||||
files[] = includes/nodes/article.inc
|
||||
files[] = includes/nodes/page.inc
|
||||
</code></pre>
|
||||
|
||||
<p>In this example, each custom migration class is stored in it’s own file within the <code>includes</code> directory, and each class needs to be loaded separately using the <code>files[] = filename</code> syntax.</p>
|
||||
|
||||
<p>One thing that the xautoload module does to enable for the use of wildcards within this syntax. By using wildcards, the module file can be simplified as follows:</p>
|
||||
|
||||
<pre><code class="language-ini">files[] = includes/**/*.inc
|
||||
</code></pre>
|
||||
|
||||
<p>This will load any .inc files within the <code>includes</code> directory as well as any sub-directories, like 'node' in the original example.</p>
|
||||
|
||||
<p>This means that any new migration classes that are added will be automatically loaded, so you don’t need to declare each include separately within foo_migrate.info again. The great thing about this approach is that it works with the existing directory and file structure.</p>
|
||||
|
||||
<h3 id="use-the-psr-4-structure">Use the PSR-4 structure</h3>
|
||||
|
||||
<p>If you want to use the <a href="http://www.php-fig.org/psr/psr-4/">PSR-4</a> approach, you can do that too.</p>
|
||||
|
||||
<p>In order to do so, you’ll need to complete the following steps:</p>
|
||||
|
||||
<ol>
|
||||
<li>Rename the <code>includes</code> directory to <code>src</code>.</li>
|
||||
<li>Ensure that there is one PHP class per file, and that the file extension is <code>.php</code> rather than <code>.inc</code>.</li>
|
||||
<li>Ensure that the name of the file matches the name of the class - <code>FooArticleNodeMigration</code> would be in a file called <code>FooArticleNodeMigration.php</code>.</li>
|
||||
<li>Add a namespace to each PHP file. This uses the same format as Drupal 8, including the machine name of the module. For example, <code>Drupal\foo_migrate</code>.
|
||||
|
||||
<ul>
|
||||
<li>If the class is within a sub-directory, then this will also need to be included within the namespace - e.g. <code>Drupal\foo_migrate\Node</code>.</li>
|
||||
<li>You’ll also need to import any class names that you are referencing, including class names that are you extending, by adding <code>use</code> statements at the top of the file. You may be able to prefix it with <code>\</code> instead (e.g. <code>\DrupalNode6Migration</code>), but I prefer to use imports.</li>
|
||||
</ul></li>
|
||||
</ol>
|
||||
|
||||
<p>Now your class may look something like this:</p>
|
||||
|
||||
<pre><code class="language-php"><?php
|
||||
|
||||
namespace Drupal\foo_migrate\Node;
|
||||
|
||||
use DrupalNode6Migration;
|
||||
|
||||
class FooArticleNodeMigration extends DrupalNode6Migration {
|
||||
...
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>With these steps completed, any imports within your .info file can be removed as they are no longer needed and any classes will be loaded automatically.</p>
|
||||
|
||||
<p>Within <code>foo_migrate.migrate.inc</code>, I can now reference any class names using their full namespace:</p>
|
||||
|
||||
<pre><code class="language-php">$node_arguments['ArticleNode'] = array(
|
||||
'class_name' => 'Drupal\foo_migrate\Node\FooArticleNodeMigration',
|
||||
'source_type' => 'story',
|
||||
'destination_type' => 'article',
|
||||
);
|
||||
</code></pre>
|
||||
|
||||
<h2 id="resources">Resources</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://www.drupal.org/project/xautoload">xautoload module</a></li>
|
||||
<li><a href="https://www.drupal.org/project/migrate">migrate module</a></li>
|
||||
<li><a href="https://www.drupal.org/project/migrate_d2d">migrate_d2d module</a></li>
|
||||
<li><a href="http://www.php-fig.org/psr/psr-0/">PSR-0</a></li>
|
||||
<li><a href="http://www.php-fig.org/psr/psr-4/">PSR-4</a></li>
|
||||
</ul>
|
||||
|
||||
<p class="tags">
|
||||
Tags:
|
||||
<a href="https://www.oliverdavies.uk/blog/tags/autoloading">autoloading</a>, <a href="https://www.oliverdavies.uk/blog/tags/drupal">drupal</a>, <a href="https://www.oliverdavies.uk/blog/tags/drupal-planet">drupal-planet</a>, <a href="https://www.oliverdavies.uk/blog/tags/drupal-7">drupal-7</a>, <a href="https://www.oliverdavies.uk/blog/tags/php">php</a> </p>
|
||||
<div class="post-pager is-flex">
|
||||
<div class="is-half">
|
||||
<a href="/blog/2016/02/15/announcing-the-drupal-vm-generator">
|
||||
« Announcing the Drupal VM Generator
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="is-half text-right">
|
||||
<a href="/blog/2016/07/15/building-gmail-filters-with-php">
|
||||
Building Gmail Filters with PHP »
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-author">
|
||||
<h2>About the Author</h2>
|
||||
|
||||
<img src="//images.oliverdavies.uk/assets/images/me-precedent.jpg" alt="Picture of Oliver" class="img-circle">
|
||||
|
||||
<p>Oliver Davies is a Web Developer, System Administrator and Drupal specialist based in the UK. He is a Senior Developer at <a href="https://microserve.io">Microserve</a> and also provides freelance consultancy services for Drupal websites, PHP applications and Linux servers.</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="panel badges text-center">
|
||||
<a class="badge--da-member" href="https://assoc.drupal.org/membership" title="I’m a Drupal Association member.">
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/da-individual-member.png"
|
||||
alt="Drupal Association Individual Member"
|
||||
width="152"
|
||||
>
|
||||
</a>
|
||||
|
||||
<a href="http://drupalcores.com/#opdavies">
|
||||
<img
|
||||
alt="I built Drupal 8 with hand holding a wrench on blue background"
|
||||
src="//images.oliverdavies.uk/assets/images/drupal-8.jpg"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/badges/acquia-certified-developer-drupal-8.png"
|
||||
alt="Acquia Certified Developer - Drupal 8 Exam Badge"
|
||||
height="147" width="147"
|
||||
/>
|
||||
|
||||
<a href="http://conference.phpnw.org.uk/phpnw17">
|
||||
<img src="//images.oliverdavies.uk/assets/images/badges/phpnw17.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="availability panel panel-default">
|
||||
<div class="panel-heading">Availability</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-up text-warning"></i>
|
||||
|
||||
|
||||
Currently have limited part-time capacity
|
||||
</p>
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-down text-danger"></i>
|
||||
|
||||
Currently no spare full-time capacity.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="latest-posts panel panel-default">
|
||||
<div class="latest-posts__heading panel-heading">Latest blog posts</div>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/06/09/introducing-the-drupal-meetups-twitterbot">
|
||||
Introducing the Drupal Meetups Twitterbot
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">9th June, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/20/turning-drupal-module-into-feature">
|
||||
Turning Your Custom Drupal Module into a Feature
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">20th May, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/15/drupalcamp-bristol-early-bird-tickets-sessions-sponsors">
|
||||
DrupalCamp Bristol 2017 - Early Bird Tickets, Call for Sessions, Sponsors
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">15th May, 2017</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> </div>
|
||||
<footer class="container">
|
||||
<p class="copyright">
|
||||
© 2010-2017 Oliver Davies. Built with <a href="https://sculpin.io">Sculpin</a>.
|
||||
</p>
|
||||
|
||||
<div class="meetups">
|
||||
<h2>Things that I organise</h2>
|
||||
<ul>
|
||||
<li class="meetups--drupal-bristol">
|
||||
<a href="http://www.drupalbristol.org.uk" title="Drupal Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupal-bristol.jpeg" alt="Drupal Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--drupalcamp-bristol">
|
||||
<a href="http://www.drupalcampbristol.co.uk" title="DrupalCamp Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupalcamp-bristol.png" alt="DrupalCamp Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--phpsw">
|
||||
<a href="http://phpsw.uk" title="PHPSW">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/phpsw.jpeg" alt="PHPSW">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://www.oliverdavies.uk/assets/js/site.js"></script>
|
||||
|
||||
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-11967257-1', 'auto'); ga('send', 'pageview');</script>
|
||||
|
||||
</body>
|
||||
</html>
|
290
docs/blog/2016/07/15/building-gmail-filters-with-php/index.html
Normal file
290
docs/blog/2016/07/15/building-gmail-filters-with-php/index.html
Normal file
|
@ -0,0 +1,290 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-GB">
|
||||
<head>
|
||||
<title>Building Gmail Filters with PHP | Oliver Davies</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<meta property="og:url" content="https://www.oliverdavies.uk/blog/2016/07/15/building-gmail-filters-with-php">
|
||||
<meta property="og:title" content="Building Gmail Filters with PHP"/>
|
||||
|
||||
|
||||
|
||||
<meta property="og:image" content="https://www.oliverdavies.uk/assets/images/me-precedent.jpg"/>
|
||||
<meta property="og:image:height" content="327"/>
|
||||
<meta property="og:image:type" content="image/jpg">
|
||||
<meta property="og:image:width" content="327"/>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/main.css">
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/blog-post.css">
|
||||
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=57" sizes="57x57">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=114" sizes="114x114">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=72" sizes="72x72">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=144" sizes="144x144">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=60" sizes="60x60">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=120" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=76" sizes="76x76">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=152" sizes="152x152">
|
||||
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=160" sizes="160x160">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=96" sizes="96x96">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=32" sizes="32x32">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=16" sizes="16x16">
|
||||
</head>
|
||||
<body class="">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="https://www.oliverdavies.uk/">Oliver Davies</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="">
|
||||
<a href="/">About</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/experience">Experience</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/testimonials">Testimonials</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/talks">Talks</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
<a href="/blog">Blog</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/contact">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> </div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<main class="col-md-9">
|
||||
<h1>Building Gmail Filters with PHP</h1>
|
||||
|
||||
<p class="posted">15th July 2016</p>
|
||||
|
||||
<p>Earlier this week I wrote a small PHP library called <a href="https://github.com/opdavies/gmail-filter-builder">GmailFilterBuilder</a> that allows you to write Gmail filters in PHP and export them to XML.</p>
|
||||
|
||||
<p>I was already aware of a Ruby library called <a href="https://github.com/antifuchs/gmail-britta">gmail-britta</a> that does the same thing, but a) I’m not that familiar with Ruby so the syntax wasn’t that natural to me - it’s been a while since I wrote any Puppet manifests, and b) it seemed like a interesting little project to work on one evening.</p>
|
||||
|
||||
<p>The library contains two classes - <code>GmailFilter</code> which is used to create each filter, and <code>GmailFilterBuilder</code> that parses the filters and generates the XML using a <a href="http://twig.sensiolabs.org">Twig</a> template.</p>
|
||||
|
||||
<h2 id="usage">Usage</h2>
|
||||
|
||||
<p>For example:</p>
|
||||
|
||||
<pre><code class="language-php"># test.php
|
||||
|
||||
require __DIR__ '/vendor/autoload.php';
|
||||
|
||||
use Opdavies\GmailFilterBuilder\Builder;
|
||||
use Opdavies\GmailFilterBuilder\Filter;
|
||||
|
||||
$filters = [];
|
||||
|
||||
$filters[] = Filter::create()
|
||||
->has('from:example@test.com')
|
||||
->labelAndArchive('Test')
|
||||
->neverSpam();
|
||||
|
||||
new Builder($filters);
|
||||
</code></pre>
|
||||
|
||||
<p>In this case, an email from <code>example@test.com</code> would be archived, never marked as spam, and have a label of "Test" added to it.</p>
|
||||
|
||||
<p>With this code written, and the GmailFilterBuilder library installed via Composer, I can run <code>php test.php</code> and have the XML written to the screen.</p>
|
||||
|
||||
<p>This can also be written to a file - <code>php test.php > filters.xml</code> - which can then be imported into Gmail.</p>
|
||||
|
||||
<h2 id="twig-extensions">Twig Extensions</h2>
|
||||
|
||||
<p>I also added a custom Twig extension that I moved into a separate <a href="https://packagist.org/packages/opdavies/twig-extensions">twig-extensions</a> library so that I and other people can re-use it in other projects.</p>
|
||||
|
||||
<p>It’s a simple filter that accepts a boolean and returns <code>true</code> or <code>false</code> as a string, but meant that I could remove three ternary operators from the template and replace them with the <code>boolean_string</code> filter.</p>
|
||||
|
||||
<p>Before:</p>
|
||||
|
||||
<pre><code class="language-twig">{{ filter.isArchive ? 'true' : 'false' }}
|
||||
</code></pre>
|
||||
|
||||
<p>After:</p>
|
||||
|
||||
<pre><code class="language-twig">{{ filter.isArchive|boolean_string }}
|
||||
</code></pre>
|
||||
|
||||
<p>This can then be used to generate output like this, whereas having blank values would have resulted in errors when importing to Gmail.</p>
|
||||
|
||||
<pre><code class="language-xml"><apps:property name='shouldArchive' value='true'/>
|
||||
</code></pre>
|
||||
|
||||
<h2 id="example">Example</h2>
|
||||
|
||||
<p>For a working example, see my personal <a href="https://github.com/opdavies/gmail-filters">gmail-filters</a> repository on GitHub.</p>
|
||||
|
||||
<h2 id="resources">Resources</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://packagist.org/packages/opdavies/gmail-filter-builder">The GmailFilterBuilder library on Packagist</a></li>
|
||||
<li><a href="https://github.com/opdavies/gmail-filters">My Gmail filters on GitHub</a></li>
|
||||
<li><a href="https://packagist.org/packages/opdavies/twig-extensions">My Twig Extensions on Packagist</a></li>
|
||||
</ul>
|
||||
|
||||
<p class="tags">
|
||||
Tags:
|
||||
<a href="https://www.oliverdavies.uk/blog/tags/php">php</a>, <a href="https://www.oliverdavies.uk/blog/tags/gmail">gmail</a> </p>
|
||||
<div class="post-pager is-flex">
|
||||
<div class="is-half">
|
||||
<a href="/blog/2016/05/03/simplifying-drupal-migrations-with-xautoload">
|
||||
« Simplifying Drupal Migrations with xautoload
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="is-half text-right">
|
||||
<a href="/blog/2016/12/30/drupal-vm-generator-291-released">
|
||||
Drupal VM Generator 2.9.1 Released »
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-author">
|
||||
<h2>About the Author</h2>
|
||||
|
||||
<img src="//images.oliverdavies.uk/assets/images/me-precedent.jpg" alt="Picture of Oliver" class="img-circle">
|
||||
|
||||
<p>Oliver Davies is a Web Developer, System Administrator and Drupal specialist based in the UK. He is a Senior Developer at <a href="https://microserve.io">Microserve</a> and also provides freelance consultancy services for Drupal websites, PHP applications and Linux servers.</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="panel badges text-center">
|
||||
<a class="badge--da-member" href="https://assoc.drupal.org/membership" title="I’m a Drupal Association member.">
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/da-individual-member.png"
|
||||
alt="Drupal Association Individual Member"
|
||||
width="152"
|
||||
>
|
||||
</a>
|
||||
|
||||
<a href="http://drupalcores.com/#opdavies">
|
||||
<img
|
||||
alt="I built Drupal 8 with hand holding a wrench on blue background"
|
||||
src="//images.oliverdavies.uk/assets/images/drupal-8.jpg"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/badges/acquia-certified-developer-drupal-8.png"
|
||||
alt="Acquia Certified Developer - Drupal 8 Exam Badge"
|
||||
height="147" width="147"
|
||||
/>
|
||||
|
||||
<a href="http://conference.phpnw.org.uk/phpnw17">
|
||||
<img src="//images.oliverdavies.uk/assets/images/badges/phpnw17.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="availability panel panel-default">
|
||||
<div class="panel-heading">Availability</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-up text-warning"></i>
|
||||
|
||||
|
||||
Currently have limited part-time capacity
|
||||
</p>
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-down text-danger"></i>
|
||||
|
||||
Currently no spare full-time capacity.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="latest-posts panel panel-default">
|
||||
<div class="latest-posts__heading panel-heading">Latest blog posts</div>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/06/09/introducing-the-drupal-meetups-twitterbot">
|
||||
Introducing the Drupal Meetups Twitterbot
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">9th June, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/20/turning-drupal-module-into-feature">
|
||||
Turning Your Custom Drupal Module into a Feature
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">20th May, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/15/drupalcamp-bristol-early-bird-tickets-sessions-sponsors">
|
||||
DrupalCamp Bristol 2017 - Early Bird Tickets, Call for Sessions, Sponsors
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">15th May, 2017</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> </div>
|
||||
<footer class="container">
|
||||
<p class="copyright">
|
||||
© 2010-2017 Oliver Davies. Built with <a href="https://sculpin.io">Sculpin</a>.
|
||||
</p>
|
||||
|
||||
<div class="meetups">
|
||||
<h2>Things that I organise</h2>
|
||||
<ul>
|
||||
<li class="meetups--drupal-bristol">
|
||||
<a href="http://www.drupalbristol.org.uk" title="Drupal Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupal-bristol.jpeg" alt="Drupal Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--drupalcamp-bristol">
|
||||
<a href="http://www.drupalcampbristol.co.uk" title="DrupalCamp Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupalcamp-bristol.png" alt="DrupalCamp Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--phpsw">
|
||||
<a href="http://phpsw.uk" title="PHPSW">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/phpsw.jpeg" alt="PHPSW">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://www.oliverdavies.uk/assets/js/site.js"></script>
|
||||
|
||||
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-11967257-1', 'auto'); ga('send', 'pageview');</script>
|
||||
|
||||
</body>
|
||||
</html>
|
240
docs/blog/2016/12/30/drupal-vm-generator-291-released/index.html
Normal file
240
docs/blog/2016/12/30/drupal-vm-generator-291-released/index.html
Normal file
|
@ -0,0 +1,240 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-GB">
|
||||
<head>
|
||||
<title>Drupal VM Generator 2.9.1 Released | Oliver Davies</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
<meta property="og:url" content="https://www.oliverdavies.uk/blog/2016/12/30/drupal-vm-generator-291-released">
|
||||
<meta property="og:title" content="Drupal VM Generator 2.9.1 Released"/>
|
||||
|
||||
|
||||
|
||||
<meta property="og:image" content="https://www.oliverdavies.uk/assets/images/me-precedent.jpg"/>
|
||||
<meta property="og:image:height" content="327"/>
|
||||
<meta property="og:image:type" content="image/jpg">
|
||||
<meta property="og:image:width" content="327"/>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/main.css">
|
||||
<link rel="stylesheet" href="https://www.oliverdavies.uk/assets/css/blog-post.css">
|
||||
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=57" sizes="57x57">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=114" sizes="114x114">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=72" sizes="72x72">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=144" sizes="144x144">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=60" sizes="60x60">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=120" sizes="120x120">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=76" sizes="76x76">
|
||||
<link rel="apple-touch-icon" href="/assets/images/me-precedent.jpg?s=152" sizes="152x152">
|
||||
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=160" sizes="160x160">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=96" sizes="96x96">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=32" sizes="32x32">
|
||||
<link rel="icon" href="/assets/images/me-precedent.jpg?s=16" sizes="16x16">
|
||||
</head>
|
||||
<body class="">
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="https://www.oliverdavies.uk/">Oliver Davies</a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse" role="navigation">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="">
|
||||
<a href="/">About</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/experience">Experience</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/testimonials">Testimonials</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/talks">Talks</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
<a href="/blog">Blog</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="/contact">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> </div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<main class="col-md-9">
|
||||
<h1>Drupal VM Generator 2.9.1 Released</h1>
|
||||
|
||||
<p class="posted">30th December 2016</p>
|
||||
|
||||
<p>I spent some time yesterday working on the <a href="http://www.drupalvmgenerator.com">Drupal VM Generator</a>, and have released versions 2.8.1, 2.9.0 and 2.9.1.</p>
|
||||
|
||||
<p>The main updates are:</p>
|
||||
|
||||
<ul>
|
||||
<li>Fixed an <code>InvalidResponseException</code> that was thrown from within the <code>boolean_as_string</code> Twig filter from the opdavies/twig-extensions library when the <code>config:generate</code> command was run in non-interactive mode.</li>
|
||||
<li>Adding a working test suite for the existing commands, using PhpUnit and Symfony’s Process component. This is now linked to <a href="https://travis-ci.org/opdavies/drupal-vm-generator">Travis CI</a>, and the tests are run on each commit and pull request.</li>
|
||||
<li>The version requirements have been changed to allow 2.7 versions of the used Symfony Components, as well as the 3.x versions. This was done to resolve a conflict when also installing Drush globally with Composer.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="next-steps">Next Steps</h2>
|
||||
|
||||
<p>Currently the project is based on Drupal VM 3.0.0 which is an outdated version (<a href="https://github.com/geerlingguy/drupal-vm/releases/tag/4.1.0">4.1.0</a> was released today). Adding updates and supporting the newer versions is a high priority, as well as keeping in sync with new releases. This will be easier with the test suite in place.</p>
|
||||
|
||||
<p>My initial thoughts are that version 2.10.0 will support Drupal VM 4.0.0, and if needed, 2.11.0 will ship shortly afterwards and support Drupal VM 4.1.0.</p>
|
||||
|
||||
<p class="tags">
|
||||
Tags:
|
||||
<a href="https://www.oliverdavies.uk/blog/tags/drupal-vm-generator">drupal-vm-generator</a>, <a href="https://www.oliverdavies.uk/blog/tags/releases">releases</a> </p>
|
||||
<div class="post-pager is-flex">
|
||||
<div class="is-half">
|
||||
<a href="/blog/2016/07/15/building-gmail-filters-with-php">
|
||||
« Building Gmail Filters with PHP
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="is-half text-right">
|
||||
<a href="/blog/2017/01/07/easier-sculpin-commands-with-composer-and-npm-scripts">
|
||||
Easier Sculpin Commands with Composer and NPM Scripts »
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about-author">
|
||||
<h2>About the Author</h2>
|
||||
|
||||
<img src="//images.oliverdavies.uk/assets/images/me-precedent.jpg" alt="Picture of Oliver" class="img-circle">
|
||||
|
||||
<p>Oliver Davies is a Web Developer, System Administrator and Drupal specialist based in the UK. He is a Senior Developer at <a href="https://microserve.io">Microserve</a> and also provides freelance consultancy services for Drupal websites, PHP applications and Linux servers.</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="panel badges text-center">
|
||||
<a class="badge--da-member" href="https://assoc.drupal.org/membership" title="I’m a Drupal Association member.">
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/da-individual-member.png"
|
||||
alt="Drupal Association Individual Member"
|
||||
width="152"
|
||||
>
|
||||
</a>
|
||||
|
||||
<a href="http://drupalcores.com/#opdavies">
|
||||
<img
|
||||
alt="I built Drupal 8 with hand holding a wrench on blue background"
|
||||
src="//images.oliverdavies.uk/assets/images/drupal-8.jpg"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<img
|
||||
src="//images.oliverdavies.uk/assets/images/badges/acquia-certified-developer-drupal-8.png"
|
||||
alt="Acquia Certified Developer - Drupal 8 Exam Badge"
|
||||
height="147" width="147"
|
||||
/>
|
||||
|
||||
<a href="http://conference.phpnw.org.uk/phpnw17">
|
||||
<img src="//images.oliverdavies.uk/assets/images/badges/phpnw17.png" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="availability panel panel-default">
|
||||
<div class="panel-heading">Availability</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-up text-warning"></i>
|
||||
|
||||
|
||||
Currently have limited part-time capacity
|
||||
</p>
|
||||
<p>
|
||||
<i class="fa fa-thumbs-o-down text-danger"></i>
|
||||
|
||||
Currently no spare full-time capacity.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="latest-posts panel panel-default">
|
||||
<div class="latest-posts__heading panel-heading">Latest blog posts</div>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/06/09/introducing-the-drupal-meetups-twitterbot">
|
||||
Introducing the Drupal Meetups Twitterbot
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">9th June, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/20/turning-drupal-module-into-feature">
|
||||
Turning Your Custom Drupal Module into a Feature
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">20th May, 2017</span>
|
||||
</li>
|
||||
<li class="post list-group-item">
|
||||
<span class="post__title">
|
||||
<a href="/blog/2017/05/15/drupalcamp-bristol-early-bird-tickets-sessions-sponsors">
|
||||
DrupalCamp Bristol 2017 - Early Bird Tickets, Call for Sessions, Sponsors
|
||||
</a>
|
||||
</span> -
|
||||
<span class="post__date">15th May, 2017</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> </div>
|
||||
<footer class="container">
|
||||
<p class="copyright">
|
||||
© 2010-2017 Oliver Davies. Built with <a href="https://sculpin.io">Sculpin</a>.
|
||||
</p>
|
||||
|
||||
<div class="meetups">
|
||||
<h2>Things that I organise</h2>
|
||||
<ul>
|
||||
<li class="meetups--drupal-bristol">
|
||||
<a href="http://www.drupalbristol.org.uk" title="Drupal Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupal-bristol.jpeg" alt="Drupal Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--drupalcamp-bristol">
|
||||
<a href="http://www.drupalcampbristol.co.uk" title="DrupalCamp Bristol">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/drupalcamp-bristol.png" alt="DrupalCamp Bristol">
|
||||
</a>
|
||||
</li>
|
||||
<li class="meetups--phpsw">
|
||||
<a href="http://phpsw.uk" title="PHPSW">
|
||||
<img src="//images.oliverdavies.uk/assets/images/meetups/phpsw.jpeg" alt="PHPSW">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://www.oliverdavies.uk/assets/js/site.js"></script>
|
||||
|
||||
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-11967257-1', 'auto'); ga('send', 'pageview');</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue