Skip to content

Undefined array key "data" in vendor/magento/framework/App/Config/Initial.php on line 61 #40234

@michielgerritsen

Description

@michielgerritsen

Preconditions and environment

  • Magento 2.4.9 Alpha 3
  • Anything else that would help a developer reproduce the bug

Steps to reproduce

Take a freshly installed Magento 2.4.9 Alpha 3, and try to run an integration test. I've run this test:

class ExampleTest extends \PHPUnit\Framework\TestCase
{
    /**
     * The only goal of this test is to check if test can be run successful.
     */
    public function testSuccess()
    {
        $this->assertTrue(true);
    }

    /**
     * @magentoConfigFixture current_store general/store_information/name Magento 2 test store
     */
    public function testCanUseConfigFixture(): void
    {
        $result = ObjectManager::getInstance()->get(ScopeConfigInterface::class)->getValue(
            'general/store_information/name',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );

        $this->assertEquals('Magento 2 test store', $result);
    }
}

With this command:

cd /data/dev/tests/integration/ && ../../../vendor/bin/phpunit /data/vendor/michielgerritsen/exampletest/Test/Integration/ExampleTest.php

This module is nothing more than a composer.json, registration.php, a module.xml, and this test, all installed through Composer.

Expected result

I would expect that the test runs successfully.

Actual result

I'm getting this error:

Exception: 
In ErrorHandler.php line 61:
  [Exception]
  Warning: Undefined array key "data" in /data/vendor/magento/framework/App/C
  onfig/Initial.php on line 61
Exception trace:
  at /data/vendor/magento/framework/App/ErrorHandler.php:61
 Magento\Framework\App\ErrorHandler->handler() at /data/vendor/magento/framework/App/Config/Initial.php:61
 Magento\Framework\App\Config\Initial->__construct() at /data/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:108
 Magento\Framework\ObjectManager\Factory\Compiled->create() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
 Magento\Framework\ObjectManager\Factory\Compiled->get() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
 Magento\Framework\ObjectManager\Factory\Compiled->create() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
 Magento\Framework\ObjectManager\Factory\Compiled->get() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:125
 Magento\Framework\ObjectManager\Factory\Compiled->parseArray() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:86
 Magento\Framework\ObjectManager\Factory\Compiled->create() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:150
 Magento\Framework\ObjectManager\Factory\Compiled->get() at /data/vendor/magento/framework/ObjectManager/Factory/Compiled.php:79
 Magento\Framework\ObjectManager\Factory\Compiled->create() at /data/vendor/magento/framework/ObjectManager/ObjectManager.php:73
 Magento\Framework\ObjectManager\ObjectManager->get() at /data/generated/code/Magento/Config/App/Config/Type/System/Reader/Proxy.php:94
 Magento\Config\App\Config\Type\System\Reader\Proxy->_getSubject() at /data/generated/code/Magento/Config/App/Config/Type/System/Reader/Proxy.php:105
 Magento\Config\App\Config\Type\System\Reader\Proxy->read() at /data/vendor/magento/module-config/App/Config/Type/System.php:436
 Magento\Config\App\Config\Type\System->readData() at /data/vendor/magento/module-config/App/Config/Type/System.php:269
 Magento\Config\App\Config\Type\System->loadDefaultScopeData() at /data/vendor/magento/module-config/App/Config/Type/System.php:214
 Magento\Config\App\Config\Type\System->getWithParts() at /data/vendor/magento/module-config/App/Config/Type/System.php:189
 Magento\Config\App\Config\Type\System->get() at /data/vendor/magento/framework/App/Config.php:121
 Magento\Framework\App\Config->get() at /data/vendor/magento/framework/App/Config.php:74
 Magento\Framework\App\Config->getValue() at /data/vendor/magento/module-user/Model/UserValidationRules.php:57
 Magento\User\Model\UserValidationRules->getMinimumPasswordLength() at /data/vendor/magento/module-user/Model/UserValidationRules.php:119
 Magento\User\Model\UserValidationRules->addPasswordRules() at /data/setup/src/Magento/Setup/Console/Command/AdminUserCreateCommand.php:239
 Magento\Setup\Console\Command\AdminUserCreateCommand->validate() at /data/setup/src/Magento/Setup/Console/Command/InstallCommand.php:448
 Magento\Setup\Console\Command\InstallCommand->validateAdmin() at /data/setup/src/Magento/Setup/Console/Command/InstallCommand.php:276
 Magento\Setup\Console\Command\InstallCommand->initialize() at /data/vendor/symfony/console/Command/Command.php:292
 Symfony\Component\Console\Command\Command->run() at /data/vendor/symfony/console/Application.php:1078
 Symfony\Component\Console\Application->doRunCommand() at /data/vendor/symfony/console/Application.php:324
 Symfony\Component\Console\Application->doRun() at /data/vendor/magento/framework/Console/Cli.php:123
 Magento\Framework\Console\Cli->doRun() at /data/vendor/symfony/console/Application.php:175
 Symfony\Component\Console\Application->run() at /data/bin/magento:23
setup:install [--remote-storage-driver REMOTE-STORAGE-DRIVER] [--remote-storage-prefix REMOTE-STORAGE-PREFIX] [--remote-storage-endpoint REMOTE-STORAGE-ENDPOINT] [--remote-storage-bucket REMOTE-STORAGE-BUCKET] [--remote-storage-region REMOTE-STORAGE-REGION] [--remote-storage-key REMOTE-STORAGE-KEY] [--remote-storage-secret REMOTE-STORAGE-SECRET] [--remote-storage-path-style REMOTE-STORAGE-PATH-STYLE] [--backend-frontname BACKEND-FRONTNAME] [--enable-debug-logging ENABLE-DEBUG-LOGGING] [--enable-syslog-logging ENABLE-SYSLOG-LOGGING] [--id_salt ID_SALT] [--config-async CONFIG-ASYNC] [--amqp-host AMQP-HOST] [--amqp-port AMQP-PORT] [--amqp-user AMQP-USER] [--amqp-password AMQP-PASSWORD] [--amqp-virtualhost AMQP-VIRTUALHOST] [--amqp-ssl AMQP-SSL] [--amqp-ssl-options AMQP-SSL-OPTIONS] [--consumers-wait-for-messages CONSUMERS-WAIT-FOR-MESSAGES] [--queue-default-connection QUEUE-DEFAULT-CONNECTION] [--stomp-host STOMP-HOST] [--stomp-port STOMP-PORT] [--stomp-user STOMP-USER] [--stomp-password STOMP-PASSWORD] [--stomp
 in /data/vendor/magento/framework/Shell.php:65
Stack trace:
#0 /data/dev/tests/integration/framework/Magento/TestFramework/Application.php(566): Magento\Framework\Shell->execute()
#1 /data/dev/tests/integration/framework/bootstrap.php(94): Magento\TestFramework\Application->install()
#2 /data/vendor/phpunit/phpunit/src/TextUI/Application.php(337): include_once('...')
#3 /data/vendor/phpunit/phpunit/src/TextUI/Application.php(109): PHPUnit\TextUI\Application->loadBootstrapScript()
#4 /data/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run()
#5 /data/vendor/bin/phpunit(122): include('...')
#6 ***main***
Next Magento\Framework\Exception\LocalizedException: Command returned non-zero exit code:
`/usr/bin/php8.3 -f '/data/bin/magento' setup:install -vvv --db-host='127.0.0.1' --db-user='magento-test' --db-password='password' --db-name='magento-test' --db-prefix='' --backend-frontname='backend' --admin-user='user' --admin-password='password1' --admin-email='admin@example.com' --admin-firstname='firstname' --admin-lastname='lastname' --use-secure='0' --use-secure-admin='0' --magento-init-params='MAGE_DIRS[etc][path]=/data/dev/tests/integration/tmp/sandbox-0-06cd107fe0252c033e09409f010402262d6dc6bbb78dfc47cdf89d6bf6d43cc8/etc&MAGE_DIRS[var][path]=/data/dev/tests/integration/tmp/sandbox-0-06cd107fe0252c033e09409f010402262d6dc6bbb78dfc47cdf89d6bf6d43cc8/var&MAGE_DIRS[var_export][path]=/data/dev/tests/integration/tmp/sandbox-0-06cd107fe0252c033e09409f010402262d6dc6bbb78dfc47cdf89d6bf6d43cc8/var/export&MAGE_DIRS[media][path]=/data/dev/tests/integration/tmp/sandbox-0-06cd107fe0252c033e09409f010402262d6dc6bbb78dfc47cdf89d6bf6d43cc8/pub/media&MAGE_DIRS[static][path]=/data/dev/tests/integration/tmp/sandbox-0-06c
Stack trace:
#0 /data/dev/tests/integration/framework/Magento/TestFramework/Application.php(566): Magento\Framework\Shell->execute()
#1 /data/dev/tests/integration/framework/bootstrap.php(94): Magento\TestFramework\Application->install()
#2 /data/vendor/phpunit/phpunit/src/TextUI/Application.php(337): include_once('...')
#3 /data/vendor/phpunit/phpunit/src/TextUI/Application.php(109): PHPUnit\TextUI\Application->loadBootstrapScript()
#4 /data/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run()
#5 /data/vendor/bin/phpunit(122): include('...')
#6 ***main***
=== Memory Usage System Stats ===
Memory usage (OS):	42.20M (527.54% of 8.00M reported by PHP)
Estimated memory leak:	34.20M (81.04% of used memory)

Additional information

You can see the full output of the build here:
https://github.com/michielgerritsen/magento2-extension-integration-test/actions/runs/18530465528/job/52883513156

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: Test frameworkComponent: IntegrationIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Reported on 2.4.9-alpha3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

Status

Ready for Development

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions