Skip to content

Instantly share code, notes, and snippets.

diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index d124160..005275b 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -81,7 +81,7 @@ class Drupal {
/**
* The current system version.
*/
- const VERSION = '8.2.0';
+ const VERSION = '8.2.1';
diff --git core/includes/install.inc core/includes/install.inc
index 61725da..43c66d6 100644
--- core/includes/install.inc
+++ core/includes/install.inc
@@ -940,6 +940,7 @@ function drupal_check_profile($profile) {
$listing = new ExtensionDiscovery(\Drupal::root());
$module_list = $listing->scan('module');
foreach ($info['dependencies'] as $module) {
+ if (empty($module_list[$module])) assert(FALSE, $module);
$file = \Drupal::root() . '/' . $module_list[$module]->getPath() . "/$module.install";

Installing Coder Sniffer https://www.drupal.org/node/1419988

Install

composer global require drupal/coder squizlabs/php_codesniffer

Init

~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer

views$ git blame -L 1981,1989 views.module
2dd76fe0 (Earl Miles 2009-11-02 22:01:27 +0000 1981) function views_exposed_form($form, &$form_state) {
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1982) // Don't show the form when batch operations are in progress.
4f09d3fd (Earl Miles 2010-10-14 20:04:09 +0000 1983) if ($batch = batch_get() && isset($batch['current_set'])) {
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1984) return array(
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1985) // Set the theme callback to be nothing to avoid errors in template_preprocess_views_exposed_form().
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1986) '#theme' => '',
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1987) );
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1988) }
31dd0540 (The Great Git Migration 2009-10-05 22:49:04 +0000 1989)
<?php
/**
* @file
* Contains \Drupal\idevels_proconsort_utility\Plugin\Field\FieldWidget\InlineEntityFormCustom.
*/
namespace Drupal\idevels_proconsort_utility\Plugin\Field\FieldWidget;
use Drupal\Core\Field\FieldItemListInterface;
@andypost
andypost / ConfigUpdater.php
Last active March 16, 2016 19:41
usage `$reverter = \Drupal::service('config_update.config_update'); $reverter->revert('user_role', 'administrator');` in hook_update_N()
<?php
/**
* @file
* Contains \Drupal\custom_utility\ConfigUpdater.
*/
namespace Drupal\custom_utility;
use Drupal\config\StorageReplaceDataWrapper;
langcode: en
status: true
dependencies:
config:
- system.menu.main
module:
- node
- user
id: www
label: www
$ drush @d8 ev "var_dump(\Drupal::service('plugin.manager.element_info')->getDefinitions());"
array(65) {
["contextual_links"]=>
array(3) {
["id"]=>
string(16) "contextual_links"
["class"]=>
string(41) "Drupal\contextual\Element\ContextualLinks"
["provider"]=>
diff --git a/composer.json b/composer.json
index 901e0fb..67fdab8 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
],
"merge-plugin": {
"include": [
- "core/composer.json"
+ "core/composer.json", "modules/contrib/*/composer.json"