Skip to content

Commit 623bda0

Browse files
committed
Merge branch '2.8' into 3.0
* 2.8: [WebProfilerBundle] Don't inherit CSS text-transform property for the toolbar. Remove duplicate cursor property Increase the inlining YAML level for config:debug [Serializer] Minor: fix CS and PHPDoc [Form] fix tests [Serializer] Ensure that groups are strings [Debug] Tell that the extension is for PHP 5 only Static code analysis Update AnnotationDirectoryLoader.php added a test Escape the delimiter in Glob::toRegex [FrameworkBundle] Fix template location for PHP templates [FrameworkBundle] Add path verification to the template parsing test cases
2 parents 9077f8e + f036818 commit 623bda0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Glob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function toRegex($glob, $strictLeadingDot = true, $strictWildcardS
6666
$firstByte = true;
6767
}
6868

69-
if ('.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
69+
if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
7070
$regex .= "\\$car";
7171
} elseif ('*' === $car) {
7272
$regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*');

Tests/GlobTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class GlobTest extends \PHPUnit_Framework_TestCase
1717
{
1818
public function testGlobToRegexDelimiters()
1919
{
20+
$this->assertEquals('#^(?=[^\.])\#$#', Glob::toRegex('#'));
2021
$this->assertEquals('#^\.[^/]*$#', Glob::toRegex('.*'));
2122
$this->assertEquals('^\.[^/]*$', Glob::toRegex('.*', true, true, ''));
2223
$this->assertEquals('/^\.[^/]*$/', Glob::toRegex('.*', true, true, '/'));

0 commit comments

Comments
 (0)