Comments

alexpott’s picture

Title: Remove Utility\String::decodeEntities() function » Remove Utility\String class
Issue summary: View changes

Let's remove the class in one go.

alexpott’s picture

Removing the class in one go means that the bc layer hangs around for longer which is good for contrib.

andypost’s picture

Issue tags: +@deprecated, +Novice
stefan.r’s picture

Status: Postponed » Needs review
StatusFileSize
new525.1 KB

Status: Needs review » Needs work

The last submitted patch, 4: 2458387-remove-utilitystring-4.patch, failed testing.

anksy’s picture

Status: Needs work » Needs review
StatusFileSize
new6.79 KB
new529.83 KB

Status: Needs review » Needs work

The last submitted patch, 6: remove_utility_string-2458387-6.patch, failed testing.

stefan.r’s picture

Status: Needs work » Needs review
StatusFileSize
new650.12 KB

Disregard #4, seems I may have run a faulty sed regex there!

Status: Needs review » Needs work

The last submitted patch, 8: 2458387-remove-utilitystring-8.patch, failed testing.

stefan.r’s picture

Status: Needs work » Needs review
StatusFileSize
new650.12 KB

Status: Needs review » Needs work

The last submitted patch, 10: 2458387-remove-utilitystring-10.patch, failed testing.

stefan.r’s picture

Status: Needs work » Needs review
StatusFileSize
new650.08 KB

Status: Needs review » Needs work

The last submitted patch, 12: 2458387-remove-utilitystring-12.patch, failed testing.

stefan.r’s picture

Status: Needs work » Needs review
StatusFileSize
new650.55 KB
tim.plunkett’s picture

Status: Postponed » Needs work

The last submitted patch, 14: 2458387-remove-utilitystring-14.patch, failed testing.

andypost’s picture

Status: Needs work » Postponed
stefan.r’s picture

On both #2457781: Use Utility\Html class instead of Utility\String for decodeEntities() function and #2457887: Use Utility\SafeMarkup class instead of Utility\String for placeholder(), checkPlain(),format() functions then I guess. Even after resolving conflicts between these and applying them there are still going to be some stray unused "use Utility/String" statements as well.

Seems like this patch accidently rolled all of these 3 issues into 1 big patch :)

berdir’s picture

Changing parent, so all these issues are visible in the php7 meta issue.

andypost’s picture

Status: Postponed » Active
stefan.r’s picture

This will require a reroll after #2457781: Use Utility\Html class instead of Utility\String for decodeEntities() function still so we can get rid of any stray unused "use Utility/String" statements...

alexpott’s picture

This should only be done after the next beta to give contrib and custom time to update their code.

stefan.r’s picture

Status: Active » Postponed
stefan.r’s picture

Issue summary: View changes
stefan.r’s picture

Looks like unused "use Utility/String" statements are being removed here: #2462151: Remove unused Utility\String use statements

stefan.r’s picture

Status: Postponed » Needs review
StatusFileSize
new7.51 KB

Just so PHP7 doesn't choke on the next Drupal 8 beta, what about this as a stop-gap solution before we remove the class entirely?

stefan.r’s picture

StatusFileSize
new7.5 KB

whitespace fix

andypost’s picture

+++ b/core/lib/Drupal/Component/Utility/String.php
@@ -7,98 +7,105 @@
+// String is a reserved word as of PHP version 7.
+if (version_compare(PHP_VERSION, '7.0-dev', '<')) {
...
+  class String {
...
+    public static function checkPlain($text) {
...
+    public static function decodeEntities($text) {
...
+    public static function format($string, array $args = array()) {
...
+    public static function placeholder($text) {

PHP 7-dev does not have this methods, so just remove the file and postpone the issue

alexpott’s picture

And as long as we don't use the class - which we're not then PHP7 will run D8 just fine.

stefan.r’s picture

Status: Needs review » Postponed
StatusFileSize
new3.79 KB

Ah never mind then, I thought the mere class definition would be problematic!

stefan.r’s picture

andypost’s picture

Status: Postponed » Needs review
Parent issue: » #2205673: [META] Remove all @deprecated functions marked "remove before 8.0"

probably it's time

rpayanm’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Postponed

Nope - not until after the next beta please - which is 29th April... https://groups.drupal.org/node/466823

hussainweb’s picture

Status: Postponed » Reviewed & tested by the community

The patch still applies, and the beta10 is out. I am setting it to back to RTBC as per #34.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yep, sounds good.

Committed and pushed to 8.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.