diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php index 5e53fae965..ba73678541 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php @@ -2,12 +2,12 @@ /* * This file is part of the Symfony package. -* -* (c) Fabien Potencier -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass; diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index 42d88b030d..063723d32d 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -133,7 +133,7 @@ class DeprecationErrorHandler private static function hasColorSupport() { if ('\\' === DIRECTORY_SEPARATOR) { - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } return defined('STDOUT') && function_exists('posix_isatty') && @posix_isatty(STDOUT); diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php index 07f81f5878..2b756a2997 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php +++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php @@ -97,8 +97,12 @@ class TemplateFinder implements TemplateFinderInterface */ private function findTemplatesInBundle(BundleInterface $bundle) { - $templates = $this->findTemplatesInFolder($bundle->getPath().'/Resources/views'); $name = $bundle->getName(); + $templates = array_merge( + $this->findTemplatesInFolder($bundle->getPath().'/Resources/views'), + $this->findTemplatesInFolder($this->rootDir.'/'.$name.'/views') + ); + $templates = array_unique($templates); foreach ($templates as $i => $template) { $templates[$i] = $template->set('bundle', $name); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php index 59a7d1d920..a417cdae3d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/TemplateFinderTest.php @@ -46,10 +46,11 @@ class TemplateFinderTest extends TestCase $finder->findAllTemplates() ); - $this->assertCount(6, $templates, '->findAllTemplates() find all templates in the bundles and global folders'); + $this->assertCount(7, $templates, '->findAllTemplates() find all templates in the bundles and global folders'); $this->assertContains('BaseBundle::base.format.engine', $templates); $this->assertContains('BaseBundle::this.is.a.template.format.engine', $templates); $this->assertContains('BaseBundle:controller:base.format.engine', $templates); + $this->assertContains('BaseBundle:controller:custom.format.engine', $templates); $this->assertContains('::this.is.a.template.format.engine', $templates); $this->assertContains('::resource.format.engine', $templates); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php index 0cfc92241b..9830897914 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand; use Symfony\Bundle\FrameworkBundle\Console\Application; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/base.format.engine b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/base.format.engine new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/controller/custom.format.engine b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/BaseBundle/views/controller/custom.format.engine new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php index 351cf79d43..a73987bcc9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Fragment/bundles.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php index 351cf79d43..a73987bcc9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Profiler/bundles.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php index 351cf79d43..a73987bcc9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Session/bundles.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index 7b6ac4186a..c2381a4344 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -371,7 +371,6 @@ class MainConfiguration implements ConfigurationInterface ), 'my_entity_provider' => array('entity' => array('class' => 'SecurityBundle:User', 'property' => 'username')), )) - ->disallowNewKeysInSubsequentConfigs() ->isRequired() ->requiresAtLeastOneElement() ->useAttributeAsKey('name') diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php index 72a41bc122..acf4788adc 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Bundle\SecurityBundle\Tests\DataCollector; use Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector; diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php index cee883f9cb..c16ab12f65 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/CsrfFormLogin/bundles.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php index c6fd207dd1..412e1c5d09 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/FirewallEntryPoint/bundles.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php index e4bbc08f73..d53ff3e7eb 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/StandardFormLogin/bundles.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\FormLoginBundle; use Symfony\Bundle\TwigBundle\TwigBundle; use Symfony\Bundle\SecurityBundle\SecurityBundle; diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index 1d13ffe881..e63841d260 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -89,7 +89,7 @@ class StreamOutput extends Output * * Colorization is disabled if not supported by the stream: * - * - Windows without Ansicon and ConEmu + * - Windows without Ansicon, ConEmu or Mintty * - non tty consoles * * @return bool true if the stream supports colorization, false otherwise @@ -97,7 +97,7 @@ class StreamOutput extends Output protected function hasColorSupport() { if (DIRECTORY_SEPARATOR === '\\') { - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } return function_exists('posix_isatty') && @posix_isatty($this->stream); diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index aa39d7ccfd..30b8257934 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -325,6 +325,17 @@ class Crawler extends \SplObjectStorage } } + // Serializing and unserializing a crawler creates DOM objects in a corrupted state. DOM elements are not properly serializable. + public function unserialize($serialized) + { + throw new \BadMethodCallException('A Crawler cannot be serialized.'); + } + + public function serialize() + { + throw new \BadMethodCallException('A Crawler cannot be serialized.'); + } + /** * Returns a node given its position in the node list. * diff --git a/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php index 436d8af560..b59d0d6f27 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php @@ -2,12 +2,12 @@ /* * This file is part of the Symfony package. -* -* (c) Fabien Potencier -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Symfony\Component\Finder\Tests\Iterator; @@ -16,42 +16,36 @@ use Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator; class RecursiveDirectoryIteratorTest extends IteratorTestCase { /** - * @dataProvider getPaths - * - * @param string $path - * @param bool $seekable - * @param array $contains - * @param string $message + * @group network */ - public function testRewind($path, $seekable, $contains, $message = null) + public function testRewindOnFtp() { try { - $i = new RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS); + $i = new RecursiveDirectoryIterator('ftp://ftp.mozilla.org/', \RecursiveDirectoryIterator::SKIP_DOTS); } catch (\UnexpectedValueException $e) { - $this->markTestSkipped(sprintf('Unsupported stream "%s".', $path)); + $this->markTestSkipped('Unsupported stream "ftp".'); } $i->rewind(); - $this->assertTrue(true, $message); + $this->assertTrue(true); } /** - * @dataProvider getPaths - * - * @param string $path - * @param bool $seekable - * @param array $contains - * @param string $message + * @group network */ - public function testSeek($path, $seekable, $contains, $message = null) + public function testSeekOnFtp() { try { - $i = new RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS); + $i = new RecursiveDirectoryIterator('ftp://ftp.mozilla.org/', \RecursiveDirectoryIterator::SKIP_DOTS); } catch (\UnexpectedValueException $e) { - $this->markTestSkipped(sprintf('Unsupported stream "%s".', $path)); + $this->markTestSkipped('Unsupported stream "ftp".'); } + $contains = array( + 'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'README', + 'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'pub', + ); $actual = array(); $i->seek(0); @@ -62,18 +56,4 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase $this->assertEquals($contains, $actual); } - - public function getPaths() - { - $data = array(); - - // ftp - $contains = array( - 'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'README', - 'ftp://ftp.mozilla.org'.DIRECTORY_SEPARATOR.'pub', - ); - $data[] = array('ftp://ftp.mozilla.org/', false, $contains); - - return $data; - } } diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index bbe1914dec..d217cf0193 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -854,6 +854,10 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ public function setAutoInitialize($initialize) { + if ($this->locked) { + throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); + } + $this->autoInitialize = (bool) $initialize; return $this; diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php index bafe5c098f..33779260ae 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ArrayToPartsTransformerTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php index 8f2d16bb1b..7eb716b6d3 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/BaseDateTimeTransformerTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php index 6dc9785c24..eb3cf9704b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/ValueToDuplicatesTransformerTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php index 7c816d7f48..50c071ef53 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php index f197b19857..8ace4d3c3b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php index 654f6d5d2f..bd065eeb45 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -1,13 +1,13 @@ -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * This file is part of the Symfony package. + * + * (c) Fabien Potencier + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Symfony\Component\Form\Tests\Extension\Validator; diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index db705db87c..c8156ea7c5 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -65,7 +65,7 @@ class NativeSessionStorage implements SessionStorageInterface * ("auto_start", is not supported as it tells PHP to start a session before * PHP starts to execute user-land code. Setting during runtime has no effect). * - * cache_limiter, "nocache" (use "0" to prevent headers from being sent entirely). + * cache_limiter, "" (use "0" to prevent headers from being sent entirely). * cookie_domain, "" * cookie_httponly, "" * cookie_lifetime, "0" diff --git a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php index e12c8d05e8..57568d3936 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony package. * - * (c) Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Symfony/Component/Process/Tests/NonStopableProcess.php b/src/Symfony/Component/Process/Tests/NonStopableProcess.php index 692feebba2..54510c16a3 100644 --- a/src/Symfony/Component/Process/Tests/NonStopableProcess.php +++ b/src/Symfony/Component/Process/Tests/NonStopableProcess.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + /** * Runs a PHP script that can be stopped only with a SIGKILL (9) signal for 3 seconds. * diff --git a/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php b/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php index 26673ea45a..bbd7ddfeb2 100644 --- a/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php +++ b/src/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + define('ERR_SELECT_FAILED', 1); define('ERR_TIMEOUT', 2); define('ERR_READ_FAILED', 3); diff --git a/src/Symfony/Component/Process/Tests/SignalListener.php b/src/Symfony/Component/Process/Tests/SignalListener.php index bd4d138b04..4206550f5b 100644 --- a/src/Symfony/Component/Process/Tests/SignalListener.php +++ b/src/Symfony/Component/Process/Tests/SignalListener.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + // required for signal handling declare (ticks = 1); diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php index 5955049246..3767e08c82 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathBuilderTest.php @@ -1,7 +1,7 @@ * diff --git a/src/Symfony/Component/Security/Core/Util/SecureRandom.php b/src/Symfony/Component/Security/Core/Util/SecureRandom.php index f4167e4d2f..65722ce3ef 100644 --- a/src/Symfony/Component/Security/Core/Util/SecureRandom.php +++ b/src/Symfony/Component/Security/Core/Util/SecureRandom.php @@ -43,9 +43,9 @@ final class SecureRandom implements SecureRandomInterface $this->logger = $logger; // determine whether to use OpenSSL - if (!function_exists('openssl_random_pseudo_bytes')) { + if (!function_exists('random_bytes') && !function_exists('openssl_random_pseudo_bytes')) { if (null !== $this->logger) { - $this->logger->notice('It is recommended that you enable the "openssl" extension for random number generation.'); + $this->logger->notice('It is recommended that you install the "paragonie/random_compat" library or enable the "openssl" extension for random number generation.'); } $this->useOpenSsl = false; } else { @@ -58,6 +58,10 @@ final class SecureRandom implements SecureRandomInterface */ public function nextBytes($nbBytes) { + if (function_exists('random_bytes')) { + return random_bytes($nbBytes); + } + // try OpenSSL if ($this->useOpenSsl) { $bytes = openssl_random_pseudo_bytes($nbBytes, $strong); diff --git a/src/Symfony/Component/Security/composer.json b/src/Symfony/Component/Security/composer.json index 708c60f456..cc3a319944 100644 --- a/src/Symfony/Component/Security/composer.json +++ b/src/Symfony/Component/Security/composer.json @@ -41,10 +41,14 @@ "symfony/expression-language": "~2.6|~3.0.0" }, "suggest": { + "symfony/class-loader": "For using the ACL generateSql script", + "symfony/finder": "For using the ACL generateSql script", + "symfony/form": "", "symfony/validator": "For using the user password constraint", "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs", "symfony/expression-language": "For using the expression voter", "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5" + "paragonie/random_compat": "" }, "autoload": { "psr-4": { "Symfony\\Component\\Security\\": "" } diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php index 08f219d0a4..d032f0e8ca 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AbstractStaticMethodLoader.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Component\Validator\Tests\Mapping\Loader; use Symfony\Component\Validator\Mapping\ClassMetadata; diff --git a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php index 26414b55a8..37e4110abe 100644 --- a/src/Symfony/Component/VarDumper/Dumper/CliDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/CliDumper.php @@ -448,7 +448,7 @@ class CliDumper extends AbstractDumper } if ('\\' === DIRECTORY_SEPARATOR) { - static::$defaultColors = @(false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI')); + static::$defaultColors = @(false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM')); } elseif (function_exists('posix_isatty')) { $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream;