Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Oct 2015 at 18:27 UTC
Updated:
10 Mar 2016 at 07:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lauriiiComment #5
pwolanin commentedmaking the original meta the parent
Comment #7
lauriiiComment #9
lauriiiComment #11
alexpottThis is a logic change and not quite right - the point of this is to change complex MarkupInterface objects like TranslatableString into Markup objects.
Imo remove them this is just no longer relevant. Autoescape no longer uses a list of safe strings.
No need for additional brackets.
Comment #12
lauriiiComment #13
lauriiiThanks for the review @alexpott!
Comment #14
dawehnerAre you 100% sure that this change is fine? It feels like we are relying on a detail of the renderer inside the RenderCache
Given the previous check, we can remove that one. assertIdentical already ensures that we are dealing with a pure string
Let's use assertInstanceOf here
Comment #16
lauriiiThanks for the review @dawehner! Fixed comments from #14
Comment #17
dawehnerThank you @lauriii
Comment #19
alexpottRe #14.1 @lauriii is right...
if (isset($elements[$cache_property]) && is_scalar($elements[$cache_property]) && $elements[$cache_property] instanceof MarkupInterface) {Doing
is_scalar()and then checking is the thing is aninstanceof MarkupInterfacemakes no sense.Comment #20
lauriiiStupid mistake from me.. This should be green! :)
Comment #22
lauriiiOne more stupid mistake from me
Comment #23
aleksipHello from #2664570: Move Attribute classes under Drupal\Component!
\Drupal\Core\Template\Attributehas redundantuse Drupal\Component\Utility\SafeMarkup;Comment #24
stefan.r commented#22 looks great, just updating those last few comments here!
Comment #25
alexpottThe only usages of
SafeMarkup::isSafe()are inDrupal\Tests\Component\Utility\SafeMarkupTestwhich is testing the deprecated method so this is good to go.Comment #26
alexpottHang on...
Comment #27
alexpottWe can get rid of quite a few use statements which show the SafeMarkup class getting out of the way :)
Comment #29
star-szrGood stuff. The only remaining usages are in core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php.
Since it's not a bug fix and is only removing usages of a deprecated method this only makes sense to commit to 8.1.x.
Committed f7c02df and pushed to 8.1.x. Thanks!