Skip to content

Instantly share code, notes, and snippets.

View amcgowanca's full-sized avatar

Aaron McGowan amcgowanca

View GitHub Profile
; Globals
;expose_php = on
;max_execution_time = 300
;max_input_time = 900
;max_input_vars = 10000
memory_limit = 1024M
;upload_max_filesize = 256M
;post_max_size = 256M
;error_reporting = E_ALL & ~E_DEPRECATED
;ignore_repeated_errors = on
# Ignore configuration files that may contain sensitive information.
local.settings.php
local.drush.yml
local.site.yml
local.services.yml
tests/behat/local.yml
box/local.config.yml
*.local
local.blt.yml
{
"name": "company/project",
"type": "project",
"description": "Company project description.",
"license": "GPL-2.0-only",
"require": {
"php": ">=7.3",
"drupal/config_split": "^1.0.0",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-recommended": "^8.8.0",
@amcgowanca
amcgowanca / d8-move-anon-user-creation-to-storage.patch
Created March 6, 2019 11:53
Drupal 8: Moves anonymous user creation from User::getAnonymousUser() to storage handler.
diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php
index b8675866..6586cdb8 100644
--- a/core/modules/user/src/Entity/User.php
+++ b/core/modules/user/src/Entity/User.php
@@ -416,20 +416,9 @@ public function checkExistingPassword(UserInterface $account_unchanged) {
*/
public static function getAnonymousUser() {
if (!isset(static::$anonymousUser)) {
-
- // @todo Use the entity factory once available, see
diff --git a/includes/entity.inc b/includes/entity.inc
index 97c8957..518bc2b 100644
--- a/includes/entity.inc
+++ b/includes/entity.inc
@@ -13,7 +13,7 @@ function d8cache_entity_view($entity, $entity_type, $view_mode, $langcode) {
if ($entity_type == 'node' && $view_mode != 'full') {
// @todo Find a better way to add list cache tags.
- $tags = array_merge($tags, _d8cache_entity_get_list_cache_tags($entity_type));
+ $tags = array_merge($tags, _d8cache_entity_get_list_cache_tags($entity_type, $entity));
@amcgowanca
amcgowanca / D7-pathcache-pathinc_reroll.patch
Created July 22, 2018 11:13
Drupal 7.59 reroll of Path Cache modifications
diff --git a/includes/path.inc b/includes/path.inc
index 6bd48d3..d3b8d9f 100644
--- a/includes/path.inc
+++ b/includes/path.inc
@@ -77,8 +77,7 @@ function drupal_lookup_path($action, $path = '', $path_language = NULL) {
$path_language = $path_language ? $path_language : $language_url->language;
if ($action == 'wipe') {
- $cache = array();
- $cache['whitelist'] = drupal_path_alias_whitelist_rebuild();
@amcgowanca
amcgowanca / jsinjection-prosperworks-gmail.js
Created June 25, 2018 13:00
Helper script for ProsperWorks bugging display behaviour in new Gmail UI
(function (document) {
function updateZIndexValue() {
var elements = document.getElementsByClassName('PWExtensionFrame');
if (elements.length <= 0) {
setTimeout(updateZIndexValue, 500);
console.log('ProsperWorks plugin does not appear initialized yet, waiting...');
return;
}
@amcgowanca
amcgowanca / lightning_workflow-lightning_scheduler-cron-bypass-access.patch
Created April 27, 2018 09:45
Acquia Lightning's Scheduler module needs to bypass access checks during CRON
diff --git a/modules/lightning_scheduler/lightning_scheduler.module b/modules/lightning_scheduler/lightning_scheduler.module
index 94a28a7..61e1532 100644
--- a/modules/lightning_scheduler/lightning_scheduler.module
+++ b/modules/lightning_scheduler/lightning_scheduler.module
@@ -74,6 +74,7 @@ function lightning_scheduler_cron() {
->getStorage($entity_type_id)
->getQuery()
->condition('scheduled_publication', $now, '<=')
+ ->accessCheck(FALSE)
->execute();
@amcgowanca
amcgowanca / ExcludeModule.php
Created November 25, 2017 13:42
Drupal 8: Exclude single modules from always writing to core.extension.yml
<?php
namespace Drupal\module_name\Plugin\ConfigFilter;
use Drupal\config_filter\Plugin\ConfigFilterBase;
/**
* Excludes a set of extensions from exporting to core.extension.yml.
*
* @ConfigFilter(
@amcgowanca
amcgowanca / settings.php
Created September 10, 2017 14:16
Drupal 8: Disable cache entirely...
<?php
$cache_bins = array('bootstrap','config', 'data','default','discovery', 'dynamic_page_cache', 'entity','menu','migrate','render','rest','static','toolbar');
foreach ($cache_bins as $bin) {
$settings['cache']['bins'][$bin] = 'cache.backend.null';
}