Skip to content

Commit

Permalink
Merge pull request #685 from cakephp/backend-config
Browse files Browse the repository at this point in the history
Import Config and wire it into Manager and Environment
  • Loading branch information
markstory authored Feb 4, 2024
2 parents f427320 + 8f59682 commit 92a6064
Show file tree
Hide file tree
Showing 15 changed files with 1,452 additions and 13 deletions.
27 changes: 27 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@
<code>setInput</code>
</PossiblyNullReference>
</file>
<file src="src/Config/Config.php">
<DeprecatedMethod>
<code>getEnvironments</code>
<code>getEnvironments</code>
<code>hasEnvironment</code>
<code>hasEnvironment</code>
<code>searchNamespace</code>
<code>searchNamespace</code>
</DeprecatedMethod>
<LessSpecificImplementedReturnType>
<code>array</code>
<code>array</code>
<code>array</code>
<code>array</code>
</LessSpecificImplementedReturnType>
</file>
<file src="src/Config/ConfigInterface.php">
<MissingTemplateParam>
<code>ArrayAccess</code>
</MissingTemplateParam>
</file>
<file src="src/Db/Adapter/AbstractAdapter.php">
<RedundantPropertyInitializationCheck>
<code><![CDATA[isset($this->output)]]></code>
Expand Down Expand Up @@ -82,6 +103,12 @@
<ArgumentTypeCoercion>
<code>array_merge($versions, array_keys($migrations))</code>
</ArgumentTypeCoercion>
<DeprecatedMethod>
<code>getDataDomain</code>
<code>getMigrationNamespaceByPath</code>
<code>getSeedNamespaceByPath</code>
<code>hasEnvironment</code>
</DeprecatedMethod>
<RedundantPropertyInitializationCheck>
<code><![CDATA[isset($this->container)]]></code>
</RedundantPropertyInitializationCheck>
Expand Down
4 changes: 4 additions & 0 deletions src/Command/MigrationsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static function defaultName(): string
if (parent::defaultName() === 'migrations') {
return 'migrations';
}
// TODO this will need to be patched.
$command = new MigrationsDispatcher::$phinxCommands[static::$commandName]();
$name = $command->getName();

Expand All @@ -77,7 +78,10 @@ public function getOptionParser(): ConsoleOptionParser
return parent::getOptionParser();
}
$parser = parent::getOptionParser();
// Use new methods
$command = new MigrationsDispatcher::$phinxCommands[static::$commandName]();

// Skip conversions for new commands.
$parser->setDescription($command->getDescription());
$definition = $command->getDefinition();
foreach ($definition->getOptions() as $option) {
Expand Down
Loading

0 comments on commit 92a6064

Please sign in to comment.