Skip to content

Commit 5d7c30f

Browse files
authored
Merge pull request #87 from pagemachine/drop-typo3conf-ext-paths
Drop obsolete extensions path support
2 parents 985c998 + 41cc4fa commit 5d7c30f

File tree

2 files changed

+18
-43
lines changed

2 files changed

+18
-43
lines changed

Classes/Configuration/PhinxConfiguration.php

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,22 @@ public function toArray(): array
1515
$connectionParameters = $this->getConnectionParameters();
1616

1717
return [
18-
'paths' => $this->getPaths(),
18+
'paths' => [
19+
'migrations' => [
20+
sprintf('%s/migrations/phinx', Environment::getProjectPath()),
21+
sprintf(
22+
'%s/*/*/{Migrations,Classes/Migrations}/Phinx',
23+
$this->getVendorPath(),
24+
),
25+
],
26+
'seeds' => [
27+
sprintf('%s/migrations/phinx/seeds', Environment::getProjectPath()),
28+
sprintf(
29+
'%s/*/*/{Migrations,Classes/Migrations}/Phinx/Seeds',
30+
$this->getVendorPath(),
31+
),
32+
],
33+
],
1934
'environments' => [
2035
'default_migration_table' => self::MIGRATION_TABLE_NAME,
2136
'default_environment' => 'typo3',
@@ -33,46 +48,6 @@ public function toArray(): array
3348
];
3449
}
3550

36-
private function getPaths(): array
37-
{
38-
if ($this->isLocatedInExtensionsPath()) {
39-
// <web-dir>/typo3conf/ext/*
40-
return [
41-
'migrations' => sprintf(
42-
'%s/*/{Migrations,Classes/Migrations}/Phinx',
43-
Environment::getExtensionsPath(),
44-
),
45-
'seeds' => sprintf(
46-
'%s/*/{Migrations,Classes/Migrations}/Phinx/Seeds',
47-
Environment::getExtensionsPath(),
48-
),
49-
];
50-
}
51-
52-
// <vendor-dir>/*/*
53-
return [
54-
'migrations' => [
55-
sprintf('%s/migrations/phinx', Environment::getProjectPath()),
56-
sprintf(
57-
'%s/*/*/{Migrations,Classes/Migrations}/Phinx',
58-
$this->getVendorPath(),
59-
),
60-
],
61-
'seeds' => [
62-
sprintf('%s/migrations/phinx/seeds', Environment::getProjectPath()),
63-
sprintf(
64-
'%s/*/*/{Migrations,Classes/Migrations}/Phinx/Seeds',
65-
$this->getVendorPath(),
66-
),
67-
],
68-
];
69-
}
70-
71-
private function isLocatedInExtensionsPath(): bool
72-
{
73-
return dirname(__DIR__, 3) === Environment::getExtensionsPath();
74-
}
75-
7651
private function getVendorPath(): string
7752
{
7853
return dirname(__DIR__, 4);

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Notice that these wrapper commands are executed by TYPO3, thus the full API like
3030

3131
The following paths are used for migrations:
3232

33-
* `migrations/phinx` (Composer Mode)
33+
* `migrations/phinx`
3434
* `vendor/*/*/Migrations/Phinx`
3535
* `vendor/*/*/Classes/Migrations/Phinx`
3636

@@ -48,7 +48,7 @@ the desired location.
4848

4949
The following paths are used for seeds:
5050

51-
* `migrations/phinx/seeds` (Composer Mode)
51+
* `migrations/phinx/seeds`
5252
* `vendor/*/*/Migrations/Phinx/Seeds`
5353
* `vendor/*/*/Classes/Migrations/Phinx/Seeds`
5454

0 commit comments

Comments
 (0)