From 854a48bf6b7cc57b350359324865eee04bebaf90 Mon Sep 17 00:00:00 2001
From: Larry Garfield <larry@garfieldtech.com>
Date: Fri, 28 Sep 2012 11:55:12 -0500
Subject: [PATCH] Remove workarounds for Symfony limitations that have been
 fixed.

---
 core/lib/Drupal/Core/Routing/MatcherDumper.php | 7 +------
 core/lib/Drupal/Core/Routing/PathMatcher.php   | 2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/core/lib/Drupal/Core/Routing/MatcherDumper.php b/core/lib/Drupal/Core/Routing/MatcherDumper.php
index 693c356dec0e..48b2d8c1d16b 100644
--- a/core/lib/Drupal/Core/Routing/MatcherDumper.php
+++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php
@@ -111,12 +111,7 @@ public function dump(array $options = array()) {
         'pattern' => $compiled->getPattern(),
         'pattern_outline' => $compiled->getPatternOutline(),
         'number_parts' => $compiled->getNumParts(),
-        // This is only temporary. We need to strip off the compiled route from
-        // route object in order to serialize it. Cloning strips off the
-        // compiled route object. Remove this once
-        // https://github.com/symfony/symfony/pull/4755 is merged and brought
-        // back downstream.
-        'route' => serialize(clone($route)),
+        'route' => serialize($route),
       );
       $insert->values($values);
     }
diff --git a/core/lib/Drupal/Core/Routing/PathMatcher.php b/core/lib/Drupal/Core/Routing/PathMatcher.php
index cef1a0a07cce..f037d9acb410 100644
--- a/core/lib/Drupal/Core/Routing/PathMatcher.php
+++ b/core/lib/Drupal/Core/Routing/PathMatcher.php
@@ -75,7 +75,7 @@ public function matchRequestPartial(Request $request) {
       }
     }
 
-    if (!count($collection->all())) {
+    if (!count($collection)) {
       throw new ResourceNotFoundException();
     }
 
-- 
GitLab