Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[PhpUnitBridge] vendor weak mode fails #21980

Copy link
Copy link
Closed
@theofidry

Description

@theofidry
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.0 (master — 40d133c)

#21539 results in an error on my end after upgrading symfony/symfony to ^3.3.@dev.

PHP Fatal error:  Uncaught uasort() expects parameter 1 to be array, null given

/path/to/project/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php:109
/path/to/project/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php:219

  thrown in /path/to/project/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php on line 219

Fatal error: Uncaught uasort() expects parameter 1 to be array, null given

From what I see the error seems to come from https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php#L88 where it should be:

$deprecations = array(
            'unsilencedCount' => 0,
            'remainingCount' => 0,
            'remaining vendorCount' => 0,  // this one is missing although doesn't cause an error
            'legacyCount' => 0,
            'otherCount' => 0,
            'unsilenced' => array(),
            'remaining' => array(),
            'remaining vendor' => array(), // this is the missing bit causing an error
            'legacy' => array(),
            'other' => array(),
        );

PhpUnit config:

<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.6/phpunit.xsd"
         backupGlobals="false"
         colors="true"
         bootstrap="app/autoload.php"
         stopOnFailure="true"
         verbose="true"
>
    <php>
        <env name="SYMFONY_DEPRECATIONS_HELPER" value="weak_vendors" />
    </php>

   <!-- ... -->
</phpunit>

/cc @greg0ire

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.