From 854a48bf6b7cc57b350359324865eee04bebaf90 Mon Sep 17 00:00:00 2001 From: Larry Garfield 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 693c356dec0..48b2d8c1d16 100644 --- a/core/lib/Drupal/Core/Routing/MatcherDumper.php +++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php @@ -111,12 +111,7 @@ class MatcherDumper implements MatcherDumperInterface { '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 cef1a0a07cc..f037d9acb41 100644 --- a/core/lib/Drupal/Core/Routing/PathMatcher.php +++ b/core/lib/Drupal/Core/Routing/PathMatcher.php @@ -75,7 +75,7 @@ class PathMatcher implements InitialMatcherInterface { } } - if (!count($collection->all())) { + if (!count($collection)) { throw new ResourceNotFoundException(); }