Replace usages of \Drupal::token() with IoC injection
Problem/MotivationFollow up #2729597: [meta] Replace \Drupal with injected services where appropriate in coreProposed resolutionReplace all of them with IoC injection where possibleRemaining tasksUser...
View ArticleReplace usages of \Drupal::typedDataManager() with IoC injection
Problem/MotivationFollow up #2729597: [meta] Replace \Drupal with injected services where appropriate in coreProposed resolutionReplace all of them with IoC injection where possibleRemaining tasksUser...
View ArticleReplace usages of \Drupal::cache() with IoC injection
Problem/MotivationFollow up #2729597: [meta] Replace \Drupal with injected services where appropriate in coreProposed resolutionReplace all of them with IoC injection where possibleRemaining tasksUser...
View ArticleThe $keys_new parameter docblock in Schema::addField is incorrect
The docblock for the addField() function in Drupal\Core\Database\Schema says that the $keys_new parameter format is the same as the table specification without the 'fields' element. This is not true...
View Article[meta] Replace \Drupal with injected services where appropriate in core
Problem/MotivationDrupal currently has two main ways of getting the service discovery container:\DrupalContainerInjectionInterface or similar 'proper' injection pattern.\Drupal is intended to be used...
View Article[policy, no patch] Trait strategy
Problem/MotivationIn light of #1498574: [policy, no patch] Require PHP 5.4 being approved by Dries, we will have Traits available to us for Drupal 8. Yay! OK, so where do we want to use them?Remember,...
View ArticleReplace usages of \Drupal::menuTree() with IoC injection
Problem/MotivationFollow up #2729597: [meta] Replace \Drupal with injected services where appropriate in coreProposed resolutionReplace all of them with IoC injection where possibleRemaining tasksUser...
View ArticleTest SQL Injection
There is any drupal module for SQL Injection testing ?there is any free or paid tool which i can use to test my drupal 8 website SQL Injection issue ?I got a mail from client that our drupal 8 website...
View ArticleCall to a member function transformDimensions() on null in template_preprocess
Migrating node content from older Drupal system to Drupal 8 may carry some contents that have image with image_style that doesn't exist in the Drupal 8 system. In our case, image styles (Default,...
View ArticleProvide a better way to get driver name and database type
Problem/MotivationWe have \Drupal\Core\Database\Install\Tasks::$pdoDriver\Drupal\Core\Database\Connection::databaseType()\Drupal\Core\Database\Connection::driver()And it's not super clear how they...
View ArticleDealing with unexpected file deletion due to incorrect file usage
Problem/MotivationRecently @catch, @webchick, @xjm, @cottser, @cilefen and I discussed #2801777: Give users the option to prevent drupal from automatically marking unused files as temporary , #2810355:...
View ArticleViews filter group does not work properly with exposed filter
I have a view that returns two content type, one of these have an exposed filter of field term so I create a filter group like this group 1: content type news AND published AND an exposed filter field...
View ArticleInstead of relying on file usage, tracking dependency to determine the...
Problem/MotivationFollow up #2821423: Dealing with unexpected file deletion due to incorrect file usage, read through all comments, found that no approaches proposed how to resolve the file usages...
View ArticleReplace usages of \Drupal::transliteration() with IoC injection
Problem/MotivationIn #2729597: [meta] Replace \Drupal with injected services where appropriate in core we generally decided to convert usages of \Drupal methods to inversion-of-control injection, by...
View ArticleReplace usage of AssertLegacyTrait::pass from base test classes
Child of #3123120: Properly deprecate AssertLegacyTrait::pass to keep scope limited.
View ArticleReplace assert(Not)Same/Identical() on booleans with assert(Not)True/False()...
Problem/Motivation$this->assertSame(FALSE, ... and $this->assertSame(TRUE, ... is no longer necessary and can be replace with assertTrue/False().Also $this->assertSame(..., FALSE/TRUE).See...
View ArticleFix 'Drupal.Commenting.DocComment.MissingShort' coding standard
Part of #2571965: [meta] Fix coding standards in core.ApproachWe are testing coding standards with PHP CodeSniffer, using the Drupal coding standards from the Coder module. Both of these packages are...
View ArticleForm tokens are now rendered lazily, so forms now *can* be cacheable: stop...
Problem/Motivation#2559011: Ensure form tokens are marked max-age=0 made sure the form token (a CSRF token) was only set for authenticated users, and ensured it specified max-age=0.#2571995: GET forms...
View ArticleExclude /user/* pages from search results
Right now these pages are indexing by search engines.These rules make no sense because of trailing slash.Disallow: /user/register/Disallow: /user/password/Disallow: /user/login/
View Article