lando / lando

A development tool for all your projects that is fast, easy, powerful and liberating
https://lando.dev
GNU General Public License v3.0
4.1k stars 544 forks source link

XSLTProcessor missing from Pantheon recipe #1112

Closed seanr closed 5 years ago

seanr commented 6 years ago

Tell us about your setup

v3.0.0-beta.47, OS X 10.13.5

Tell us about your .lando.yml

# Pantheon recipe
name: [redacted]

# Start with the default Pantheon recipe
recipe: pantheon

# Configure the Pantheon recipe
config:

  # Optionally specify the type of Pantheon site this is. If ommitted this will
  # default to `drupal`. You can use the following options
  #
  #   - `backdrop`
  #   - `drupal` (for Drupal 6 and Drupal 7 sites)
  #   - `drupal8`
  #   - `wordpress`
  #
  framework: drupal8

  # Optionally activate xdebug
  #
  # If you are having trouble getting xdebug to work please see:
  # https://docs.devwithlando.io/services/php.html#using-xdebug
  xdebug: true

  # Optionally specify the site id, name and environment for your Pantheon site
  #
  # This is helpful for running terminus commands or performing similar operations
  id: [redacted]
  site: [redacted]
(...other irrelevant stuff)

Tell us about the command you were running

Pantheon's servers have the XSLTProcessor available, but Lando's Pantheon recipe does not. Test this by running dpm((class_exists('XSLTProcessor')) ? 'true' : 'false'); from /devel/php on a Drupal install with the devel module enabled.

Tell us about the error you got

Fatal error: Class 'XSLTProcessor' not found

Tell us generally about your bug

As above; mismatch between actual Pantheon config and Lando Pantheon recipe.

uberhacker commented 6 years ago

In the meantime, you can fix this issue by adding the following in .lando.yml:

services:
  appserver:
    run_as_root: |
      # install missing xsl extension
      if [ ! -f /usr/include/libxslt/xslt.h ]; then apt update && apt install libxslt1-dev -y && docker-php-ext-install xsl && docker-php-ext-enable xsl; fi

To test if the extension was installed correctly, execute:

$ lando php -m | grep xsl
jcandan commented 6 years ago

So, if I wanted to submit a PR for this, I am not sure how to edit the Pantheon recipe. Am I looking for a .yml file somewhere?

jcandan commented 6 years ago

I guess we just need to add it to the Dockerfile in each of the fpm directories in lando/plugins/lando-recipes/recipes/pantheon/.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.