Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/phpunit-bridge
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.0.3
Choose a base ref
...
head repository: symfony/phpunit-bridge
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.0.4
Choose a head ref
  • 8 commits
  • 1 file changed
  • 3 contributors

Commits on Jan 15, 2020

  1. Copy the full SHA
    1adfbac View commit details

Commits on Jan 30, 2020

  1. bug #34808 [PhpUnitBridge] Properly handle phpunit arguments for conf…

    …iguration file (biozshock)
    
    This PR was merged into the 4.3 branch.
    
    Discussion
    ----------
    
    [PhpUnitBridge] Properly handle phpunit arguments for configuration file
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 4.3
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | License       | MIT
    
    PhpUnitBridge should properly parse cli arguments for configuration file.
    After fixing #34300 the PhpUnitBridge stopped recognizing short `-c` option.
    Also original PHPUnit allows to pass a directory as configuration parameter and read from either phpunit.xml or phpunit.xml.dist
    
    Commits
    -------
    
    a7a5885661 Properly handle phpunit arguments for configuration file
    fabpot committed Jan 30, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e7a22bc View commit details

Commits on Jan 31, 2020

  1. Merge branch '4.3' into 4.4

    * 4.3:
      [Validator] fix access to uninitialized property when getting value
      [HttpClient] Fix regex bearer
      [HttpKernel] Fix stale-if-error behavior, add tests
      Improved error message when no supported user provider is found
      Properly handle phpunit arguments for configuration file
    nicolas-grekas committed Jan 31, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    58e3ade View commit details
  2. Merge branch '4.4' into 5.0

    * 4.4:
      [Validator] fix access to uninitialized property when getting value
      [HttpClient] Fix regex bearer
      [Translator] Default value for 'sort' option in translation:update should be 'asc'
      [HttpKernel] Fix stale-if-error behavior, add tests
      [Intl] Provide more locale translations
      [Mailer] Fix STARTTLS support for Postmark and Mandrill
      [Messenger] Check for all serialization exceptions during message dec…
      [Messenger] Fix bug when using single route with XML config
      Fix exception message in Doctrine Messenger
      [DI]  CheckTypeDeclarationsPass now checks if value is type of parameter type
      [SecurityBundle] fix security.authentication.provider.ldap_bind arguments
      Improved error message when no supported user provider is found
      Mysqli doesn't support the named parameters used by PdoAdapter
      Added debug argument to decide if debug page should be shown or not
      Mysqli doesn't support the named parameters used by PdoStore
      Properly handle phpunit arguments for configuration file
      [Mailer] add tests for http transports
    nicolas-grekas committed Jan 31, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    147d8c4 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    313ee84 View commit details
  4. Merge branch '3.4' into 4.3

    * 3.4:
      Bump phpunit-bridge cache
    nicolas-grekas committed Jan 31, 2020
    Copy the full SHA
    692a73a View commit details
  5. Merge branch '4.3' into 4.4

    * 4.3:
      Bump phpunit-bridge cache
    nicolas-grekas committed Jan 31, 2020
    Copy the full SHA
    d592d89 View commit details
  6. Merge branch '4.4' into 5.0

    * 4.4:
      Bump phpunit-bridge cache
    nicolas-grekas committed Jan 31, 2020
    Copy the full SHA
    38959f0 View commit details
Showing with 40 additions and 8 deletions.
  1. +40 −8 bin/simple-phpunit.php
48 changes: 40 additions & 8 deletions bin/simple-phpunit.php
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
*/

// Please update when phpunit needs to be reinstalled with fresh deps:
// Cache-Id: 2019-09-19 17:00 UTC
// Cache-Id: 2020-01-31 10:00 UTC

error_reporting(-1);

@@ -24,15 +24,47 @@

static $phpunitConfig = null;
if (null === $phpunitConfig) {
$opt = min(array_search('-c', $opts = array_reverse($argv), true) ?: INF, array_search('--configuration', $opts, true) ?: INF);
$phpunitConfigFilename = null;
if (INF !== $opt && isset($opts[$opt - 1])) {
$phpunitConfigFilename = $opts[$opt - 1];
} elseif (file_exists('phpunit.xml')) {
$phpunitConfigFilename = 'phpunit.xml';
} elseif (file_exists('phpunit.xml.dist')) {
$phpunitConfigFilename = 'phpunit.xml.dist';
$getPhpUnitConfig = function ($probableConfig) use (&$getPhpUnitConfig) {
if (!$probableConfig) {
return null;
}
if (is_dir($probableConfig)) {
return $getPhpUnitConfig($probableConfig.DIRECTORY_SEPARATOR.'phpunit.xml');
}

if (file_exists($probableConfig)) {
return $probableConfig;
}
if (file_exists($probableConfig.'.dist')) {
return $probableConfig.'.dist';
}

return null;
};

foreach ($argv as $cliArgumentIndex => $cliArgument) {
if ('--' === $cliArgument) {
break;
}
// long option
if ('--configuration' === $cliArgument && array_key_exists($cliArgumentIndex + 1, $argv)) {
$phpunitConfigFilename = $getPhpUnitConfig($argv[$cliArgumentIndex + 1]);
break;
}
// short option
if (0 === strpos($cliArgument, '-c')) {
if ('-c' === $cliArgument && array_key_exists($cliArgumentIndex + 1, $argv)) {
$phpunitConfigFilename = $getPhpUnitConfig($argv[$cliArgumentIndex + 1]);
} else {
$phpunitConfigFilename = $getPhpUnitConfig(substr($cliArgument, 2));
}
break;
}
}

$phpunitConfigFilename = $phpunitConfigFilename ?: $getPhpUnitConfig('phpunit.xml');

if ($phpunitConfigFilename) {
$phpunitConfig = new DomDocument();
$phpunitConfig->load($phpunitConfigFilename);