Skip to content

Instantly share code, notes, and snippets.

View damiankloip's full-sized avatar

Damian Lee damiankloip

View GitHub Profile
@damiankloip
damiankloip / config.php
Created September 5, 2015 14:29
Drush PsySH config
<?php
$config = [];
# If the shell has been booted by drush check for a version file.
if (function_exists('drush_drupal_major_version')) {
$drupal_version = drush_drupal_major_version();
$include_path = __DIR__ . '/includes';
$drupal_version_include = "$include_path/drupal-$drupal_version.php";
@damiankloip
damiankloip / gist:b41b920abebb131ca3c6
Last active August 29, 2015 14:23
Auth collector
diff --git a/core/core.services.yml b/core/core.services.yml
index 5a9cd6e..d89ebc7 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -1226,6 +1226,9 @@ services:
- [setThemeManager, ['@theme.manager']]
authentication:
class: Drupal\Core\Authentication\AuthenticationManager
+ arguments: ['@authentication_collector']
+ authentication_collector:
@damiankloip
damiankloip / atom-extra.cfg
Created June 17, 2015 07:31
Atom custom configuration
[application]
name = Atom extra
[configuration_files]
.atom/packages.list
diff --git a/index.php b/index.php
index 750dc28..314c482 100644
--- a/index.php
+++ b/index.php
@@ -13,7 +13,10 @@
$autoloader = require_once 'autoload.php';
-$kernel = new DrupalKernel('prod', $autoloader);
+// Get the environment.
diff --git a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
index 2285c53..7ba07b9 100644
--- a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
+++ b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
@@ -355,21 +355,7 @@ public function generateOutputKey() {
* An array of cache tags based on the current view.
*/
public function getCacheTags() {
- $tags = $this->view->storage->getCacheTags();
-
diff --git a/core/modules/system/src/Plugin/views/field/BulkForm.php b/core/modules/system/src/Plugin/views/field/BulkForm.php
index 5587ffa..4e42203 100644
--- a/core/modules/system/src/Plugin/views/field/BulkForm.php
+++ b/core/modules/system/src/Plugin/views/field/BulkForm.php
@@ -7,9 +7,13 @@
namespace Drupal\system\Plugin\views\field;
+use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityStorageInterface;
diff --git a/core/lib/Drupal/Core/Cache/MultiBackend.php b/core/lib/Drupal/Core/Cache/MultiBackend.php
new file mode 100644
index 0000000..6414543
--- /dev/null
+++ b/core/lib/Drupal/Core/Cache/MultiBackend.php
@@ -0,0 +1,213 @@
+<?php
+
+/**
+ * @file
diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php
index b10b948..78cd431 100644
--- a/core/modules/views/src/Plugin/views/HandlerBase.php
+++ b/core/modules/views/src/Plugin/views/HandlerBase.php
@@ -133,7 +133,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
$options['field'] = $this->actualField;
}
- $this->unpackOptions($this->options, $options);
+ $this->doUnpackOptions($options);
@damiankloip
damiankloip / gist:c92746daea1b35edec53
Last active August 29, 2015 14:08
ElementInfoManager::buildInfo()
Overall Diff Summary
Run #5458fe6eb3cab Run #5458ffd1dc5ce Diff Diff%
Number of Function Calls 3,044 29 -3,015 -99.0%
Incl. Wall Time (microsec) 46,623 1,647 -44,976 -96.5%
Incl. CPU (microsecs) 26,538 1,645 -24,893 -93.8%
Incl. MemUse (bytes) 2,653,320 341,000 -2,312,320 -87.1%
Incl. PeakMemUse (bytes) 1,731,504 340,584 -1,390,920 -80.3%
diff --git a/core/lib/Drupal/Core/Cache/CacheCollectorBackend.php b/core/lib/Drupal/Core/Cache/CacheCollectorBackend.php
new file mode 100644
index 0000000..b5b9b40
--- /dev/null
+++ b/core/lib/Drupal/Core/Cache/CacheCollectorBackend.php
@@ -0,0 +1,398 @@
+<?php
+
+/**
+ * @file