src/Data/DefaultDataProvider.php
private function fallbackFromDatabaseToConnection(array &$config)
    {
        if (isset($config['database'])) {
            // @codingStandardsIgnoreStart
            @\trigger_error(
                'Config key database is deprecated use instead connection. Fallback will be dropped.',
                E_USER_DEPRECATED
            );
            // @codingStandardsIgnoreEnd

            if (!isset($config['connection'])) {
                $config['connection'] = $config['database'];
            }

            unset($config['database']);
        }

        if (isset($config['connection']) && $config['connection'] instanceof Database) {
            // @codingStandardsIgnoreStart
            @\trigger_error(
                '"' . __METHOD__ . '" now accepts doctrine instances - ' .
                'passing Contao database instances is deprecated.',
                E_USER_DEPRECATED
            );
            // @codingStandardsIgnoreEnd
            $reflection = new \ReflectionProperty(Database::class, 'resConnection');
            $reflection->setAccessible(true);

            $config['connection'] = $reflection->getValue($config['connection']);
        }
    }
private function fallbackFromDatabaseToConnection(array &$config)
    {
        if (isset($config['database'])) {
            // @codingStandardsIgnoreStart
            @\trigger_error(
                'Config key database is deprecated use instead connection. Fallback will be dropped.',
                E_USER_DEPRECATED
            );
            // @codingStandardsIgnoreEnd

            if (!isset($config['connection'])) {
                $config['connection'] = $config['database'];
            }

            unset($config['database']);
        }

        if (isset($config['connection']) && $config['connection'] instanceof Database) {
            // @codingStandardsIgnoreStart
            @\trigger_error(
                '"' . __METHOD__ . '" now accepts doctrine instances - ' .
                'passing Contao database instances is deprecated.',
                E_USER_DEPRECATED
            );
            // @codingStandardsIgnoreEnd
            $reflection = new \ReflectionProperty(Database::class, 'resConnection');
            $reflection->setAccessible(true);

            $config['connection'] = $reflection->getValue($config['connection']);
        }
    }
private function fallbackFromDatabaseToConnection ( array & $ config ) { if ( isset ( $ config [ 'database' ] ) ) { // @codingStandardsIgnoreStart @ \ trigger_error ( 'Config key database is deprecated use instead connection. Fallback will be dropped.' , E_USER_DEPRECATED ) ; // @codingStandardsIgnoreEnd if ( ! isset ( $ config [ 'connection' ] ) ) { $ config [ 'connection' ] = $ config [ 'database' ] ; } unset ( $ config [ 'database' ] ) ; } if ( isset ( $ config [ 'connection' ] ) && $ config [ 'connection' ] instanceof Database ) { // @codingStandardsIgnoreStart @ \ trigger_error ( '"' . __METHOD__ . '" now accepts doctrine instances - ' . 'passing Contao database instances is deprecated.' , E_USER_DEPRECATED ) ; // @codingStandardsIgnoreEnd $ reflection = new \ ReflectionProperty ( Database :: class , 'resConnection' ) ; $ reflection -> setAccessible ( true ) ; $ config [ 'connection' ] = $ reflection -> getValue ( $ config [ 'connection' ] ) ; } }
This is a fallback for get the connection instead of the old database.

@param array $config The configuration.

@return void

@deprecated This method is deprecated sinde 2.1 and where removed in 3.0. The old database never used in future.
This is a fallback for get the connection instead of the old database .