Merge branch '4.3' into 4.4
* 4.3: Add missed use class for Symfony\Bundle\FrameworkBundle\Test\WebTestCase::$client [HttpClient] Minor fix in an error message Fix parameter documentation for Inflector::pluralize() method Use a more appropriate group when deprecating mode bumped Symfony version to 4.3.1 updated VERSION for 4.3.0 updated CHANGELOG for 4.3.0 [FrameworkBundle] fix test fixture using deprecated controller and add missing deprecation [FrameworkBundle] Add a validation on the messenger section
This commit is contained in:
commit
47fd08eb5c
@ -7,6 +7,10 @@ in 4.3 minor versions.
|
||||
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
|
||||
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.3.0...v4.3.1
|
||||
|
||||
* 4.3.0 (2019-05-30)
|
||||
|
||||
* bug #31654 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping (vilius-g)
|
||||
|
||||
* 4.3.0-RC1 (2019-05-28)
|
||||
|
||||
* bug #31650 Create an abstract HTTP transport and extend it in all HTTP transports (bocharsky-bw)
|
||||
|
@ -228,9 +228,9 @@ class DeprecationErrorHandler
|
||||
return $this->configuration = Configuration::inWeakMode();
|
||||
}
|
||||
if (self::MODE_WEAK_VENDORS === $mode) {
|
||||
++$this->deprecations['remaining selfCount'];
|
||||
++$this->deprecations['remaining directCount'];
|
||||
$msg = sprintf('Setting SYMFONY_DEPRECATIONS_HELPER to "%s" is deprecated in favor of "max[self]=0"', $mode);
|
||||
$ref = &$this->deprecations['remaining self'][$msg]['count'];
|
||||
$ref = &$this->deprecations['remaining direct'][$msg]['count'];
|
||||
++$ref;
|
||||
$mode = 'max[self]=0';
|
||||
}
|
||||
|
@ -1110,6 +1110,10 @@ class Configuration implements ConfigurationInterface
|
||||
->{!class_exists(FullStack::class) && interface_exists(MessageBusInterface::class) ? 'canBeDisabled' : 'canBeEnabled'}()
|
||||
->fixXmlConfig('transport')
|
||||
->fixXmlConfig('bus', 'buses')
|
||||
->validate()
|
||||
->ifTrue(function ($v) { return isset($v['buses']) && \count($v['buses']) > 1 && null === $v['default_bus']; })
|
||||
->thenInvalid('You must specify the "default_bus" if you define more than one bus.')
|
||||
->end()
|
||||
->children()
|
||||
->arrayNode('routing')
|
||||
->useAttributeAsKey('message_class')
|
||||
|
@ -37,7 +37,9 @@ class ResolveControllerNameSubscriber implements EventSubscriberInterface
|
||||
$controller = $event->getRequest()->attributes->get('_controller');
|
||||
if (\is_string($controller) && false === strpos($controller, '::') && 2 === substr_count($controller, ':')) {
|
||||
// controller in the a:b:c notation then
|
||||
$event->getRequest()->attributes->set('_controller', $this->parser->parse($controller, false));
|
||||
$event->getRequest()->attributes->set('_controller', $parsedNotation = $this->parser->parse($controller, false));
|
||||
|
||||
@trigger_error(sprintf('Referencing controllers with %s is deprecated since Symfony 4.1, use "%s" instead.', $controller, $parsedNotation), E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ abstract class WebTestCase extends KernelTestCase
|
||||
{
|
||||
use WebTestAssertionsTrait;
|
||||
|
||||
/** @var Client|null */
|
||||
/** @var KernelBrowser|null */
|
||||
protected static $client;
|
||||
|
||||
protected function doTearDown(): void
|
||||
|
@ -188,6 +188,31 @@ class ConfigurationTest extends TestCase
|
||||
yield [$createPackageConfig($config), 'You cannot use both "version" and "json_manifest_path" at the same time under "assets" packages.'];
|
||||
}
|
||||
|
||||
public function testItShowANiceMessageIfTwoMessengerBusesAreConfiguredButNoDefaultBus()
|
||||
{
|
||||
$expectedMessage = 'You must specify the "default_bus" if you define more than one bus.';
|
||||
if (method_exists($this, 'expectException')) {
|
||||
$this->expectException(InvalidConfigurationException::class);
|
||||
$this->expectExceptionMessage($expectedMessage);
|
||||
} else {
|
||||
$this->setExpectedException(InvalidConfigurationException::class, $expectedMessage);
|
||||
}
|
||||
$processor = new Processor();
|
||||
$configuration = new Configuration(true);
|
||||
|
||||
$processor->processConfiguration($configuration, [
|
||||
'framework' => [
|
||||
'messenger' => [
|
||||
'default_bus' => null,
|
||||
'buses' => [
|
||||
'first_bus' => [],
|
||||
'second_bus' => [],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
protected static function getBundleDefaultConfig()
|
||||
{
|
||||
return [
|
||||
|
@ -20,6 +20,9 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
class ResolveControllerNameSubscriberTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @group legacy
|
||||
*/
|
||||
public function testReplacesControllerAttribute()
|
||||
{
|
||||
$parser = $this->getMockBuilder(ControllerNameParser::class)->disableOriginalConstructor()->getMock();
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{ render(controller('TestBundle:Fragment:inlined', {'options': {'bar': bar, 'eleven': 11}})) }}
|
||||
{{ render(controller('Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Bundle\\TestBundle\\Controller\\FragmentController::inlinedAction', {'options': {'bar': bar, 'eleven': 11}})) }}
|
||||
--
|
||||
{{ render(controller('TestBundle:Fragment:customformat', {'_format': 'html'})) }}
|
||||
{{ render(controller('Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Bundle\\TestBundle\\Controller\\FragmentController::customformatAction', {'_format': 'html'})) }}
|
||||
--
|
||||
{{ render(controller('TestBundle:Fragment:customlocale', {'_locale': 'es'})) }}
|
||||
{{ render(controller('Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Bundle\\TestBundle\\Controller\\FragmentController::customlocaleAction', {'_locale': 'es'})) }}
|
||||
--
|
||||
{{ app.request.setLocale('fr') }}{{ render(controller('TestBundle:Fragment:forwardlocale')) -}}
|
||||
{{ app.request.setLocale('fr') }}{{ render(controller('Symfony\\Bundle\\FrameworkBundle\\Tests\\Functional\\Bundle\\TestBundle\\Controller\\FragmentController::forwardlocaleAction')) -}}
|
||||
|
@ -260,7 +260,7 @@ final class CurlResponse implements ResponseInterface
|
||||
|
||||
while ($info = curl_multi_info_read($multi->handle)) {
|
||||
$multi->handlesActivity[(int) $info['handle']][] = null;
|
||||
$multi->handlesActivity[(int) $info['handle']][] = \in_array($info['result'], [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || (\CURLE_WRITE_ERROR === $info['result'] && 'destruct' === @curl_getinfo($info['handle'], CURLINFO_PRIVATE)) ? null : new TransportException(sprintf('%s for"%s".', curl_strerror($info['result']), curl_getinfo($info['handle'], CURLINFO_EFFECTIVE_URL)));
|
||||
$multi->handlesActivity[(int) $info['handle']][] = \in_array($info['result'], [\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS], true) || (\CURLE_WRITE_ERROR === $info['result'] && 'destruct' === @curl_getinfo($info['handle'], CURLINFO_PRIVATE)) ? null : new TransportException(sprintf('%s for "%s".', curl_strerror($info['result']), curl_getinfo($info['handle'], CURLINFO_EFFECTIVE_URL)));
|
||||
}
|
||||
} finally {
|
||||
self::$performing = false;
|
||||
|
@ -410,7 +410,7 @@ final class Inflector
|
||||
* If the method can't determine the form with certainty, an array of the
|
||||
* possible plurals is returned.
|
||||
*
|
||||
* @param string $singular A word in plural form
|
||||
* @param string $singular A word in singular form
|
||||
*
|
||||
* @return string|array The plural form or an array of possible plural forms
|
||||
*/
|
||||
|
Reference in New Issue
Block a user