This file contains 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 | |
/** | |
* This plugin creates a new paragraph entity based on the source. | |
* | |
* @MigrateProcessPlugin( | |
* id = "mds_paragraph" | |
* ) | |
*/ | |
class ParagraphMigrateProcessor extends ParagraphProcessBase { |
This file contains 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
for module in `ls`; do git add -A $module; git commit -m "Updated $module"; done |
This file contains 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
/** | |
* Update the {redirect} table. | |
*/ | |
function np8_update_update_8004() { | |
// Drop the title column. | |
if (db_field_exists('redirect', 'redirect_source__title')) { | |
db_drop_field('redirect', 'redirect_source__title'); | |
} | |
// We assume there are no options stored and just rename it to query. | |
if (db_field_exists('redirect', 'redirect_source__uri')) { |
This file contains 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
diff --git a/core/lib/Drupal/Core/Form/FormCache.php b/core/lib/Drupal/Core/Form/FormCache.php | |
index a35000d..6ddcccc 100644 | |
--- a/core/lib/Drupal/Core/Form/FormCache.php | |
+++ b/core/lib/Drupal/Core/Form/FormCache.php | |
@@ -212,8 +212,40 @@ public function setCache($form_build_id, $form, FormStateInterface $form_state) | |
$form_state->addBuildInfo('safe_strings', SafeMarkup::getAll()); | |
if ($data = $form_state->getCacheableArray()) { | |
+ $this->traceMe($data); | |
$this->keyValueExpirableFactory->get('form_state')->setWithExpire($form_build_id, $data, $expire); |
This file contains 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
#! /bin/sh | |
# | |
# Created by configure | |
'./configure' \ | |
'--prefix=/home/berdir/binaries/php7' \ | |
'--with-config-file-path=/home/berdir/binaries/php7' \ | |
'--enable-mbstring' \ | |
'--enable-zip' \ | |
'--enable-bcmath' \ |
This file contains 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 Drupal\Component\Utility\SafeMarkup; | |
$cache = \Drupal::cache(); | |
$before = $start = microtime(TRUE); | |
for ($i = 1; $i < 500000; $i++) { | |
$cache->get('cache_bench_test_' . $i); | |
if ($i % 10000 == 0) { |
This file contains 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 | |
/** | |
* Minifies and removes unneeded cache tags. | |
* | |
* @param array $cache_tags | |
* List of cache tags. | |
* | |
* @return array | |
* Shortened and cleaned up cache tag list. |
This file contains 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
# Defines the schema to store each connection entry. | |
sso_connect.connection.* : | |
type: config_entity | |
label: SSO connection | |
mapping: | |
name: | |
type: label | |
label: 'Name' | |
id: |
This file contains 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
// Dark magic from the darkest pits of drupal. After a session regenerate, | |
// the metadata session bag and $_SESSION are no longer in sync and updates in | |
// there are not reflected. A new token seed is generated when the form is | |
// cached, but then not persistend and the form cache token validation fails. | |
// Manually copy the token seed into $_SESSION. | |
$metadata = \Drupal::service('session_manager.metadata_bag'); | |
$_SESSION['_sf2_meta'][$metadata::CSRF_TOKEN_SEED] = $metadata->getCsrfTokenSeed(); |
This file contains 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 | |
/** | |
* @file | |
* Contains \Drupal\varnish_cache_tag_purger\TagDeletionListener. | |
*/ | |
namespace Drupal\varnish_cache_tag_purger; | |
use Drupal\Core\Cache\NullBackend; |