Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8ed9964

Browse filesBrowse files
committed
Merge branch '5.2' into 5.x
* 5.2: Update .github/workflows/tests.yml Don't call class_exists() on null Added and improved Bulgarian translations PHP 8.1 must not cause the build to fail (yet) Add _run_tests bash function Add a GitHub Action for tests against PHP 8.1 [HttpClient] fix adding query string to relative URLs with scoped clients [Security] Added Ukrainian translations
2 parents 7e9c7e0 + ec761d6 commit 8ed9964
Copy full SHA for 8ed9964

File tree

7 files changed

+91
-14
lines changed
Filter options

7 files changed

+91
-14
lines changed

‎.github/workflows/tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/tests.yml
+55Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,58 @@ jobs:
191191
docker run --rm -e COMPOSER_ROOT_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v /usr/local/bin/vulcain:/usr/local/bin/vulcain -w /app php:7.4-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push
192192
sudo rm -rf .phpunit
193193
[ -d .phpunit.bak ] && mv .phpunit.bak .phpunit
194+
195+
nightly:
196+
name: PHPUnit on PHP nightly
197+
runs-on: Ubuntu-20.04
198+
199+
steps:
200+
- name: Checkout
201+
uses: actions/checkout@v2
202+
203+
- name: Setup PHP
204+
uses: shivammathur/setup-php@v2
205+
with:
206+
coverage: "none"
207+
ini-values: "memory_limit=-1"
208+
php-version: "8.1"
209+
210+
- name: Configure composer
211+
run: |
212+
COMPOSER_HOME="$(composer config home)"
213+
composer self-update
214+
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
215+
echo "COMPOSER_ROOT_VERSION=$(grep -m1 SYMFONY_VERSION .travis.yml | grep -o '[0-9.x]*').x-dev" >> $GITHUB_ENV
216+
217+
- name: Install dependencies
218+
run: |
219+
echo "::group::fake PHP version"
220+
composer config platform.php 8.0.99
221+
echo "::group::composer update"
222+
composer update --no-progress --ansi
223+
echo "::endgroup::"
224+
echo "::group::install phpunit"
225+
./phpunit install
226+
echo "::endgroup::"
227+
228+
- name: Run tests
229+
run: |
230+
_run_tests() {
231+
ok=0
232+
echo "::group::$1"
233+
234+
# Run the tests
235+
./phpunit --colors=always --exclude-group tty,benchmark,intl-data ./$1 2>&1 || ok=1
236+
echo ::endgroup::
237+
238+
if [ $ok -ne 0 ]; then
239+
echo "::error::$1 failed"
240+
fi
241+
242+
# Make the tests always pass because we don't want the build to fail (yet).
243+
return 0
244+
#return $ok
245+
}
246+
export -f _run_tests
247+
248+
find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -print0 | xargs -0 -n1 dirname | sort | parallel _run_tests

‎src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function generate(\ReflectionClass $originalClass, ClassGenerator $classG
4343
public function getProxifiedClass(Definition $definition): ?string
4444
{
4545
if (!$definition->hasTag('proxy')) {
46-
return class_exists($class = $definition->getClass()) || interface_exists($class, false) ? $class : null;
46+
return ($class = $definition->getClass()) && (class_exists($class) || interface_exists($class, false)) ? $class : null;
4747
}
4848
if (!$definition->isLazy()) {
4949
throw new \InvalidArgumentException(sprintf('Invalid definition for service of class "%s": setting the "proxy" tag on a service requires it to be "lazy".', $definition->getClass()));

‎src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,13 @@ protected function processValue($value, bool $isRoot = false)
8888
return parent::processValue($value, $isRoot);
8989
}
9090

91-
if (!$this->autoload && !class_exists($class = $value->getClass(), false) && !interface_exists($class, false)) {
92-
return parent::processValue($value, $isRoot);
91+
if (!$this->autoload) {
92+
if (!$class = $value->getClass()) {
93+
return parent::processValue($value, $isRoot);
94+
}
95+
if (!class_exists($class, false) && !interface_exists($class, false)) {
96+
return parent::processValue($value, $isRoot);
97+
}
9398
}
9499

95100
if (ServiceLocator::class === $value->getClass()) {

‎src/Symfony/Component/HttpClient/ScopingHttpClient.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/ScopingHttpClient.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ public function request(string $method, string $url, array $options = []): Respo
7373
throw $e;
7474
}
7575

76-
$options = self::mergeDefaultOptions($options, $this->defaultOptionsByRegexp[$this->defaultRegexp], true);
76+
$defaultOptions = $this->defaultOptionsByRegexp[$this->defaultRegexp];
77+
$options = self::mergeDefaultOptions($options, $defaultOptions, true);
7778
if (\is_string($options['base_uri'] ?? null)) {
7879
$options['base_uri'] = self::parseUrl($options['base_uri']);
7980
}
80-
$url = implode('', self::resolveUrl($url, $options['base_uri'] ?? null));
81+
$url = implode('', self::resolveUrl($url, $options['base_uri'] ?? null, $defaultOptions['query'] ?? []));
8182
}
8283

8384
foreach ($this->defaultOptionsByRegexp as $regexp => $defaultOptions) {

‎src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Tests/ScopingHttpClientTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public function testRelativeUrl()
3030
public function testRelativeUrlWithDefaultRegexp()
3131
{
3232
$mockClient = new MockHttpClient();
33-
$client = new ScopingHttpClient($mockClient, ['.*' => ['base_uri' => 'http://example.com']], '.*');
33+
$client = new ScopingHttpClient($mockClient, ['.*' => ['base_uri' => 'http://example.com', 'query' => ['a' => 'b']]], '.*');
3434

35-
$this->assertSame('http://example.com/foo', $client->request('GET', '/foo')->getInfo('url'));
35+
$this->assertSame('http://example.com/foo?f=g&a=b', $client->request('GET', '/foo?f=g')->getInfo('url'));
3636
}
3737

3838
/**

‎src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf
+15-7Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</trans-unit>
2121
<trans-unit id="5">
2222
<source>Cookie has already been used by someone else.</source>
23-
<target>Това cookie вече се ползва от някой друг.</target>
23+
<target>Тази бисквитка вече се ползва от някой друг.</target>
2424
</trans-unit>
2525
<trans-unit id="6">
2626
<source>Not privileged to request the resource.</source>
@@ -36,40 +36,48 @@
3636
</trans-unit>
3737
<trans-unit id="10">
3838
<source>No session available, it either timed out or cookies are not enabled.</source>
39-
<target>Сесията не е достъпна, или времето за достъп е изтекло, или кукитата не са разрешени.</target>
39+
<target>Сесията не е достъпна, или времето за достъп е изтекло, или бисквитките не са разрешени.</target>
4040
</trans-unit>
4141
<trans-unit id="11">
4242
<source>No token could be found.</source>
43-
<target>Токена не е открит.</target>
43+
<target>Токенът не е открит.</target>
4444
</trans-unit>
4545
<trans-unit id="12">
4646
<source>Username could not be found.</source>
4747
<target>Потребителското име не е открито.</target>
4848
</trans-unit>
4949
<trans-unit id="13">
5050
<source>Account has expired.</source>
51-
<target>Акаунта е изтекъл.</target>
51+
<target>Акаунтът е изтекъл.</target>
5252
</trans-unit>
5353
<trans-unit id="14">
5454
<source>Credentials have expired.</source>
5555
<target>Удостоверението за автентикация е изтекло.</target>
5656
</trans-unit>
5757
<trans-unit id="15">
5858
<source>Account is disabled.</source>
59-
<target>Акаунта е деактивиран.</target>
59+
<target>Акаунтът е деактивиран.</target>
6060
</trans-unit>
6161
<trans-unit id="16">
6262
<source>Account is locked.</source>
63-
<target>Акаунта е заключен.</target>
63+
<target>Акаунтът е заключен.</target>
6464
</trans-unit>
6565
<trans-unit id="17">
6666
<source>Too many failed login attempts, please try again later.</source>
67-
<target>Твърде много грешни опити за вход, моля опитайте по-късно.</target>
67+
<target>Твърде много неуспешни опити за вход, моля опитайте по-късно.</target>
6868
</trans-unit>
6969
<trans-unit id="18">
7070
<source>Invalid or expired login link.</source>
7171
<target>Невалиден или изтекъл линк за вход.</target>
7272
</trans-unit>
73+
<trans-unit id="19">
74+
<source>Too many failed login attempts, please try again in %minutes% minute.</source>
75+
<target>Прекалено много неуспешни опити за вход, моля опитайте отново след %minutes% минута.</target>
76+
</trans-unit>
77+
<trans-unit id="20">
78+
<source>Too many failed login attempts, please try again in %minutes% minutes.</source>
79+
<target>Прекалено много неуспешни опити за вход, моля опитайте отново след %minutes% минути.</target>
80+
</trans-unit>
7381
</body>
7482
</file>
7583
</xliff>

‎src/Symfony/Component/Security/Core/Resources/translations/security.uk.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Resources/translations/security.uk.xlf
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@
7070
<source>Invalid or expired login link.</source>
7171
<target>Посилання для входу недійсне, або термін його дії закінчився.</target>
7272
</trans-unit>
73+
<trans-unit id="19">
74+
<source>Too many failed login attempts, please try again in %minutes% minute.</source>
75+
<target>Забагато невдалих спроб входу. Будь ласка, спробуйте знову через %minutes% хвилину.</target>
76+
</trans-unit>
77+
<trans-unit id="20">
78+
<source>Too many failed login attempts, please try again in %minutes% minutes.</source>
79+
<target>Забагато невдалих спроб входу. Будь ласка, спробуйте знову через %minutes% хв.</target>
80+
</trans-unit>
7381
</body>
7482
</file>
7583
</xliff>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.