Skip to content

Commit 3d7d2d9

Browse files
committed
Updated README
1 parent 8a41176 commit 3d7d2d9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@ Usage
1414
-----
1515

1616
````php
17+
<?php
18+
19+
use Symfony\Component\Console\Output\NullOutput;
20+
use DTL\PhpcrMigrations\VersionStorage;
21+
use DTL\PhpcrMigrations\VersionFinder;
22+
use DTL\PhpcrMigrations\Migrator;
23+
1724
$storage = new VersionStorage($phpcrSession);
1825
$finder = new VersionFinder(array('/path/to/migrations'));
1926

2027
$versions = $finder->getVersionCollection();
2128
$migrator = new Migrator($session, $versionCollection, $storage);
2229

2330
$to = '201504241744';
24-
$migrator->migrate($to);
31+
$output = new NullOutput();
32+
$migrator->migrate($to, $output);
2533
````
2634

2735
Versions
@@ -32,6 +40,8 @@ Version classes contain `up` and `down` methods. The class is quite simple:
3240
````php
3341
<?php
3442

43+
use DTL\PhpcrMigrations\VersionInterface;
44+
3545
class Version201504241200 implements VersionInterface
3646
{
3747
public function up(SessionInterface $session)

0 commit comments

Comments
 (0)