@@ -45,35 +45,6 @@ public function getClassMetadata($class)
45
45
{
46
46
$ class = ltrim ($ class , '\\' );
47
47
48
- if (!isset ($ this ->loadedClasses [$ class ])) {
49
- if ($ this ->cache !== null && $ this ->cache ->has ($ class )) {
50
- $ this ->loadedClasses [$ class ] = $ this ->cache ->read ($ class );
51
- } else {
52
- $ metadata = new ClassMetadata ($ class );
53
-
54
- // Include constraints from the parent class
55
- if ($ parent = $ metadata ->getReflectionClass ()->getParentClass ()) {
56
- $ metadata ->mergeConstraints ($ this ->getClassMetadata ($ parent ->getName ()));
57
- }
58
-
59
- // Include constraints from all implemented interfaces
60
- foreach ($ metadata ->getReflectionClass ()->getInterfaces () as $ interface ) {
61
- if ('Symfony\Component\Validator\GroupSequenceProviderInterface ' === $ interface ->getName ()) {
62
- continue ;
63
- }
64
- $ metadata ->mergeConstraints ($ this ->getClassMetadata ($ interface ->getName ()));
65
- }
66
-
67
- $ this ->loader ->loadClassMetadata ($ metadata );
68
-
69
- $ this ->loadedClasses [$ class ] = $ metadata ;
70
-
71
- if ($ this ->cache !== null ) {
72
- $ this ->cache ->write ($ metadata );
73
- }
74
- }
75
- }
76
-
77
48
if (null !== $ this ->cache && false !== ($ this ->loadedClasses [$ class ] = $ this ->cache ->read ($ class ))) {
78
49
return $ this ->loadedClasses [$ class ];
79
50
}
@@ -87,6 +58,9 @@ public function getClassMetadata($class)
87
58
88
59
// Include constraints from all implemented interfaces
89
60
foreach ($ metadata ->getReflectionClass ()->getInterfaces () as $ interface ) {
61
+ if ('Symfony\Component\Validator\GroupSequenceProviderInterface ' === $ interface ->getName ()) {
62
+ continue ;
63
+ }
90
64
$ metadata ->mergeConstraints ($ this ->getClassMetadata ($ interface ->getName ()));
91
65
}
92
66
0 commit comments