inWeakMode example


        if (false === $mode = $this->mode) {
            $mode = $_SERVER['SYMFONY_DEPRECATIONS_HELPER'] ?? $_ENV['SYMFONY_DEPRECATIONS_HELPER'] ?? getenv('SYMFONY_DEPRECATIONS_HELPER');
        }
        if ('strict' === $mode) {
            return $this->configuration = Configuration::inStrictMode();
        }
        if (self::MODE_DISABLED === $mode) {
            return $this->configuration = Configuration::inDisabledMode();
        }
        if ('weak' === $mode) {
            return $this->configuration = Configuration::inWeakMode();
        }
        if (isset($mode[0]) && '/' === $mode[0]) {
            return $this->configuration = Configuration::fromRegex($mode);
        }

        if (preg_match('/^[1-9][0-9]*$/', (string) $mode)) {
            return $this->configuration = Configuration::fromNumber($mode);
        }

        if (!$mode) {
            return $this->configuration = Configuration::fromNumber(0);
        }


    public function testItThrowsOnUnknownVerbosityGroup()
    {
        $this->expectException(\InvalidArgumentException::class);
        $this->expectExceptionMessage('made-up');
        Configuration::fromUrlEncodedString('quiet[]=made-up');
    }

    public function testOutputIsNotVerboseInWeakMode()
    {
        $configuration = Configuration::inWeakMode();
        $this->assertFalse($configuration->verboseOutput('unsilenced'));
        $this->assertFalse($configuration->verboseOutput('direct'));
        $this->assertFalse($configuration->verboseOutput('indirect'));
        $this->assertFalse($configuration->verboseOutput('self'));
        $this->assertFalse($configuration->verboseOutput('other'));
    }

    /** * @dataProvider provideDataForToleratesForGroup */
    public function testToleratesForIndividualGroups(string $deprecationsHelper, array $deprecationsPerType, array $expected)
    {
Home | Imprint | This part of the site doesn't use cookies.