Skip to content
Permalink
Browse files

Merge branch '4.3' into 4.4

* 4.3:
  [OptionsResolve] Revert change in tests for a not-merged change in code
  [HttpClient] fix handling of 3xx with no Location header - ignore Content-Length when no body is expected
  [Workflow] Made the configuration more robust for the 'property' key
  [Security/Core] make NativePasswordEncoder use sodium to validate passwords when possible
  #30432 fix an error message
  fix paths to detect code owners
  [HttpClient] ignore the body of responses to HEAD requests
  [Validator] Ensure numeric subpaths do not cause errors on PHP 7.4
  [SecurityBundle] Fix wrong assertion
  Remove unused local variables in tests
  [Yaml][Parser] Remove the getLastLineNumberBeforeDeprecation() internal unused method
  Make sure to collect child forms created on *_SET_DATA events
  [WebProfilerBundle] Improve display in Email panel for dark theme
  do not render errors for checkboxes twice
  • Loading branch information...
nicolas-grekas committed Oct 28, 2019
2 parents 0472dbf + 15f0855 commit 05f7f4e1472cae1d056d878a158b155de0b7ae42
Showing with 304 additions and 168 deletions.
  1. +13 −13 .github/CODEOWNERS
  2. +1 −1 src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
  3. +0 −1 src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php
  4. +0 −1 src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig
  5. +2 −2 src/Symfony/Bridge/Twig/Tests/AppVariableTest.php
  6. +1 −1 src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php
  7. +1 −1 src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php
  8. +3 −3 src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php
  9. +0 −1 src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
  10. +9 −1 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
  11. +1 −1 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
  12. +1 −2 src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php
  13. +1 −1 ...y/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php
  14. +1 −1 src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SessionTest.php
  15. +2 −2 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/AbstractFactoryTest.php
  16. +2 −2 ...ndle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php
  17. +2 −2 src/Symfony/Bundle/SecurityBundle/Tests/Functional/MissingUserProviderTest.php
  18. +6 −2 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
  19. +1 −1 src/Symfony/Component/BrowserKit/Tests/CookieTest.php
  20. +1 −1 src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php
  21. +1 −1 src/Symfony/Component/Config/Tests/Loader/DelegatingLoaderTest.php
  22. +1 −1 src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php
  23. +2 −2 src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php
  24. +2 −2 src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php
  25. +1 −1 src/Symfony/Component/Console/Tests/ApplicationTest.php
  26. +1 −1 src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php
  27. +2 −2 src/Symfony/Component/Debug/DebugClassLoader.php
  28. +1 −1 src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php
  29. +1 −1 src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
  30. +5 −5 src/Symfony/Component/DependencyInjection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php
  31. +1 −1 src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php
  32. +1 −1 src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
  33. +2 −2 src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveClassPassTest.php
  34. +3 −3 src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
  35. +1 −2 src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
  36. +0 −1 src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
  37. +2 −2 src/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php
  38. +2 −2 src/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php
  39. +3 −3 src/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php
  40. +1 −1 src/Symfony/Component/DomCrawler/Tests/Field/TextareaFormFieldTest.php
  41. +17 −7 src/Symfony/Component/DomCrawler/Tests/FormTest.php
  42. +9 −1 src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php
  43. +2 −1 src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php
  44. +2 −2 .../Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
  45. +63 −3 src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php
  46. +2 −0 src/Symfony/Component/HttpClient/CurlHttpClient.php
  47. +4 −3 src/Symfony/Component/HttpClient/Response/CurlResponse.php
  48. +2 −2 src/Symfony/Component/HttpClient/Response/MockResponse.php
  49. +9 −1 src/Symfony/Component/HttpClient/Response/NativeResponse.php
  50. +1 −1 src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
  51. +1 −1 src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php
  52. +2 −2 src/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php
  53. +3 −3 src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php
  54. +1 −1 src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php
  55. +1 −1 src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
  56. +2 −2 src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
  57. +0 −2 src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php
  58. +0 −1 src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php
  59. +1 −1 ...ony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
  60. +4 −4 src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php
  61. +0 −3 src/Symfony/Component/Process/Tests/ExecutableFinderTest.php
  62. +1 −1 src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php
  63. +1 −1 src/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php
  64. +1 −1 src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php
  65. +4 −4 src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
  66. +18 −13 src/Symfony/Component/Security/Core/Encoder/NativePasswordEncoder.php
  67. +1 −1 src/Symfony/Component/Security/Core/Encoder/SodiumPasswordEncoder.php
  68. +1 −1 src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php
  69. +1 −1 src/Symfony/Component/Security/Guard/Tests/Provider/GuardAuthenticationProviderTest.php
  70. +3 −3 src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php
  71. +2 −2 src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php
  72. +1 −1 src/Symfony/Component/Security/Http/Tests/Firewall/RemoteUserAuthenticationListenerTest.php
  73. +1 −1 src/Symfony/Component/Security/Http/Tests/Firewall/X509AuthenticationListenerTest.php
  74. +0 −2 src/Symfony/Component/Security/Http/Tests/RememberMe/ResponseListenerTest.php
  75. +0 −1 src/Symfony/Component/Templating/Tests/Loader/FilesystemLoaderTest.php
  76. +1 −1 src/Symfony/Component/Validator/Constraints/FileValidator.php
  77. +1 −1 src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
  78. +1 −0 src/Symfony/Component/Validator/Tests/Util/PropertyPathTest.php
  79. +3 −2 src/Symfony/Component/Validator/Util/PropertyPath.php
  80. +1 −1 src/Symfony/Component/Workflow/Tests/DefinitionTest.php
  81. +7 −0 src/Symfony/Component/Workflow/Tests/TransitionTest.php
  82. +3 −3 src/Symfony/Component/Workflow/Tests/WorkflowTest.php
  83. +0 −8 src/Symfony/Component/Yaml/Parser.php
  84. +1 −1 src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php
  85. +1 −1 src/Symfony/Component/Yaml/Tests/ParserTest.php
  86. +5 −0 src/Symfony/Contracts/HttpClient/Test/Fixtures/web/index.php
  87. +38 −0 src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
@@ -6,7 +6,7 @@
/src/Symfony/Component/ErrorRenderer/* @yceruto
# Form
/src/Symfony/Bridge/Twig/Extension/FormExtension.php @xabbuh
/src/Symfony/Bridge/Twig/Form/* @xabbuh
/src/Symfony/Bridge/Twig/Form/ @xabbuh
/src/Symfony/Bridge/Twig/Node/FormThemeNode.php @xabbuh
/src/Symfony/Bridge/Twig/Node/RenderBlockNode.php @xabbuh
/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php @xabbuh
@@ -15,36 +15,36 @@
/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php @xabbuh
/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Resources/views/* @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Resources/views/ @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @xabbuh
/src/Symfony/Component/Form/* @xabbuh
/src/Symfony/Component/Form/ @xabbuh
# HttpKernel
/src/Symfony/Component/HttpKernel/Log/Logger.php @dunglas
# LDAP
/src/Symfony/Component/Ldap/* @csarrazi
/src/Symfony/Component/Ldap/ @csarrazi
# Lock
/src/Symfony/Component/Lock/* @jderusse
/src/Symfony/Component/Lock/ @jderusse
# Messenger
/src/Symfony/Bridge/Doctrine/Messenger/* @sroze
/src/Symfony/Component/Messenger/* @sroze
/src/Symfony/Bridge/Doctrine/Messenger/ @sroze
/src/Symfony/Component/Messenger/ @sroze
# PropertyInfo
/src/Symfony/Component/PropertyInfo/* @dunglas
/src/Symfony/Bridge/Doctrine/PropertyInfo/* @dunglas
/src/Symfony/Component/PropertyInfo/ @dunglas
/src/Symfony/Bridge/Doctrine/PropertyInfo/ @dunglas
# Serializer
/src/Symfony/Component/Serializer/* @dunglas
/src/Symfony/Component/Serializer/ @dunglas
# TwigBundle
/src/Symfony/Bundle/TwigBundle/ErrorRenderer/TwigHtmlErrorRenderer.php @yceruto
# WebLink
/src/Symfony/Component/WebLink/* @dunglas
/src/Symfony/Component/WebLink/ @dunglas
# Workflow
/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php @lyrixx
/src/Symfony/Bridge/Twig/Tests/Extension/WorkflowExtensionTest.php @lyrixx
/src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php @lyrixx
/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ValidateWorkflowsPass.php @lyrixx
/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/WorkflowGuardListenerPass.php @lyrixx
/src/Symfony/Component/Workflow/* @lyrixx
/src/Symfony/Component/Workflow/ @lyrixx
# Yaml
/src/Symfony/Component/Yaml/* @xabbuh
/src/Symfony/Component/Yaml/ @xabbuh
@@ -187,7 +187,7 @@ public function testSetDataToUninitializedEntityWithNonRequiredQueryBuilder()
public function testConfigureQueryBuilderWithNonQueryBuilderAndNonClosure()
{
$this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException');
$field = $this->factory->createNamed('name', static::TESTED_TYPE, null, [
$this->factory->createNamed('name', static::TESTED_TYPE, null, [
'em' => 'default',
'class' => self::SINGLE_IDENT_CLASS,
'query_builder' => new \stdClass(),
@@ -33,7 +33,6 @@ public function compile(Compiler $compiler)
preg_match('/_([^_]+)$/', $this->getAttribute('name'), $matches);
$label = null;
$arguments = iterator_to_array($this->getNode('arguments'));
$blockNameSuffix = $matches[1];
@@ -82,7 +82,6 @@ col-sm-10
<div class="{{ block('form_group_class') }}">
{{- form_widget(form) -}}
{{- form_help(form) -}}
{{- form_errors(form) -}}
</div>{#--#}
</div>
{%- endblock checkbox_row %}
@@ -180,10 +180,10 @@ public function testGetFlashes()
$flashMessages = $this->setFlashMessages();
$this->assertEquals($flashMessages, $this->appVariable->getFlashes([]));
$flashMessages = $this->setFlashMessages();
$this->setFlashMessages();
$this->assertEquals([], $this->appVariable->getFlashes('this-does-not-exist'));
$flashMessages = $this->setFlashMessages();
$this->setFlashMessages();
$this->assertEquals(
['this-does-not-exist' => []],
$this->appVariable->getFlashes(['this-does-not-exist'])
@@ -52,7 +52,7 @@ public function testLintFileNotReadable()
$filename = $this->createFile('');
unlink($filename);
$ret = $tester->execute(['filename' => [$filename]], ['decorated' => false]);
$tester->execute(['filename' => [$filename]], ['decorated' => false]);
}
public function testLintFileCompileTimeException()
@@ -34,7 +34,7 @@ public function testTiming($template, $events)
$twig->addExtension(new StopwatchExtension($this->getStopwatch($events)));
try {
$nodes = $twig->render('template');
$twig->render('template');
} catch (RuntimeError $e) {
throw $e->getPrevious();
}
@@ -60,14 +60,14 @@ public function testTransUnknownKeyword()
{
$this->expectException('Twig\Error\SyntaxError');
$this->expectExceptionMessage('Unexpected token. Twig was looking for the "with", "from", or "into" keyword in "index" at line 3.');
$output = $this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render();
$this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render();
}
public function testTransComplexBody()
{
$this->expectException('Twig\Error\SyntaxError');
$this->expectExceptionMessage('A message inside a trans tag must be a simple text in "index" at line 2.');
$output = $this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render();
$this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render();
}
/**
@@ -77,7 +77,7 @@ public function testTransChoiceComplexBody()
{
$this->expectException('Twig\Error\SyntaxError');
$this->expectExceptionMessage('A message inside a transchoice tag must be a simple text in "index" at line 2.');
$output = $this->getTemplate("{% transchoice count %}\n{{ 1 + 2 }}{% endtranschoice %}")->render();
$this->getTemplate("{% transchoice count %}\n{{ 1 + 2 }}{% endtranschoice %}")->render();
}
public function getTransTests()
@@ -510,7 +510,6 @@ private function renderEventListenerTable(EventDispatcherInterface $eventDispatc
$tableHeaders = ['Order', 'Callable', 'Priority'];
$tableRows = [];
$order = 1;
foreach ($eventListeners as $order => $listener) {
$tableRows[] = [sprintf('#%d', $order + 1), $this->formatCallable($listener), $eventDispatcher->getListenerPriority($event, $listener)];
}
@@ -322,7 +322,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
->end()
->end()
->scalarNode('property')
->defaultValue('marking')
->defaultNull() // In Symfony 5.0, set "marking" as default property
->end()
->scalarNode('service')
->cannotBeEmpty()
@@ -500,6 +500,14 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
return $v;
})
->end()
->validate()
->ifTrue(function ($v) {
return isset($v['marking_store']['property'])
&& (!isset($v['marking_store']['type']) || 'method' !== $v['marking_store']['type'])
;
})
->thenInvalid('"property" option is only supported by the "method" marking store.')
->end()
->end()
->end()
->end()
@@ -697,7 +697,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
if ('method' === $workflow['marking_store']['type']) {
$markingStoreDefinition->setArguments([
'state_machine' === $type, //single state
$workflow['marking_store']['property'],
$workflow['marking_store']['property'] ?? 'marking',
]);
} else {
foreach ($workflow['marking_store']['arguments'] as $argument) {
@@ -272,8 +272,7 @@ public function testFileWhichDoesNotExist()
$this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException');
$controller = $this->createController();
/* @var BinaryFileResponse $response */
$response = $controller->file('some-file.txt', 'test.php');
$controller->file('some-file.txt', 'test.php');
}
public function testIsGranted()
@@ -27,7 +27,7 @@ class TestExtension extends Extension implements PrependExtensionInterface
public function load(array $configs, ContainerBuilder $container)
{
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfiguration($configuration, $configs);
$this->processConfiguration($configuration, $configs);
$container->setAlias('test.annotation_reader', new Alias('annotation_reader', true));
}
@@ -59,7 +59,7 @@ public function testFlash($config, $insulate)
}
// set flash
$crawler = $client->request('GET', '/session_setflash/Hello%20world.');
$client->request('GET', '/session_setflash/Hello%20world.');
// check flash displays on redirect
$this->assertStringContainsString('Hello world.', $client->followRedirect()->text());
@@ -61,7 +61,7 @@ public function testDefaultFailureHandler($serviceId, $defaultHandlerInjection)
$options['failure_handler'] = $serviceId;
}
list($container, $authProviderId, $listenerId, $entryPointId) = $this->callFactory('foo', $options, 'user_provider', 'entry_point');
list($container) = $this->callFactory('foo', $options, 'user_provider', 'entry_point');
$definition = $container->getDefinition('abstract_listener.foo');
$arguments = $definition->getArguments();
@@ -99,7 +99,7 @@ public function testDefaultSuccessHandler($serviceId, $defaultHandlerInjection)
$options['success_handler'] = $serviceId;
}
list($container, $authProviderId, $listenerId, $entryPointId) = $this->callFactory('foo', $options, 'user_provider', 'entry_point');
list($container) = $this->callFactory('foo', $options, 'user_provider', 'entry_point');
$definition = $container->getDefinition('abstract_listener.foo');
$arguments = $definition->getArguments();
@@ -159,7 +159,7 @@ public function testCreateWithEntryPoint()
'authenticators' => ['authenticator123', 'authenticatorABC'],
'entry_point' => 'authenticatorABC',
];
list($container, $entryPointId) = $this->executeCreate($config, null);
list(, $entryPointId) = $this->executeCreate($config, null);
$this->assertEquals('authenticatorABC', $entryPointId);
}
@@ -172,7 +172,7 @@ private function executeCreate(array $config, $defaultEntryPointId)
$userProviderId = 'my_user_provider';
$factory = new GuardAuthenticationFactory();
list($providerId, $listenerId, $entryPointId) = $factory->create($container, $id, $config, $userProviderId, $defaultEntryPointId);
list(, , $entryPointId) = $factory->create($container, $id, $config, $userProviderId, $defaultEntryPointId);
return [$container, $entryPointId];
}
@@ -24,7 +24,7 @@ public function testUserProviderIsNeeded()
$response = $client->getResponse();
$this->assertSame(500, $response->getStatusCode());
$this->stringContains('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException', $response->getContent());
$this->stringContains('"default" firewall requires a user provider but none was defined.', $response->getContent());
$this->assertStringContainsString('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException', $response->getContent());
$this->assertStringContainsString('"default" firewall requires a user provider but none was defined', html_entity_decode($response->getContent()));
}
}
@@ -46,6 +46,8 @@
--base-4: #666;
--base-5: #444;
--base-6: #222;
--card-label-background: #eee;
--card-label-color: var(--base-6);
}

.theme-dark {
@@ -85,6 +87,8 @@
--base-4: #666;
--base-5: #e0e0e0;
--base-6: #f5f5f5;
--card-label-background: var(--tab-active-background);
--card-label-color: var(--tab-active-color);
}

{# Basic styles
@@ -436,8 +440,8 @@ table tbody td.num-col {
margin-top: 0;
}
.card .label {
background-color: #EEE;
color: var(--base-6);
background-color: var(--card-label-background);
color: var(--card-label-color);
}

{# Status
@@ -201,7 +201,7 @@ public function testConstructException()
{
$this->expectException('UnexpectedValueException');
$this->expectExceptionMessage('The cookie expiration time "string" is not valid.');
$cookie = new Cookie('foo', 'bar', 'string');
new Cookie('foo', 'bar', 'string');
}
public function testSameSite()
@@ -70,7 +70,7 @@ public function testTooLongNamespace()
{
$this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
$this->expectExceptionMessage('Namespace must be 26 chars max, 40 given ("----------------------------------------")');
$cache = $this->getMockBuilder(MaxIdLengthAdapter::class)
$this->getMockBuilder(MaxIdLengthAdapter::class)
->setConstructorArgs([str_repeat('-', 40)])
->getMock();
}
@@ -19,7 +19,7 @@ class DelegatingLoaderTest extends TestCase
{
public function testConstructor()
{
$loader = new DelegatingLoader($resolver = new LoaderResolver());
new DelegatingLoader($resolver = new LoaderResolver());
$this->assertTrue(true, '__construct() takes a loader resolver as its first argument');
}
@@ -67,7 +67,7 @@ public function testExistsKo()
$loadedClass = 123;
$res = new ClassExistenceResource('MissingFooClass', false);
new ClassExistenceResource('MissingFooClass', false);
$this->assertSame(123, $loadedClass);
} finally {
@@ -67,7 +67,7 @@ public function testResourceDoesNotExist()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The directory ".*" does not exist./');
$resource = new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999));
new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999));
}
public function testIsFresh()
@@ -165,7 +165,7 @@ public function testSerializeUnserialize()
{
$resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/');
$unserialized = unserialize(serialize($resource));
unserialize(serialize($resource));
$this->assertSame(realpath($this->directory), $resource->getResource());
$this->assertSame('/\.(foo|xml)$/', $resource->getPattern());
@@ -57,7 +57,7 @@ public function testResourceDoesNotExist()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The file ".*" does not exist./');
$resource = new FileResource('/____foo/foobar'.mt_rand(1, 999999));
new FileResource('/____foo/foobar'.mt_rand(1, 999999));
}
public function testIsFresh()
@@ -76,7 +76,7 @@ public function testIsFreshForDeletedResources()
public function testSerializeUnserialize()
{
$unserialized = unserialize(serialize($this->resource));
unserialize(serialize($this->resource));
$this->assertSame(realpath($this->file), $this->resource->getResource());
}
@@ -579,7 +579,7 @@ public function testFindAlternativeExceptionMessageMultiple()
// Subnamespace + plural
try {
$a = $application->find('foo3:');
$application->find('foo3:');
$this->fail('->find() should throw an Symfony\Component\Console\Exception\CommandNotFoundException if a command is ambiguous because of a subnamespace, with alternatives');
} catch (\Exception $e) {
$this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e);
@@ -104,7 +104,7 @@ public function testCannotSetInvalidIndicatorCharacters()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('Must have at least 2 indicator value characters.');
$bar = new ProgressIndicator($this->getOutputStream(), null, 100, ['1']);
new ProgressIndicator($this->getOutputStream(), null, 100, ['1']);
}
public function testCannotStartAlreadyStartedIndicator()
@@ -486,7 +486,7 @@ private function darwinRealpath(string $real): string
}
if (isset($dirFiles[$file])) {
return $real .= $dirFiles[$file];
return $real.$dirFiles[$file];
}
$kFile = strtolower($file);
@@ -505,7 +505,7 @@ private function darwinRealpath(string $real): string
self::$darwinCache[$kDir][1] = $dirFiles;
}
return $real .= $dirFiles[$kFile];
return $real.$dirFiles[$kFile];
}
/**

0 comments on commit 05f7f4e

Please sign in to comment.
You can’t perform that action at this time.