Skip to content

Commit a6fe385

Browse files
piotr-czMasterOdin
andauthored
Add config file path to docs example (#2338)
Co-authored-by: Matthew Peveler <[email protected]>
1 parent 93b8856 commit a6fe385

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/en/commands.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,17 @@ using the Manager class :
394394
$pdo = new PDO('sqlite::memory:', null, null, [
395395
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
396396
]);
397-
$configArray = require 'phinx.php';
397+
$configPath = __DIR__ . '/../phinx.php';
398+
$configArray = require $configPath;
398399
$configArray['environments']['test'] = [
399400
'adapter' => 'sqlite',
400401
'connection' => $pdo,
401402
'name' => ':memory:',
402403
];
403-
$config = new Config($configArray);
404+
$config = new Config(
405+
$configArray,
406+
$configPath
407+
);
404408
$manager = new Manager($config, new StringInput(' '), new NullOutput());
405409
$manager->migrate('test');
406410
$manager->seed('test');

0 commit comments

Comments
 (0)