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

Skip to content

Commit d6ddbfe

Browse files
Merge branch '6.2' into 6.3
* 6.2: [GHA] use stubs instead of extensions for psalm job Wrap use of \Locale in a class_exists test
2 parents ae390e7 + 1acb1e9 commit d6ddbfe

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
echo COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION >> $GITHUB_ENV
160160
161161
echo "::group::composer update"
162-
composer require --dev --no-update mongodb/mongodb:"^1.11"
162+
composer require --dev --no-update mongodb/mongodb
163163
composer update --no-progress --ansi
164164
echo "::endgroup::"
165165

.github/workflows/psalm.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,11 @@ jobs:
2121

2222
env:
2323
php-version: '8.1'
24-
extensions: json,couchbase,memcached,mongodb,redis,xsl,ldap,dom,relay
2524
steps:
26-
- name: Setup cache environment
27-
id: extcache
28-
uses: shivammathur/cache-extensions@v1
29-
with:
30-
php-version: ${{ env.php-version }}
31-
extensions: ${{ env.extensions }}
32-
key: cache-v1 # can be any string, change to clear the extension cache.
33-
34-
- name: Cache extensions
35-
uses: actions/cache@v3
36-
with:
37-
path: ${{ steps.extcache.outputs.dir }}
38-
key: ${{ steps.extcache.outputs.key }}
39-
restore-keys: ${{ steps.extcache.outputs.key }}
40-
4125
- name: Setup PHP
4226
uses: shivammathur/setup-php@v2
4327
with:
4428
php-version: ${{ env.php-version }}
45-
extensions: ${{ env.extensions }}
4629
ini-values: "memory_limit=-1"
4730
coverage: none
4831

@@ -60,7 +43,7 @@ jobs:
6043
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
6144
export COMPOSER_ROOT_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+').x-dev
6245
composer remove --dev --no-update --no-interaction symfony/phpunit-bridge
63-
composer require --no-progress --ansi --no-plugins psalm/phar phpunit/phpunit:^9.5 php-http/discovery psr/event-dispatcher mongodb/mongodb
46+
composer require --no-progress --ansi --no-plugins psalm/phar phpunit/phpunit:^9.5 php-http/discovery psr/event-dispatcher mongodb/mongodb jetbrains/phpstorm-stubs
6447
6548
- name: Generate Psalm baseline
6649
run: |

src/Symfony/Component/Translation/LocaleSwitcher.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public function __construct(
3434

3535
public function setLocale(string $locale): void
3636
{
37-
\Locale::setDefault($this->locale = $locale);
37+
if (class_exists(\Locale::class)) {
38+
\Locale::setDefault($locale);
39+
}
40+
$this->locale = $locale;
3841
$this->requestContext?->setParameter('_locale', $locale);
3942

4043
foreach ($this->localeAwareServices as $service) {

0 commit comments

Comments
 (0)