Tweak #1361 to re-enable support for unicode classnames
parent
d3b830efc3
commit
2d7c3c9d27
|
@ -125,10 +125,10 @@ class ClassMapGenerator
|
|||
|
||||
preg_match_all('{
|
||||
(?:
|
||||
\b(?<![\$:>])(?<type>class|interface'.$traits.') \s+ (?<name>\w+)
|
||||
\b(?<![\$:>])(?<type>class|interface'.$traits.') \s+ (?<name>[^\s\{]+)
|
||||
| \b(?<![\$:>])(?<ns>namespace) (?<nsname>\s+[^\s;{}\\\\]+(?:\s*\\\\\s*[^\s;{}\\\\]+)*)? \s*[\{;]
|
||||
)
|
||||
}ix', $contents, $matches);
|
||||
}iux', $contents, $matches);
|
||||
|
||||
$classes = array();
|
||||
$namespace = '';
|
||||
|
|
|
@ -54,6 +54,7 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||
'Foo\\LargeClass' => realpath(__DIR__).'/Fixtures/classmap/LargeClass.php',
|
||||
'Foo\\LargeGap' => realpath(__DIR__).'/Fixtures/classmap/LargeGap.php',
|
||||
'Foo\\MissingSpace' => realpath(__DIR__).'/Fixtures/classmap/MissingSpace.php',
|
||||
'Unicode\\↑' => realpath(__DIR__).'/Fixtures/classmap/Unicode.php',
|
||||
)),
|
||||
array(__DIR__.'/Fixtures/template', array()),
|
||||
);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Unicode;
|
||||
|
||||
class ↑{
|
||||
}
|
Loading…
Reference in New Issue