Skip to content

Commit

Permalink
Merge branch '2.3' into 2.7
Browse files Browse the repository at this point in the history
* 2.3:
  Fix undefined array $server
  [ProxyManager] Tmp fix composer reqs issue in ZF
  Add missing exclusions from phpunit.xml.dist
  Fix the server variables in the router_*.php files
  [Validator] Allow an empty path with a non empty fragment or a query
  The following change adds support for Armenian pluralization.
  [2.3][Process] fix Proccess run with pts enabled

Conflicts:
	composer.json
	src/Symfony/Bridge/ProxyManager/composer.json
	src/Symfony/Bundle/DebugBundle/phpunit.xml.dist
	src/Symfony/Component/Security/phpunit.xml.dist
  • Loading branch information
nicolas-grekas committed Nov 18, 2015
2 parents 2cbf822 + 6f72d63 commit a8d21b5
Show file tree
Hide file tree
Showing 37 changed files with 68 additions and 27 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"doctrine/doctrine-bundle": "~1.2",
"monolog/monolog": "~1.11",
"ircmaxell/password-compat": "~1.0",
"zendframework/zend-stdlib": "~2.5",
"ocramius/proxy-manager": "~0.4|~1.0",
"egulias/email-validator": "~1.2"
},
Expand Down
4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<directory>./src/Symfony/Bundle/*/Resources</directory>
<directory>./src/Symfony/Component/*/Resources</directory>
<directory>./src/Symfony/Component/*/*/Resources</directory>
<directory>./src/Symfony/Bridge/*/vendor</directory>
<directory>./src/Symfony/Bundle/*/vendor</directory>
<directory>./src/Symfony/Component/*/vendor</directory>
<directory>./src/Symfony/Component/*/*/vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Doctrine/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Monolog/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bridge/ProxyManager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"require": {
"php": ">=5.3.9",
"symfony/dependency-injection": "~2.3",
"zendframework/zend-stdlib": "~2.5",
"ocramius/proxy-manager": "~0.4|~1.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/DebugBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
$_SERVER = array_merge($_SERVER, $_ENV);
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app_dev.php';

// Since we are rewriting to app_dev.php, adjust SCRIPT_NAME and PHP_SELF accordingly
$_SERVER['SCRIPT_NAME'] = DIRECTORY_SEPARATOR.'app_dev.php';
$_SERVER['PHP_SELF'] = DIRECTORY_SEPARATOR.'app_dev.php';

require 'app_dev.php';

error_log(sprintf('%s:%d [%d]: %s', $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT'], http_response_code(), $_SERVER['REQUEST_URI']), 4);
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
$_SERVER = array_merge($_SERVER, $_ENV);
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app.php';

// Since we are rewriting to app.php, adjust SCRIPT_NAME and PHP_SELF accordingly
$_SERVER['SCRIPT_NAME'] = DIRECTORY_SEPARATOR.'app.php';
$_SERVER['PHP_SELF'] = DIRECTORY_SEPARATOR.'app.php';

require 'app.php';

error_log(sprintf('%s:%d [%d]: %s', $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT'], http_response_code(), $_SERVER['REQUEST_URI']), 4);
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/TwigBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Asset/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Filesystem/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Form/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ public function testGetUserInfo()
{
$request = new Request();

$server['PHP_AUTH_USER'] = 'fabien';
$server = array('PHP_AUTH_USER' => 'fabien');
$request->initialize(array(), array(), array(), array(), array(), $server);
$this->assertEquals('fabien', $request->getUserInfo());

Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Intl/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/OptionsResolver/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
12 changes: 12 additions & 0 deletions src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,20 @@ public function start($callback = null)
}
}

$ptsWorkaround = null;

if (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
// Workaround for the bug, when PTS functionality is enabled.
// @see : https://bugs.php.net/69442
$ptsWorkaround = fopen('php://fd/0', 'r');
}

$this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $this->env, $this->options);

if ($ptsWorkaround) {
fclose($ptsWorkaround);
}

if (!is_resource($this->process)) {
throw new RuntimeException('Unable to launch a new process.');
}
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Process/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/PropertyAccess/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<exclude>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Routing/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Component/Security/Acl/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Component/Security/Core/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Security/Csrf/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Security/Http/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
13 changes: 6 additions & 7 deletions src/Symfony/Component/Security/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,20 @@
<testsuites>
<testsuite name="Symfony Security Component Test Suite">
<directory>./Tests/</directory>
<directory>./Acl/Tests/</directory>
<directory>./Core/Tests/</directory>
<directory>./Http/Tests/</directory>
<directory>./*/Tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./Acl/Tests</directory>
<directory>./Core/Tests</directory>
<directory>./Http/Tests</directory>
<directory>./vendor</directory>
<directory>./*/Resources</directory>
<directory>./*/Tests</directory>
<directory>./*/vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Serializer/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Templating/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Translation/PluralizationRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public static function get($number, $locale)
case 'fr':
case 'gun':
case 'hi':
case 'hy':
case 'ln':
case 'mg':
case 'nso':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function successLangcodes()
{
return array(
array('1', array('ay','bo', 'cgg','dz','id', 'ja', 'jbo', 'ka','kk','km','ko','ky')),
array('2', array('nl', 'fr', 'en', 'de', 'de_GE')),
array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')),
array('3', array('be','bs','cs','hr')),
array('4', array('cy','mt', 'sl')),
array('5', array()),
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Translation/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class UrlValidator extends ConstraintValidator
\] # a IPv6 address
)
(:[0-9]+)? # a port (optional)
(/?|/\S+|\?|\#) # a /, nothing, a / with something, a query or a fragment
(/?|/\S+|\?\S*|\#\S*) # a /, nothing, a / with something, a query or a fragment
$~ixu';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ public function getValidUrls()
array('http://username:[email protected]'),
array('http://[email protected]'),
array('http://symfony.com?'),
array('http://symfony.com?query=1'),
array('http://symfony.com/?query=1'),
array('http://symfony.com#'),
array('http://symfony.com#fragment'),
array('http://symfony.com/#fragment'),
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/Symfony/Component/Validator/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/VarDumper/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./Tests</directory>
<directory>./Resources</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Yaml/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<whitelist>
<directory>./</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
Expand Down

0 comments on commit a8d21b5

Please sign in to comment.