Browse Source

Use old-style named subpattern syntax to avoid problems with antiquated PCRE

Jordi Boggiano 12 years ago
parent
commit
cd4d569540
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Composer/Autoload/ClassMapGenerator.php

+ 2 - 2
src/Composer/Autoload/ClassMapGenerator.php

@@ -125,8 +125,8 @@ class ClassMapGenerator
 
         preg_match_all('{
             (?:
-                 \b(?<![\$:>])(?<type>class|interface'.$traits.') \s+ (?<name>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
-               | \b(?<![\$:>])(?<ns>namespace) (?<nsname>\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(?<![\$:>])(?P<type>class|interface'.$traits.') \s+ (?P<name>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
+               | \b(?<![\$:>])(?P<ns>namespace) (?P<nsname>\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);