File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 23
23
24
24
use Doctrine \Common \Annotations \AnnotationRegistry ;
25
25
26
- AnnotationRegistry::registerLoader (function ($ class ) use ($ loader ) {
27
- $ loader ->loadClass ($ class );
26
+ if (method_exists (AnnotationRegistry::class, 'registerLoader ' )) {
27
+ AnnotationRegistry::registerLoader (function ($ class ) use ($ loader ) {
28
+ $ loader ->loadClass ($ class );
28
29
29
- // this was class_exists($class, false) i.e. do not autoload.
30
- // this is required so that custom annotations (e.g. TreeUiBundle
31
- // annotations) are autoloaded - but they should be found by the
32
- // composer loader above.
33
- //
34
- // This probably slows things down.
35
- //
36
- // @todo: Fix me.
37
- return class_exists ($ class );
38
- });
30
+ // this was class_exists($class, false) i.e. do not autoload.
31
+ // this is required so that custom annotations (e.g. TreeUiBundle
32
+ // annotations) are autoloaded - but they should be found by the
33
+ // composer loader above.
34
+ //
35
+ // This probably slows things down.
36
+ //
37
+ // @todo: Fix me.
38
+ return class_exists ($ class );
39
+ });
40
+ }
39
41
40
42
if (!defined ('CMF_TEST_ROOT_DIR ' )) {
41
43
define ('CMF_TEST_ROOT_DIR ' , realpath (__DIR__ .'/.. ' ));
You can’t perform that action at this time.
0 commit comments