Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9485292

Browse files
Merge branch '5.2' into 5.3
* 5.2: bug #41715: [FrameworkBundle] Partial backport of PR#41530 Fix some typos in Greek language Remove TLS related options when not using TLS
2 parents 66f7b7a + 4a125a8 commit 9485292

File tree

4 files changed

+47
-16
lines changed

4 files changed

+47
-16
lines changed

src/Symfony/Bundle/FrameworkBundle/KernelBrowser.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public function __construct(KernelInterface $kernel, array $server = [], History
4949
*/
5050
public function getContainer()
5151
{
52-
return $this->kernel->getContainer();
52+
$container = $this->kernel->getContainer();
53+
54+
return $container->has('test.service_container') ? $container->get('test.service_container') : $container;
5355
}
5456

5557
/**
@@ -69,11 +71,11 @@ public function getKernel()
6971
*/
7072
public function getProfile()
7173
{
72-
if (null === $this->response || !$this->kernel->getContainer()->has('profiler')) {
74+
if (null === $this->response || !$this->getContainer()->has('profiler')) {
7375
return false;
7476
}
7577

76-
return $this->kernel->getContainer()->get('profiler')->loadProfileFromResponse($this->response);
78+
return $this->getContainer()->get('profiler')->loadProfileFromResponse($this->response);
7779
}
7880

7981
/**
@@ -83,7 +85,7 @@ public function getProfile()
8385
*/
8486
public function enableProfiler()
8587
{
86-
if ($this->kernel->getContainer()->has('profiler')) {
88+
if ($this->getContainer()->has('profiler')) {
8789
$this->profiler = true;
8890
}
8991
}
@@ -123,7 +125,7 @@ public function loginUser($user, string $firewallContext = 'main'): self
123125
$token = new TestBrowserToken($user->getRoles(), $user, $firewallContext);
124126
$token->setAuthenticated(true);
125127

126-
$container = $this->kernel->getContainer()->get('test.service_container');
128+
$container = $this->getContainer()->get('test.service_container');
127129
$container->get('security.untracked_token_storage')->setToken($token);
128130

129131
if (!$container->has('session') && !$container->has('session_factory')) {
@@ -161,7 +163,7 @@ protected function doRequest($request)
161163
$this->profiler = false;
162164

163165
$this->kernel->boot();
164-
$this->kernel->getContainer()->get('profiler')->enable();
166+
$this->getContainer()->get('profiler')->enable();
165167
}
166168

167169
return parent::doRequest($request);
@@ -220,7 +222,11 @@ protected function getScript($request)
220222

221223
$profilerCode = '';
222224
if ($this->profiler) {
223-
$profilerCode = '$kernel->getContainer()->get(\'profiler\')->enable();';
225+
$profilerCode = <<<'EOF'
226+
$container = $kernel->getContainer();
227+
$container = $container->has('test.service_container') ? $container->get('test.service_container') : $container;
228+
$container->get('profiler')->enable();
229+
EOF;
224230
}
225231

226232
$code = <<<EOF

src/Symfony/Component/Messenger/Bridge/Amqp/Tests/Transport/ConnectionTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,27 @@ public function testItCanPublishAndWaitForConfirmation()
764764
$connection->publish('body');
765765
}
766766

767+
public function testItCanBeConstructedWithTLSOptionsAndNonTLSDsn()
768+
{
769+
$this->assertEquals(
770+
new Connection([
771+
'host' => 'localhost',
772+
'port' => 5672,
773+
'vhost' => '/',
774+
], [
775+
'name' => self::DEFAULT_EXCHANGE_NAME,
776+
], [
777+
self::DEFAULT_EXCHANGE_NAME => [],
778+
]),
779+
Connection::fromDsn('amqp://', [
780+
'cacert' => 'foobar',
781+
'cert' => 'foobar',
782+
'key' => 'foobar',
783+
'verify' => false,
784+
])
785+
);
786+
}
787+
767788
private function createDelayOrRetryConnection(\AMQPExchange $delayExchange, string $deadLetterExchangeName, string $delayQueueName): Connection
768789
{
769790
$amqpConnection = $this->createMock(\AMQPConnection::class);

src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ public static function fromDsn(string $dsn, array $options = [], AmqpFactory $am
224224
return $queueOptions;
225225
}, $queuesOptions);
226226

227+
if (!$useAmqps) {
228+
unset($amqpOptions['cacert'], $amqpOptions['cert'], $amqpOptions['key'], $amqpOptions['verify']);
229+
}
230+
227231
if ($useAmqps && !self::hasCaCertConfigured($amqpOptions)) {
228232
throw new InvalidArgumentException('No CA certificate has been provided. Set "amqp.cacert" in your php.ini or pass the "cacert" parameter in the DSN to use SSL. Alternatively, you can use amqp:// to use without SSL.');
229233
}

src/Symfony/Component/Validator/Resources/translations/validators.el.xlf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
71-
<target>Ο τύπος mime του αρχείου δεν είναι έγκυρος ({{ type }}). Οι έγκρυοι τύποι mime είναι {{ types }}.</target>
71+
<target>Ο τύπος mime του αρχείου δεν είναι έγκυρος ({{ type }}). Οι έγκυροι τύποι mime είναι {{ types }}.</target>
7272
</trans-unit>
7373
<trans-unit id="18">
7474
<source>This value should be {{ limit }} or less.</source>
@@ -144,7 +144,7 @@
144144
</trans-unit>
145145
<trans-unit id="39">
146146
<source>This value is not a valid locale.</source>
147-
<target>Αυτή η τιμή δεν αντιστοιχεί σε έκγυρο κωδικό τοποθεσίας.</target>
147+
<target>Αυτή η τιμή δεν αντιστοιχεί σε έγκυρο κωδικό τοποθεσίας.</target>
148148
</trans-unit>
149149
<trans-unit id="40">
150150
<source>This value is not a valid country.</source>
@@ -224,7 +224,7 @@
224224
</trans-unit>
225225
<trans-unit id="59">
226226
<source>This is not a valid International Bank Account Number (IBAN).</source>
227-
<target>Αυτό δεν αντιστοιχεί σε έκγυρο διεθνή αριθμό τραπεζικού λογαριασμού (IBAN).</target>
227+
<target>Αυτό δεν αντιστοιχεί σε έγκυρο διεθνή αριθμό τραπεζικού λογαριασμού (IBAN).</target>
228228
</trans-unit>
229229
<trans-unit id="60">
230230
<source>This value is not a valid ISBN-10.</source>
@@ -312,7 +312,7 @@
312312
</trans-unit>
313313
<trans-unit id="81">
314314
<source>This is not a valid Business Identifier Code (BIC).</source>
315-
<target>Αυτός δεν έιναι ένας έγκυρος κωδικός BIC.</target>
315+
<target>Αυτός δεν είναι ένας έγκυρος κωδικός BIC.</target>
316316
</trans-unit>
317317
<trans-unit id="82">
318318
<source>Error</source>
@@ -356,35 +356,35 @@
356356
</trans-unit>
357357
<trans-unit id="92">
358358
<source>This value is not a valid timezone.</source>
359-
<target>Αυτή η τιμή θα δέν είναι έγκυρη ζώνη ώρας.</target>
359+
<target>Αυτή η τιμή θα δεν είναι έγκυρη ζώνη ώρας.</target>
360360
</trans-unit>
361361
<trans-unit id="93">
362362
<source>This password has been leaked in a data breach, it must not be used. Please use another password.</source>
363-
<target>Αυτός ο κωδικός πρόσβασης έχει διερρεύσει σε παραβίαση δεδομένων. Παρακαλούμε να χρησιμοποιήσετε έναν άλλο κωδικό.</target>
363+
<target>Αυτός ο κωδικός πρόσβασης έχει διαρρεύσει σε παραβίαση δεδομένων. Παρακαλούμε να χρησιμοποιήσετε έναν άλλο κωδικό.</target>
364364
</trans-unit>
365365
<trans-unit id="94">
366366
<source>This value should be between {{ min }} and {{ max }}.</source>
367367
<target>Αυτή η τιμή θα πρέπει να είναι μεταξύ {{ min }} και {{ max }}.</target>
368368
</trans-unit>
369369
<trans-unit id="95">
370370
<source>This value is not a valid hostname.</source>
371-
<target>Αυτή η τιμή δέν είναι έγκυρο όνομα υποδοχής.</target>
371+
<target>Αυτή η τιμή δεν είναι έγκυρο όνομα υποδοχής.</target>
372372
</trans-unit>
373373
<trans-unit id="96">
374374
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
375375
<target>Το νούμερο των στοιχείων σε αυτή τη συλλογή θα πρέπει να είναι πολλαπλάσιο του {{ compared_value }}.</target>
376376
</trans-unit>
377377
<trans-unit id="97">
378378
<source>This value should satisfy at least one of the following constraints:</source>
379-
<target>Αυτή η τιμή θα πρέπει να ικανοποιεί τουλάχιστον έναν απο τους παρακάτω περιορισμούς: </target>
379+
<target>Αυτή η τιμή θα πρέπει να ικανοποιεί τουλάχιστον έναν από τους παρακάτω περιορισμούς: </target>
380380
</trans-unit>
381381
<trans-unit id="98">
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>
383383
<target>Κάθε στοιχείο σε αυτή τη συλλογή θα πρέπει να ικανοποιεί το δικό του σύνολο περιορισμών.</target>
384384
</trans-unit>
385385
<trans-unit id="99">
386386
<source>This value is not a valid International Securities Identification Number (ISIN).</source>
387-
<target>Αυτή η τιμή δέν είναι έγυρο International Securities Identification Number (ISIN).</target>
387+
<target>Αυτή η τιμή δεν είναι έγκυρο International Securities Identification Number (ISIN).</target>
388388
</trans-unit>
389389
</body>
390390
</file>

0 commit comments

Comments
 (0)