PHP code example of lullabot / drainpipe

1. Go to this page and download the library: Download lullabot/drainpipe library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lullabot / drainpipe example snippets


// Override the default Drainpipe mail configuration.
// This should come after including settings.tugboat.php
if (getenv('TUGBOAT_REPO')) {
  // Example: Use a custom mail transport
  $config['system.mail']['interface']['default'] = 'my_custom_mailer';

  // Example: Configure Symfony Mailer differently
  $config['symfony_mailer.settings']['default_transport'] = 'custom_transport';
  $config['symfony_mailer.mailer_transport.custom_transport']['plugin'] = 'smtp';
  $config['symfony_mailer.mailer_transport.custom_transport']['configuration']['host'] = 'custom.smtp.example.com';
  $config['symfony_mailer.mailer_transport.custom_transport']['configuration']['port'] = '587';
}

  "autoload-dev":
  {
    "files": [
      "vendor/lullabot/drainpipe/scaffold/env/dotenv.php"
    ]
  },
  
yaml
workflows:
  sync_code:
    after:
      - type: webphp
        description: Notify CI after Pantheon code sync
        script: private/scripts/drainpipe_notify_github.php
yaml
workflows:
  sync_code:
    after:
      - type: webphp
        description: Notify CI after Pantheon code sync
        script: private/scripts/drainpipe_notify_gitlab.php

mkdir -p .tugboat/drainpipe-templates
cp vendor/lullabot/drainpipe/scaffold/tugboat/templates/php-init.yml.twig \
   .tugboat/drainpipe-templates/

tugboat:php:init:
  cmds:
    - apt-get install -y libldap2-dev
    - docker-php-ext-install ldap