Passed
Push — master ( ca5e1a...9b142b )
by Anton
04:12
created

src/Bootloader/Cycle/AnnotatedBootloader.php (1 issue)

Severity
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
declare(strict_types=1);
9
10
namespace Spiral\Bootloader\Cycle;
11
12
use Cycle\Annotated;
13
use Doctrine\Common\Annotations\AnnotationRegistry;
14
use Spiral\Boot\Bootloader\Bootloader;
15
use Spiral\Boot\Bootloader\DependedInterface;
16
17
final class AnnotatedBootloader extends Bootloader implements DependedInterface
18
{
19
    /**
20
     * @param SchemaBootloader $schema
21
     */
22
    public function boot(SchemaBootloader $schema)
23
    {
24
        AnnotationRegistry::registerLoader('class_exists');
0 ignored issues
show
Deprecated Code introduced by
The function Doctrine\Common\Annotati...istry::registerLoader() has been deprecated: this method is deprecated and will be removed in doctrine/annotations 2.0 autoloading should be deferred to the globally registered autoloader by then. For now, use @example AnnotationRegistry::registerLoader('class_exists') ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

24
        /** @scrutinizer ignore-deprecated */ AnnotationRegistry::registerLoader('class_exists');

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
25
26
        $schema->addGenerator(SchemaBootloader::GROUP_INDEX, Annotated\Embeddings::class);
27
        $schema->addGenerator(SchemaBootloader::GROUP_INDEX, Annotated\Entities::class);
28
        $schema->addGenerator(SchemaBootloader::GROUP_INDEX, Annotated\MergeColumns::class);
29
        $schema->addGenerator(SchemaBootloader::GROUP_RENDER, Annotated\MergeIndexes::class);
30
    }
31
32
    /**
33
     * @return array
34
     */
35
    public function defineDependencies(): array
36
    {
37
        return [
38
            SchemaBootloader::class
39
        ];
40
    }
41
}