File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
src/Symfony/Component/Validator/Mapping/Cache Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ public function __construct(CacheItemPoolInterface $cacheItemPool)
33
33
*/
34
34
public function has ($ class )
35
35
{
36
- return $ this ->cacheItemPool ->hasItem ($ this -> escapeClassName ($ class ));
36
+ return $ this ->cacheItemPool ->hasItem (rawurlencode ($ class ));
37
37
}
38
38
39
39
/**
40
40
* {@inheritdoc}
41
41
*/
42
42
public function read ($ class )
43
43
{
44
- $ item = $ this ->cacheItemPool ->getItem ($ this -> escapeClassName ($ class ));
44
+ $ item = $ this ->cacheItemPool ->getItem (rawurlencode ($ class ));
45
45
46
46
if (!$ item ->isHit ()) {
47
47
return false ;
@@ -55,17 +55,9 @@ public function read($class)
55
55
*/
56
56
public function write (ClassMetadata $ metadata )
57
57
{
58
- $ item = $ this ->cacheItemPool ->getItem ($ this -> escapeClassName ($ metadata ->getClassName ()));
58
+ $ item = $ this ->cacheItemPool ->getItem (rawurlencode ($ metadata ->getClassName ()));
59
59
$ item ->set ($ metadata );
60
60
61
61
$ this ->cacheItemPool ->save ($ item );
62
62
}
63
-
64
- /**
65
- * Replaces backslashes by dots in a class name.
66
- */
67
- private function escapeClassName (string $ class ): string
68
- {
69
- return rawurlencode ($ class );
70
- }
71
63
}
You can’t perform that action at this time.
0 commit comments