diff --git a/composer.json b/composer.json index 06d5d6f9ad..f027dd44d8 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,6 @@ "symfony/expression-language": "^4.2", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", - "symfony/yaml": "^4.2.8", "twig/twig": "^2.4", "williamdes/mariadb-mysql-kbs": "^1.2" }, diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 00000b017f..1117f6d1f2 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -48,7 +48,7 @@ use PhpMyAdmin\Tracker; use PhpMyAdmin\Util; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; global $containerBuilder, $error_handler, $PMA_Config, $server, $dbi, $lang, $cfg, $isConfigLoading, $auth_plugin; @@ -96,9 +96,8 @@ if (! @is_readable(AUTOLOAD_FILE)) { require_once AUTOLOAD_FILE; $containerBuilder = new ContainerBuilder(); -$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__)); -$loader->load('services.yml'); -$loader->load('services_controllers.yml'); +$loader = new PhpFileLoader($containerBuilder, new FileLocator(__DIR__)); +$loader->load('services_loader.php'); /** @var Migration $diMigration */ $diMigration = $containerBuilder->get('di_migration'); diff --git a/libraries/services.php b/libraries/services.php new file mode 100644 index 0000000000..d7cf332785 --- /dev/null +++ b/libraries/services.php @@ -0,0 +1,277 @@ + + [ + 'advisor' => + [ + 'class' => PhpMyAdmin\Advisor::class, + 'arguments' => + [ + 'dbi' => '@dbi', + 'expression_language' => '@expression_language', + ], + ], + 'browse_foreigners' => + [ + 'class' => PhpMyAdmin\BrowseForeigners::class, + 'arguments' => + [ + '@template', + ], + ], + 'config' => + [ + 'class' => PhpMyAdmin\Config::class, + 'arguments' => + [ + CONFIG_FILE, + ], + ], + 'central_columns' => + [ + 'class' => \PhpMyAdmin\CentralColumns::class, + 'arguments' => + [ + '@dbi', + ], + ], + 'check_user_privileges' => + [ + 'class' => \PhpMyAdmin\CheckUserPrivileges::class, + 'arguments' => + [ + '@dbi', + ], + ], + 'create_add_field' => + [ + 'class' => PhpMyAdmin\CreateAddField::class, + 'arguments' => + [ + '@dbi', + ], + ], + 'designer' => + [ + 'class' => PhpMyAdmin\Database\Designer::class, + 'arguments' => + [ + 'dbi' => '@dbi', + 'relation' => '@relation', + 'template' => '@template', + ], + ], + 'designer_common' => + [ + 'class' => PhpMyAdmin\Database\Designer\Common::class, + 'arguments' => + [ + 'dbi' => '@dbi', + 'relation' => '@relation', + ], + ], + 'display_export' => + [ + 'class' => PhpMyAdmin\Display\Export::class, + ], + 'error_handler' => + [ + 'class' => PhpMyAdmin\ErrorHandler::class, + ], + 'error_report' => + [ + 'class' => PhpMyAdmin\ErrorReport::class, + 'arguments' => + [ + '@http_request', + '@relation', + '@template', + ], + ], + 'export' => + [ + 'class' => PhpMyAdmin\Export::class, + 'arguments' => + [ + '@dbi', + ], + ], + 'expression_language' => + [ + 'class' => Symfony\Component\ExpressionLanguage\ExpressionLanguage::class, + ], + 'http_request' => + [ + 'class' => PhpMyAdmin\Utils\HttpRequest::class, + ], + 'import' => + [ + 'class' => PhpMyAdmin\Import::class, + ], + 'insert_edit' => + [ + 'class' => PhpMyAdmin\InsertEdit::class, + 'arguments' => + [ + '@dbi', + ], + ], + 'di_migration' => + [ + 'factory' => 'PhpMyAdmin\Di\Migration::getInstance', + 'arguments' => + [ + '@service_container', + ], + ], + 'navigation' => + [ + 'class' => PhpMyAdmin\Navigation\Navigation::class, + 'arguments' => + [ + '@template', + '@relation', + '@dbi', + ], + ], + 'normalization' => + [ + 'class' => PhpMyAdmin\Normalization::class, + 'arguments' => + [ + 'dbi' => '@dbi', + 'relation' => '@relation', + 'transformations' => '@transformations', + 'template' => '@template', + ], + ], + 'operations' => + [ + 'class' => PhpMyAdmin\Operations::class, + 'arguments' => + [ + 'dbi' => '@dbi', + 'relation' => '@relation', + ], + ], + 'relation' => + [ + 'class' => PhpMyAdmin\Relation::class, + 'arguments' => + [ + '@dbi', + '@template', + ], + ], + 'relation_cleanup' => + [ + 'class' => PhpMyAdmin\RelationCleanup::class, + 'arguments' => + [ + '@dbi', + '@relation', + ], + ], + 'replication' => + [ + 'class' => PhpMyAdmin\Replication::class, + ], + 'replication_gui' => + [ + 'class' => PhpMyAdmin\ReplicationGui::class, + 'arguments' => + [ + 'replication' => '@replication', + 'template' => '@template', + ], + ], + 'response' => + [ + 'factory' => 'PhpMyAdmin\Response::getInstance', + ], + 'server_plugins' => + [ + 'class' => PhpMyAdmin\Server\Plugins::class, + 'arguments' => + [ + '@dbi', + ], + ], + 'server_privileges' => + [ + 'class' => PhpMyAdmin\Server\Privileges::class, + 'arguments' => + [ + '@template', + '@dbi', + '@relation', + '@relation_cleanup', + ], + ], + 'sql' => + [ + 'class' => PhpMyAdmin\Sql::class, + ], + 'sql_query_form' => + [ + 'class' => PhpMyAdmin\SqlQueryForm::class, + 'arguments' => + [ + 'template' => '@template', + ], + ], + 'status_data' => + [ + 'class' => PhpMyAdmin\Server\Status\Data::class, + ], + 'status_monitor' => + [ + 'class' => PhpMyAdmin\Server\Status\Monitor::class, + 'arguments' => + [ + '@dbi', + ], + ], + 'table_search' => + [ + 'class' => PhpMyAdmin\Table\Search::class, + 'arguments' => + [ + 'dbi' => '@dbi', + ], + ], + 'template' => + [ + 'class' => PhpMyAdmin\Template::class, + ], + 'tracking' => + [ + 'class' => PhpMyAdmin\Tracking::class, + 'arguments' => + [ + 'sql_query_form' => '@sql_query_form', + 'template' => '@template', + 'relation' => '@relation', + ], + ], + 'transformations' => + [ + 'class' => PhpMyAdmin\Transformations::class, + ], + 'user_password' => + [ + 'class' => PhpMyAdmin\UserPassword::class, + 'arguments' => + [ + '@server_privileges', + ], + ], + 'user_preferences' => + [ + 'class' => PhpMyAdmin\UserPreferences::class, + ], + PhpMyAdmin\Response::class => '@response', + PhpMyAdmin\DatabaseInterface::class => '@dbi', + ], +]; diff --git a/libraries/services.yml b/libraries/services.yml deleted file mode 100644 index 77784281b1..0000000000 --- a/libraries/services.yml +++ /dev/null @@ -1,162 +0,0 @@ -services: - advisor: - class: 'PhpMyAdmin\Advisor' - arguments: - dbi: '@dbi' - expression_language: '@expression_language' - - browse_foreigners: - class: 'PhpMyAdmin\BrowseForeigners' - arguments: ['@template'] - - config: - class: 'PhpMyAdmin\Config' - arguments: [!php/const CONFIG_FILE] - - central_columns: - class: '\PhpMyAdmin\CentralColumns' - arguments: ['@dbi'] - - check_user_privileges: - class: '\PhpMyAdmin\CheckUserPrivileges' - arguments: ['@dbi'] - - create_add_field: - class: 'PhpMyAdmin\CreateAddField' - arguments: ['@dbi'] - - designer: - class: 'PhpMyAdmin\Database\Designer' - arguments: - dbi: '@dbi' - relation: '@relation' - template: '@template' - - designer_common: - class: 'PhpMyAdmin\Database\Designer\Common' - arguments: - dbi: '@dbi' - relation: '@relation' - - display_export: - class: 'PhpMyAdmin\Display\Export' - - error_handler: - class: 'PhpMyAdmin\ErrorHandler' - - error_report: - class: 'PhpMyAdmin\ErrorReport' - arguments: ['@http_request', '@relation', '@template'] - - export: - class: 'PhpMyAdmin\Export' - arguments: ['@dbi'] - - expression_language: - class: 'Symfony\Component\ExpressionLanguage\ExpressionLanguage' - - http_request: - class: 'PhpMyAdmin\Utils\HttpRequest' - - import: - class: 'PhpMyAdmin\Import' - - insert_edit: - class: 'PhpMyAdmin\InsertEdit' - arguments: ['@dbi'] - - di_migration: - factory: 'PhpMyAdmin\Di\Migration::getInstance' - arguments: ['@service_container'] - - navigation: - class: 'PhpMyAdmin\Navigation\Navigation' - arguments: ['@template', '@relation', '@dbi'] - - normalization: - class: 'PhpMyAdmin\Normalization' - arguments: - dbi: '@dbi' - relation: '@relation' - transformations: '@transformations' - template: '@template' - - operations: - class: 'PhpMyAdmin\Operations' - arguments: - dbi: '@dbi' - relation: '@relation' - - relation: - class: 'PhpMyAdmin\Relation' - arguments: ['@dbi', '@template'] - - relation_cleanup: - class: 'PhpMyAdmin\RelationCleanup' - arguments: ['@dbi', '@relation'] - - replication: - class: 'PhpMyAdmin\Replication' - - replication_gui: - class: 'PhpMyAdmin\ReplicationGui' - arguments: - replication: '@replication' - template: '@template' - - response: - factory: 'PhpMyAdmin\Response::getInstance' - - server_plugins: - class: 'PhpMyAdmin\Server\Plugins' - arguments: ['@dbi'] - - server_privileges: - class: 'PhpMyAdmin\Server\Privileges' - arguments: ['@template', '@dbi', '@relation', '@relation_cleanup'] - - sql: - class: 'PhpMyAdmin\Sql' - - sql_query_form: - class: 'PhpMyAdmin\SqlQueryForm' - arguments: - template: '@template' - - status_data: - class: 'PhpMyAdmin\Server\Status\Data' - - status_monitor: - class: 'PhpMyAdmin\Server\Status\Monitor' - arguments: ['@dbi'] - - table_search: - class: 'PhpMyAdmin\Table\Search' - arguments: - dbi: '@dbi' - - template: - class: 'PhpMyAdmin\Template' - - tracking: - class: 'PhpMyAdmin\Tracking' - arguments: - sql_query_form: '@sql_query_form' - template: '@template' - relation: '@relation' - - transformations: - class: 'PhpMyAdmin\Transformations' - - user_password: - class: 'PhpMyAdmin\UserPassword' - arguments: ['@server_privileges'] - - user_preferences: - class: 'PhpMyAdmin\UserPreferences' - - #Aliases - - PhpMyAdmin\Response: '@response' - - PhpMyAdmin\DatabaseInterface: '@dbi' diff --git a/libraries/services_controllers.php b/libraries/services_controllers.php new file mode 100644 index 0000000000..db977232b2 --- /dev/null +++ b/libraries/services_controllers.php @@ -0,0 +1,1066 @@ + + [ + PhpMyAdmin\Controllers\AjaxController::class => + [ + 'class' => PhpMyAdmin\Controllers\AjaxController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'config' => '@config', + ], + ], + PhpMyAdmin\Controllers\BrowseForeignersController::class => + [ + 'class' => PhpMyAdmin\Controllers\BrowseForeignersController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'browseForeigners' => '@browse_foreigners', + 'relations' => '@relation', + ], + ], + PhpMyAdmin\Controllers\ChangeLogController::class => + [ + 'class' => PhpMyAdmin\Controllers\ChangeLogController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\CheckRelationsController::class => + [ + 'class' => PhpMyAdmin\Controllers\CheckRelationsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Database\CentralColumnsController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\CentralColumnsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'centralColumns' => '@central_columns', + ], + ], + PhpMyAdmin\Controllers\Database\DataDictionaryController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\DataDictionaryController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'relation' => '@relation', + 'transformations' => '@transformations', + ], + ], + PhpMyAdmin\Controllers\Database\DesignerController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\DesignerController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'databaseDesigner' => '@designer', + 'designerCommon' => '@designer_common', + ], + ], + PhpMyAdmin\Controllers\Database\EventsController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\EventsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + ], + ], + PhpMyAdmin\Controllers\Database\ExportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\ExportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'export' => '@export', + ], + ], + PhpMyAdmin\Controllers\Database\ImportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\ImportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + ], + ], + PhpMyAdmin\Controllers\Database\MultiTableQueryController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\MultiTableQueryController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + ], + ], + PhpMyAdmin\Controllers\Database\OperationsController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\OperationsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'operations' => '@operations', + 'checkUserPrivileges' => '@check_user_privileges', + 'relation' => '@relation', + 'relationCleanup' => '@relation_cleanup', + ], + ], + PhpMyAdmin\Controllers\Database\PrivilegesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\PrivilegesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'privileges' => '@server_privileges', + ], + ], + PhpMyAdmin\Controllers\Database\QueryByExampleController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\QueryByExampleController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Database\RoutinesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\RoutinesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'checkUserPrivileges' => '@check_user_privileges', + ], + ], + PhpMyAdmin\Controllers\Database\SearchController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\SearchController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + ], + ], + PhpMyAdmin\Controllers\Database\SqlAutoCompleteController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\SqlAutoCompleteController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + ], + ], + PhpMyAdmin\Controllers\Database\SqlController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\SqlController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'sqlQueryForm' => '@sql_query_form', + ], + ], + PhpMyAdmin\Controllers\Database\SqlFormatController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\SqlFormatController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + ], + ], + PhpMyAdmin\Controllers\Database\StructureController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\StructureController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'relation' => '@relation', + 'replication' => '@replication', + ], + ], + PhpMyAdmin\Controllers\Database\TrackingController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\TrackingController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'tracking' => '@tracking', + ], + ], + PhpMyAdmin\Controllers\Database\TriggersController::class => + [ + 'class' => PhpMyAdmin\Controllers\Database\TriggersController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + ], + ], + PhpMyAdmin\Controllers\ErrorReportController::class => + [ + 'class' => PhpMyAdmin\Controllers\ErrorReportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'errorReport' => '@error_report', + 'errorHandler' => '@error_handler', + ], + ], + PhpMyAdmin\Controllers\ExportController::class => + [ + 'class' => PhpMyAdmin\Controllers\ExportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'export' => '@export', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\GisDataEditorController::class => + [ + 'class' => PhpMyAdmin\Controllers\GisDataEditorController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\HomeController::class => + [ + 'class' => PhpMyAdmin\Controllers\HomeController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'config' => '@config', + 'themeManager' => '@theme_manager', + ], + ], + PhpMyAdmin\Controllers\ImportController::class => + [ + 'class' => PhpMyAdmin\Controllers\ImportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'import' => '@import', + 'sql' => '@sql', + ], + ], + PhpMyAdmin\Controllers\ImportStatusController::class => + [ + 'class' => PhpMyAdmin\Controllers\ImportStatusController::class, + 'arguments' => + [ + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\LicenseController::class => + [ + 'class' => PhpMyAdmin\Controllers\LicenseController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\LintController::class => + [ + 'class' => PhpMyAdmin\Controllers\LintController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\LogoutController::class => + [ + 'class' => PhpMyAdmin\Controllers\LogoutController::class, + ], + PhpMyAdmin\Controllers\NavigationController::class => + [ + 'class' => PhpMyAdmin\Controllers\NavigationController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'navigation' => '@navigation', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\NormalizationController::class => + [ + 'class' => PhpMyAdmin\Controllers\NormalizationController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'normalization' => '@normalization', + ], + ], + PhpMyAdmin\Controllers\PhpInfoController::class => + [ + 'class' => PhpMyAdmin\Controllers\PhpInfoController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\Preferences\ExportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\ExportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPreferences' => '@user_preferences', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Preferences\FeaturesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\FeaturesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPreferences' => '@user_preferences', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Preferences\ImportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\ImportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPreferences' => '@user_preferences', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Preferences\MainPanelController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\MainPanelController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPreferences' => '@user_preferences', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Preferences\ManageController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\ManageController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPreferences' => '@user_preferences', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Preferences\NavigationController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\NavigationController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPreferences' => '@user_preferences', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Preferences\SqlController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\SqlController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPreferences' => '@user_preferences', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Preferences\TwoFactorController::class => + [ + 'class' => PhpMyAdmin\Controllers\Preferences\TwoFactorController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\SchemaExportController::class => + [ + 'class' => PhpMyAdmin\Controllers\SchemaExportController::class, + 'arguments' => + [ + 'export' => '@export', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Server\DatabasesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\DatabasesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\Server\BinlogController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\BinlogController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\Server\CollationsController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\CollationsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\Server\EnginesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\EnginesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\Server\ExportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\ExportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'export' => '@display_export', + ], + ], + PhpMyAdmin\Controllers\Server\ImportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\ImportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\Server\PluginsController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\PluginsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'plugins' => '@server_plugins', + ], + ], + PhpMyAdmin\Controllers\Server\PrivilegesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\PrivilegesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Server\ReplicationController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\ReplicationController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'replicationGui' => '@replication_gui', + ], + ], + PhpMyAdmin\Controllers\Server\SqlController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\SqlController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'sqlQueryForm' => '@sql_query_form', + ], + ], + PhpMyAdmin\Controllers\Server\UserGroupsController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\UserGroupsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Server\Status\AdvisorController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\Status\AdvisorController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'data' => '@status_data', + 'advisor' => '@advisor', + ], + ], + PhpMyAdmin\Controllers\Server\Status\MonitorController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\Status\MonitorController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'data' => '@status_data', + 'monitor' => '@status_monitor', + ], + ], + PhpMyAdmin\Controllers\Server\Status\ProcessesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\Status\ProcessesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'data' => '@status_data', + ], + ], + PhpMyAdmin\Controllers\Server\Status\QueriesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\Status\QueriesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'data' => '@status_data', + ], + ], + PhpMyAdmin\Controllers\Server\Status\StatusController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\Status\StatusController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'data' => '@status_data', + 'replicationGui' => '@replication_gui', + ], + ], + PhpMyAdmin\Controllers\Server\Status\VariablesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\Status\VariablesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'data' => '@status_data', + ], + ], + PhpMyAdmin\Controllers\Server\VariablesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Server\VariablesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\SqlController::class => + [ + 'class' => PhpMyAdmin\Controllers\SqlController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'sql' => '@sql', + 'checkUserPrivileges' => '@check_user_privileges', + ], + ], + PhpMyAdmin\Controllers\Table\AddFieldController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\AddFieldController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'transformations' => '@transformations', + 'config' => '@config', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\ChangeController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\ChangeController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'insertEdit' => '@insert_edit', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\ChartController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\ChartController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\CreateController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\CreateController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'transformations' => '@transformations', + 'config' => '@config', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\ExportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\ExportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'export' => '@display_export', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\FindReplaceController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\FindReplaceController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\GetFieldController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\GetFieldController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\GisVisualizationController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\GisVisualizationController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\ImportController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\ImportController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\IndexesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\IndexesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\OperationsController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\OperationsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'operations' => '@operations', + 'checkUserPrivileges' => '@check_user_privileges', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\PrivilegesController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\PrivilegesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'privileges' => '@server_privileges', + ], + ], + PhpMyAdmin\Controllers\Table\RecentFavoriteController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\RecentFavoriteController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\RelationController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\RelationController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\ReplaceController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\ReplaceController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'insertEdit' => '@insert_edit', + 'transformations' => '@transformations', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\RowActionController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\RowActionController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\SearchController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\SearchController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'search' => '@table_search', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\Table\SqlController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\SqlController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'sqlQueryForm' => '@sql_query_form', + ], + ], + PhpMyAdmin\Controllers\Table\StructureController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\StructureController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'relation' => '@relation', + 'transformations' => '@transformations', + 'create_add_field' => '@create_add_field', + ], + ], + PhpMyAdmin\Controllers\Table\TrackingController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\TrackingController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'tracking' => '@tracking', + ], + ], + PhpMyAdmin\Controllers\Table\TriggersController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\TriggersController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + ], + ], + PhpMyAdmin\Controllers\Table\ZoomSearchController::class => + [ + 'class' => PhpMyAdmin\Controllers\Table\ZoomSearchController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'db' => '%db%', + 'table' => '%table%', + 'search' => '@table_search', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\ThemesController::class => + [ + 'class' => PhpMyAdmin\Controllers\ThemesController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\TransformationOverviewController::class => + [ + 'class' => PhpMyAdmin\Controllers\TransformationOverviewController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'transformations' => '@transformations', + ], + ], + PhpMyAdmin\Controllers\TransformationWrapperController::class => + [ + 'class' => PhpMyAdmin\Controllers\TransformationWrapperController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'transformations' => '@transformations', + 'relation' => '@relation', + ], + ], + PhpMyAdmin\Controllers\UserPasswordController::class => + [ + 'class' => PhpMyAdmin\Controllers\UserPasswordController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'userPassword' => '@user_password', + ], + ], + PhpMyAdmin\Controllers\VersionCheckController::class => + [ + 'class' => PhpMyAdmin\Controllers\VersionCheckController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\ViewCreateController::class => + [ + 'class' => PhpMyAdmin\Controllers\ViewCreateController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + ], + ], + PhpMyAdmin\Controllers\ViewOperationsController::class => + [ + 'class' => PhpMyAdmin\Controllers\ViewOperationsController::class, + 'arguments' => + [ + 'response' => '@response', + 'dbi' => '@dbi', + 'template' => '@template', + 'operations' => '@operations', + ], + ], + ], +]; diff --git a/libraries/services_controllers.yml b/libraries/services_controllers.yml deleted file mode 100644 index 59dba01c45..0000000000 --- a/libraries/services_controllers.yml +++ /dev/null @@ -1,788 +0,0 @@ -services: - PhpMyAdmin\Controllers\AjaxController: - class: 'PhpMyAdmin\Controllers\AjaxController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - config: '@config' - - PhpMyAdmin\Controllers\BrowseForeignersController: - class: 'PhpMyAdmin\Controllers\BrowseForeignersController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - browseForeigners: '@browse_foreigners' - relations: '@relation' - - PhpMyAdmin\Controllers\ChangeLogController: - class: 'PhpMyAdmin\Controllers\ChangeLogController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\CheckRelationsController: - class: 'PhpMyAdmin\Controllers\CheckRelationsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - relation: '@relation' - - PhpMyAdmin\Controllers\Database\CentralColumnsController: - class: 'PhpMyAdmin\Controllers\Database\CentralColumnsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - centralColumns: '@central_columns' - - PhpMyAdmin\Controllers\Database\DataDictionaryController: - class: 'PhpMyAdmin\Controllers\Database\DataDictionaryController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - relation: '@relation' - transformations: '@transformations' - - PhpMyAdmin\Controllers\Database\DesignerController: - class: 'PhpMyAdmin\Controllers\Database\DesignerController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - databaseDesigner: '@designer' - designerCommon: '@designer_common' - - PhpMyAdmin\Controllers\Database\EventsController: - class: 'PhpMyAdmin\Controllers\Database\EventsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - - PhpMyAdmin\Controllers\Database\ExportController: - class: 'PhpMyAdmin\Controllers\Database\ExportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - export: '@export' - - PhpMyAdmin\Controllers\Database\ImportController: - class: 'PhpMyAdmin\Controllers\Database\ImportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - - PhpMyAdmin\Controllers\Database\MultiTableQueryController: - class: 'PhpMyAdmin\Controllers\Database\MultiTableQueryController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - - PhpMyAdmin\Controllers\Database\OperationsController: - class: 'PhpMyAdmin\Controllers\Database\OperationsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - operations: '@operations' - checkUserPrivileges: '@check_user_privileges' - relation: '@relation' - relationCleanup: '@relation_cleanup' - - PhpMyAdmin\Controllers\Database\PrivilegesController: - class: 'PhpMyAdmin\Controllers\Database\PrivilegesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - privileges: '@server_privileges' - - PhpMyAdmin\Controllers\Database\QueryByExampleController: - class: 'PhpMyAdmin\Controllers\Database\QueryByExampleController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - relation: '@relation' - - PhpMyAdmin\Controllers\Database\RoutinesController: - class: 'PhpMyAdmin\Controllers\Database\RoutinesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - checkUserPrivileges: '@check_user_privileges' - - PhpMyAdmin\Controllers\Database\SearchController: - class: 'PhpMyAdmin\Controllers\Database\SearchController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - - PhpMyAdmin\Controllers\Database\SqlAutoCompleteController: - class: 'PhpMyAdmin\Controllers\Database\SqlAutoCompleteController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - - PhpMyAdmin\Controllers\Database\SqlController: - class: 'PhpMyAdmin\Controllers\Database\SqlController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - sqlQueryForm: '@sql_query_form' - - PhpMyAdmin\Controllers\Database\SqlFormatController: - class: 'PhpMyAdmin\Controllers\Database\SqlFormatController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - - PhpMyAdmin\Controllers\Database\StructureController: - class: 'PhpMyAdmin\Controllers\Database\StructureController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - relation: '@relation' - replication: '@replication' - - PhpMyAdmin\Controllers\Database\TrackingController: - class: 'PhpMyAdmin\Controllers\Database\TrackingController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - tracking: '@tracking' - - PhpMyAdmin\Controllers\Database\TriggersController: - class: 'PhpMyAdmin\Controllers\Database\TriggersController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - - PhpMyAdmin\Controllers\ErrorReportController: - class: 'PhpMyAdmin\Controllers\ErrorReportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - errorReport: '@error_report' - errorHandler: '@error_handler' - - PhpMyAdmin\Controllers\ExportController: - class: 'PhpMyAdmin\Controllers\ExportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - export: '@export' - relation: '@relation' - - PhpMyAdmin\Controllers\GisDataEditorController: - class: 'PhpMyAdmin\Controllers\GisDataEditorController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\HomeController: - class: 'PhpMyAdmin\Controllers\HomeController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - config: '@config' - themeManager: '@theme_manager' - - PhpMyAdmin\Controllers\ImportController: - class: 'PhpMyAdmin\Controllers\ImportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - import: '@import' - sql: '@sql' - - PhpMyAdmin\Controllers\ImportStatusController: - class: 'PhpMyAdmin\Controllers\ImportStatusController' - arguments: - template: '@template' - - PhpMyAdmin\Controllers\LicenseController: - class: 'PhpMyAdmin\Controllers\LicenseController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\LintController: - class: 'PhpMyAdmin\Controllers\LintController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\LogoutController: - class: 'PhpMyAdmin\Controllers\LogoutController' - - PhpMyAdmin\Controllers\NavigationController: - class: 'PhpMyAdmin\Controllers\NavigationController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - navigation: '@navigation' - relation: '@relation' - - PhpMyAdmin\Controllers\NormalizationController: - class: 'PhpMyAdmin\Controllers\NormalizationController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - normalization: '@normalization' - - PhpMyAdmin\Controllers\PhpInfoController: - class: 'PhpMyAdmin\Controllers\PhpInfoController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\Preferences\ExportController: - class: 'PhpMyAdmin\Controllers\Preferences\ExportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPreferences: '@user_preferences' - relation: '@relation' - - PhpMyAdmin\Controllers\Preferences\FeaturesController: - class: 'PhpMyAdmin\Controllers\Preferences\FeaturesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPreferences: '@user_preferences' - relation: '@relation' - - PhpMyAdmin\Controllers\Preferences\ImportController: - class: 'PhpMyAdmin\Controllers\Preferences\ImportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPreferences: '@user_preferences' - relation: '@relation' - - PhpMyAdmin\Controllers\Preferences\MainPanelController: - class: 'PhpMyAdmin\Controllers\Preferences\MainPanelController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPreferences: '@user_preferences' - relation: '@relation' - - PhpMyAdmin\Controllers\Preferences\ManageController: - class: 'PhpMyAdmin\Controllers\Preferences\ManageController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPreferences: '@user_preferences' - relation: '@relation' - - PhpMyAdmin\Controllers\Preferences\NavigationController: - class: 'PhpMyAdmin\Controllers\Preferences\NavigationController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPreferences: '@user_preferences' - relation: '@relation' - - PhpMyAdmin\Controllers\Preferences\SqlController: - class: 'PhpMyAdmin\Controllers\Preferences\SqlController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPreferences: '@user_preferences' - relation: '@relation' - - PhpMyAdmin\Controllers\Preferences\TwoFactorController: - class: 'PhpMyAdmin\Controllers\Preferences\TwoFactorController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - relation: '@relation' - - PhpMyAdmin\Controllers\SchemaExportController: - class: 'PhpMyAdmin\Controllers\SchemaExportController' - arguments: - export: '@export' - relation: '@relation' - - PhpMyAdmin\Controllers\Server\DatabasesController: - class: 'PhpMyAdmin\Controllers\Server\DatabasesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\Server\BinlogController: - class: 'PhpMyAdmin\Controllers\Server\BinlogController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\Server\CollationsController: - class: 'PhpMyAdmin\Controllers\Server\CollationsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\Server\EnginesController: - class: 'PhpMyAdmin\Controllers\Server\EnginesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\Server\ExportController: - class: 'PhpMyAdmin\Controllers\Server\ExportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - export: '@display_export' - - PhpMyAdmin\Controllers\Server\ImportController: - class: 'PhpMyAdmin\Controllers\Server\ImportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\Server\PluginsController: - class: 'PhpMyAdmin\Controllers\Server\PluginsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - plugins: '@server_plugins' - - PhpMyAdmin\Controllers\Server\PrivilegesController: - class: 'PhpMyAdmin\Controllers\Server\PrivilegesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - relation: '@relation' - - PhpMyAdmin\Controllers\Server\ReplicationController: - class: 'PhpMyAdmin\Controllers\Server\ReplicationController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - replicationGui: '@replication_gui' - - PhpMyAdmin\Controllers\Server\SqlController: - class: 'PhpMyAdmin\Controllers\Server\SqlController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - sqlQueryForm: '@sql_query_form' - - PhpMyAdmin\Controllers\Server\UserGroupsController: - class: 'PhpMyAdmin\Controllers\Server\UserGroupsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - relation: '@relation' - - PhpMyAdmin\Controllers\Server\Status\AdvisorController: - class: 'PhpMyAdmin\Controllers\Server\Status\AdvisorController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - data: '@status_data' - advisor: '@advisor' - - PhpMyAdmin\Controllers\Server\Status\MonitorController: - class: 'PhpMyAdmin\Controllers\Server\Status\MonitorController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - data: '@status_data' - monitor: '@status_monitor' - - PhpMyAdmin\Controllers\Server\Status\ProcessesController: - class: 'PhpMyAdmin\Controllers\Server\Status\ProcessesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - data: '@status_data' - - PhpMyAdmin\Controllers\Server\Status\QueriesController: - class: 'PhpMyAdmin\Controllers\Server\Status\QueriesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - data: '@status_data' - - PhpMyAdmin\Controllers\Server\Status\StatusController: - class: 'PhpMyAdmin\Controllers\Server\Status\StatusController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - data: '@status_data' - replicationGui: '@replication_gui' - - PhpMyAdmin\Controllers\Server\Status\VariablesController: - class: 'PhpMyAdmin\Controllers\Server\Status\VariablesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - data: '@status_data' - - PhpMyAdmin\Controllers\Server\VariablesController: - class: 'PhpMyAdmin\Controllers\Server\VariablesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\SqlController: - class: 'PhpMyAdmin\Controllers\SqlController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - sql: '@sql' - checkUserPrivileges: '@check_user_privileges' - - PhpMyAdmin\Controllers\Table\AddFieldController: - class: 'PhpMyAdmin\Controllers\Table\AddFieldController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - transformations: '@transformations' - config: '@config' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\ChangeController: - class: 'PhpMyAdmin\Controllers\Table\ChangeController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - insertEdit: '@insert_edit' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\ChartController: - class: 'PhpMyAdmin\Controllers\Table\ChartController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\CreateController: - class: 'PhpMyAdmin\Controllers\Table\CreateController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - transformations: '@transformations' - config: '@config' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\ExportController: - class: 'PhpMyAdmin\Controllers\Table\ExportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - export: '@display_export' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\FindReplaceController: - class: 'PhpMyAdmin\Controllers\Table\FindReplaceController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\GetFieldController: - class: 'PhpMyAdmin\Controllers\Table\GetFieldController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\GisVisualizationController: - class: 'PhpMyAdmin\Controllers\Table\GisVisualizationController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\ImportController: - class: 'PhpMyAdmin\Controllers\Table\ImportController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\IndexesController: - class: 'PhpMyAdmin\Controllers\Table\IndexesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\OperationsController: - class: 'PhpMyAdmin\Controllers\Table\OperationsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - operations: '@operations' - checkUserPrivileges: '@check_user_privileges' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\PrivilegesController: - class: 'PhpMyAdmin\Controllers\Table\PrivilegesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - privileges: '@server_privileges' - - PhpMyAdmin\Controllers\Table\RecentFavoriteController: - class: 'PhpMyAdmin\Controllers\Table\RecentFavoriteController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\RelationController: - class: 'PhpMyAdmin\Controllers\Table\RelationController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\ReplaceController: - class: 'PhpMyAdmin\Controllers\Table\ReplaceController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - insertEdit: '@insert_edit' - transformations: '@transformations' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\RowActionController: - class: 'PhpMyAdmin\Controllers\Table\RowActionController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\SearchController: - class: 'PhpMyAdmin\Controllers\Table\SearchController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - search: '@table_search' - relation: '@relation' - - PhpMyAdmin\Controllers\Table\SqlController: - class: 'PhpMyAdmin\Controllers\Table\SqlController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - sqlQueryForm: '@sql_query_form' - - PhpMyAdmin\Controllers\Table\StructureController: - class: 'PhpMyAdmin\Controllers\Table\StructureController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - relation: '@relation' - transformations: '@transformations' - create_add_field: '@create_add_field' - - PhpMyAdmin\Controllers\Table\TrackingController: - class: 'PhpMyAdmin\Controllers\Table\TrackingController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - tracking: '@tracking' - - PhpMyAdmin\Controllers\Table\TriggersController: - class: 'PhpMyAdmin\Controllers\Table\TriggersController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - - PhpMyAdmin\Controllers\Table\ZoomSearchController: - class: 'PhpMyAdmin\Controllers\Table\ZoomSearchController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - db: '%db%' - table: '%table%' - search: '@table_search' - relation: '@relation' - - PhpMyAdmin\Controllers\ThemesController: - class: 'PhpMyAdmin\Controllers\ThemesController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\TransformationOverviewController: - class: 'PhpMyAdmin\Controllers\TransformationOverviewController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - transformations: '@transformations' - - PhpMyAdmin\Controllers\TransformationWrapperController: - class: 'PhpMyAdmin\Controllers\TransformationWrapperController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - transformations: '@transformations' - relation: '@relation' - - PhpMyAdmin\Controllers\UserPasswordController: - class: 'PhpMyAdmin\Controllers\UserPasswordController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - userPassword: '@user_password' - - PhpMyAdmin\Controllers\VersionCheckController: - class: 'PhpMyAdmin\Controllers\VersionCheckController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\ViewCreateController: - class: 'PhpMyAdmin\Controllers\ViewCreateController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - - PhpMyAdmin\Controllers\ViewOperationsController: - class: 'PhpMyAdmin\Controllers\ViewOperationsController' - arguments: - response: '@response' - dbi: '@dbi' - template: '@template' - operations: '@operations' diff --git a/libraries/services_loader.php b/libraries/services_loader.php new file mode 100644 index 0000000000..fdb21a5547 --- /dev/null +++ b/libraries/services_loader.php @@ -0,0 +1,35 @@ +services(); + $loadServices = function (array $servicesFile, ServicesConfigurator $services): void { + foreach ($servicesFile['services'] as $serviceName => $service) { + if (is_string($service)) { + $services->alias($serviceName, $service); + continue; + } + $theService = $services->set($serviceName, $service['class']); + if ($service['arguments'] !== null) { + foreach ($service['arguments'] as &$argumentName) { + if ($argumentName[0] === '@') { + $services->alias($serviceName, substr($argumentName, 1)); + $argumentName = new Reference(substr($argumentName, 1)); + } + } + $theService->args($service['arguments']); + } + if ($service['factory'] !== null) { + $theService->factory($service['factory']); + } + } + }; + + $servicesFile = include __DIR__ . '/services.php'; + $loadServices($servicesFile, $services); + $servicesFile = include __DIR__ . '/services_controllers.php'; + $loadServices($servicesFile, $services); +}; diff --git a/url.php b/url.php index a617612403..4e0b022eef 100644 --- a/url.php +++ b/url.php @@ -23,7 +23,7 @@ define('PMA_MINIMUM_COMMON', true); require_once ROOT_PATH . 'libraries/common.inc.php'; -// Load database service because services.yaml is not available here +// Load database service because services.php is not available here $containerBuilder->set(DatabaseInterface::class, DatabaseInterface::load()); // Only output the http headers