From cd4d5695401de3398b7fc6b59f8437736427c8f3 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 26 Nov 2012 13:21:03 +0100 Subject: [PATCH] Use old-style named subpattern syntax to avoid problems with antiquated PCRE --- src/Composer/Autoload/ClassMapGenerator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Autoload/ClassMapGenerator.php b/src/Composer/Autoload/ClassMapGenerator.php index bebf7c7e3..26f3cf28e 100644 --- a/src/Composer/Autoload/ClassMapGenerator.php +++ b/src/Composer/Autoload/ClassMapGenerator.php @@ -125,8 +125,8 @@ class ClassMapGenerator preg_match_all('{ (?: - \b(?])(?class|interface'.$traits.') \s+ (?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*) - | \b(?])(?namespace) (?\s+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\s*\\\\\s*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*)? \s*[\{;] + \b(?])(?Pclass|interface'.$traits.') \s+ (?P[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*) + | \b(?])(?Pnamespace) (?P\s+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\s*\\\\\s*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*)? \s*[\{;] ) }ix', $contents, $matches);