Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the doctrine-dbal binary #5337

Merged
merged 1 commit into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ awareness about deprecated code.

# Upgrade to 4.0

## Removed the `doctrine-dbal` binary.

The documentation explains how the console tools can be bootstrapped for standalone usage.

The method `ConsoleRunner::printCliConfigTemplate()` has been removed as well because it was only useful in the context
of the `doctrine-dbal` binary.

## Removed support for the `$database` parameter of `AbstractSchemaManager::list*()` methods

Passing `$database` to the following methods is no longer supported:
Expand Down
4 changes: 0 additions & 4 deletions bin/doctrine-dbal

This file was deleted.

57 changes: 0 additions & 57 deletions bin/doctrine-dbal.php

This file was deleted.

1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
},
"bin": ["bin/doctrine-dbal"],
"config": {
"sort-packages": true,
"allow-plugins": {
Expand Down
1 change: 0 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<config name="php_version" value="80000"/>

<file>bin</file>
<file>src</file>
<file>tests</file>

Expand Down
28 changes: 0 additions & 28 deletions src/Tools/Console/ConsoleRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,4 @@ public static function addCommands(Application $cli, ConnectionProvider $connect
new ReservedWordsCommand($connectionProvider),
]);
}

/**
* Prints the instructions to create a configuration file
*
* @deprecated This method will be removed without replacement.
*/
public static function printCliConfigTemplate(): void
{
echo <<<'HELP'
You are missing a "cli-config.php" or "config/cli-config.php" file in your
project, which is required to get the Doctrine-DBAL Console working. You can use the
following sample as a template:

<?php
use Doctrine\DBAL\Tools\Console\ConnectionProvider\SingleConnectionProvider;

// You can append new commands to $commands array, if needed

// replace with the mechanism to retrieve DBAL connection(s) in your app
// and return a Doctrine\DBAL\Tools\Console\ConnectionProvider instance.
$connection = getDBALConnection();

// in case you have a single connection you can use SingleConnectionProvider
// otherwise you need to implement the Doctrine\DBAL\Tools\Console\ConnectionProvider interface with your custom logic
return new SingleConnectionProvider($connection);

HELP;
}
}