This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run one time, value must match value xdebug.idekey in the PHP config. | |
export XDEBUG_CONFIG="idekey=123" | |
export PHP_IDE_CONFIG="serverName=example.local" | |
# Toggle to enable/disable Xdebug. | |
export XDEBUG_CONFIG="remote_enable=1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \Drupal\Core\Config\StorageInterface $config_storage */ | |
$config_storage = \Drupal::service('config.storage'); | |
$path = drupal_get_path('module', 'module_name') . '/config/install'; | |
$file_storage = new \Drupal\Core\Config\FileStorage($path); | |
$id = 'full.config.identifier'; | |
$config_storage->write($id, $file_storage->read($id)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', TRUE); | |
ini_set('display_startup_errors', TRUE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | |
// Build the container. | |
$container = new ContainerBuilder(); | |
$loader = new YamlFileLoader($container, new FileLocator(__DIR__)); | |
$loader->load('services.yml'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Adjust as needed to run desired migration in desired multidev. | |
SITE_ID=[site_env] | |
MIGRATION=[migration_id`] | |
CONTINUE=0 | |
while [ $CONTINUE -eq 0 ] | |
do | |
echo "Running migration command..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rename files & strip uuids | |
for f in *.yml; do mv "$f" "$(echo "$f" | sed s/node.experience/node.event/)"; done | |
for f in *.yml; do sed -i '' -e '/^uuid: /d' "$f"; done | |
# search/replace contents | |
for f in *.yml; do sed -i '' -e 's/node\.experience/node\.event/' "$f"; done | |
for f in *.yml; do sed -i '' -e 's/node\.type\.experience/node\.type\.event/' "$f"; done | |
for f in *.yml; do sed -i '' -e 's/bundle: experience/bundle: event/' "$f"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Behat\Behat\Context\Context; | |
/** | |
* Defines application features from the specific context. | |
*/ | |
class FieldContext implements Context { | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Behat\Mink\Mink; | |
use Behat\MinkExtension\Context\MinkAwareContext; | |
/** | |
* Class EntityReferenceContext. | |
*/ | |
class EntityReferenceContext implements MinkAwareContext { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Error reporting. | |
error_reporting(E_ALL); | |
ini_set('display_errors', TRUE); | |
ini_set('display_startup_errors', TRUE); | |
ini_set('memory_limit', '64M'); | |
# Drupal mail system to DevelMailLog. | |
$conf['mail_system'] = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Behat\Gherkin\Node\PyStringNode; | |
use Behat\Mink\Element\NodeElement; | |
use Behat\Mink\Mink; | |
use Behat\MinkExtension\Context\MinkAwareContext; | |
/** | |
* Class FileContext. | |
*/ |