@@ -2,20 +2,23 @@ PHPCR Migrations Bundle
22=======================
33
44This library provides a Symfony integration for the [ PHPCR migrations
5- library] ( https://github.com/dantleech/phpcr-migrations ) .
5+ library] ( https://github.com/phpcr/phpcr-migrations ) .
6+
7+ It has initially been created by Daniel Leech as ` dantleech/phpcr-migrations-bundle ` and was then
8+ donated to the PHPCR organization.
69
710Configuration
811-------------
912
1013Configure the path to your migrations:
1114
1215```` yaml
13- # app/ config.yml
16+ # config/packages/phpcr-migrations.yaml
1417phpcr_migrations :
15- paths : [%kernel.root_dir %/phpcr-migrations]
18+ paths : [%kernel.project_dir %/phpcr-migrations]
1619` ` ` `
1720
18- Or the bundle will automatically pick up any migrations in the
21+ And the bundle will automatically pick up any migrations in the
1922` Resources/phpcr-migrations` folder in any bundles registered in the kernel.
2023
2124Creating migrations
@@ -25,19 +28,19 @@ First create two new migration files:
2528
2629` ` ` ` php
2730<?php
28- // app/ phpcr-migrations/Version201501011200.php
31+ // phpcr-migrations/Version201501011200.php
2932
3033use PHPCR\SessionInterface;
3134use PHPCR\Migrations\VersionInterface;
3235
3336class Version201501011200 implements VersionInterface
3437{
35- public function up(SessionInterface $session)
38+ public function up(SessionInterface $session) : void
3639 {
3740 $session->getRootNode()->addNode('hello');
3841 }
3942
40- public function down(SessionInterface $session)
43+ public function down(SessionInterface $session) : void
4144 {
4245 $session->getRootNode()->getNode('hello')->remove();
4346 }
@@ -55,12 +58,12 @@ use PHPCR\Migrations\VersionInterface;
5558
5659class Version201501011212 implements VersionInterface
5760{
58- public function up(SessionInterface $session)
61+ public function up(SessionInterface $session): void
5962 {
6063 $session->getNode('/hello')->addNode('world');
6164 }
6265
63- public function down(SessionInterface $session)
66+ public function down(SessionInterface $session): void
6467 {
6568 $session->getNode('/hello')->getNode('world')->remove();
6669 }
@@ -99,7 +102,7 @@ Upgrading 2 version(s):
99102 + [2/2]: 201501011212
100103````
101104
102- This should run the two migrations, your status should not look like this:
105+ This should run the two migrations.
103106
104107Reverting
105108---------
@@ -129,4 +132,3 @@ Actions are:
129132- ` down ` : Revert one version
130133- ` top ` : Migrate to the latest version
131134- ` bottom ` : Revert all migrations
132-
0 commit comments