PHP code example of rmasters / doctrine-migrations-service-provider
1. Go to this page and download the library: Download rmasters/doctrine-migrations-service-provider library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rmasters / doctrine-migrations-service-provider example snippets
$app = new Silex\Application;
$app = new Pimple\Container;
$app->register(new KnpLabs\Provider\ConsoleServiceProvider, [
'console.name' => 'Application',
'console.version' => '1',
'console.project_directory' => __DIR__ . '/../', // your project root
]);
$app->register(new Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider, [
'orm.proxies.dir' => __DIR__ . '/Proxies',
'orm.em.options' => [
'mappings' => [
[
'type' => 'annotation',
'namespace' => 'Application\Entity',
'path' => __DIR__ . '/../src/Entity',
'resources_namespace' => 'Application\Entity',
'use_simple_annotation_reader' => false, // Set this to false if you import @ORM for annotations
],
],
],
]);
$app->register(new Rossible\DoctrineMigrationsProvider\DoctrineMigrationsServiceProvider, [
'doctrine.migrations.namespace' => 'Application\Migration',
'doctrine.migrations.dir_name' => __DIR__ . '/../src/Migration',
]);