Issues (10)

cli-config.php (1 issue)

1
<?php
2
use Doctrine\ORM\Tools\Console\ConsoleRunner;
3
use Doctrine\ORM\Tools\Setup;
4
use Doctrine\ORM\EntityManager;
5
6
require_once __DIR__ . '/vendor/autoload.php';
7
8
// Create a simple "default" Doctrine ORM configuration for Annotations
9
$config = Setup::createAttributeMetadataConfiguration([__DIR__ . '/test/Entity'], true);
10
11
// database configuration parameters
12
$conn = array(
13
    'driver' => 'pdo_sqlite',
14
    'dbname' => ':memory:',
15
);
16
17
// obtaining the entity manager
18
$entityManager = EntityManager::create($conn, $config);
0 ignored issues
show
Deprecated Code introduced by
The function Doctrine\ORM\EntityManager::create() has been deprecated: Use {@see DriverManager::getConnection()} to bootstrap the connection and call the constructor. ( Ignorable by Annotation )

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

18
$entityManager = /** @scrutinizer ignore-deprecated */ EntityManager::create($conn, $config);

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...
19
20
return ConsoleRunner::createHelperSet($entityManager);
21
22