8000 Merge branch 'symfony:7.2' into feat/extract_password_strength_estima… · symfony/symfony@18cfd0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 18cfd0a

Browse files
authored
Merge branch 'symfony:7.2' into feat/extract_password_strength_estimator_noBC
2 parents 5e96a1b + b8b3c39 commit 18cfd0a

File tree

163 files changed

+1367
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1367
-352
lines changed

.github/workflows/integration-tests.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ jobs:
9999
ports:
100100
- 4566:4566
101101
zookeeper:
102-
image: wurstmeister/zookeeper:3.4.6
102+
image: zookeeper
103103
kafka:
104-
image: wurstmeister/kafka:2.12-2.0.1
104+
image: bitnami/kafka:3.7
105105
ports:
106106
- 9092:9092
107107
env:
@@ -192,6 +192,18 @@ jobs:
192192
./phpunit install
193193
echo "::endgroup::"
194194
195+
- name: Check for changes in translation files
196+
id: changed-translation-files
197+
run: |
198+
echo 'changed='$((git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf' || (echo 'true' && exit 1)) && echo 'false') >> $GITHUB_OUTPUT
199+
200+
- name: Check Translation Status
201+
if: steps.changed-translation-files.outputs.changed == 'true'
202+
run: |
203+
php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v
204+
php .github/sync-translations.php
205+
git diff --exit-code src/ || (echo '::error::Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1)
206+
195207
- name: Run tests
196208
run: ./phpunit --group integration -v
197209
env:
@@ -216,15 +228,3 @@ jobs:
216228
# docker run --rm -e COMPOSER_ROOT_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v $(which vulcain):/usr/local/bin/vulcain -w /app php:8.1-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push
217229
# sudo rm -rf .phpunit
218230
# [ -d .phpunit.bak ] && mv .phpunit.bak .phpunit
219-
220-
- name: Check for changes in translation files
221-
id: changed-translation-files
222-
run: |
223-
echo 'changed='$((git diff --quiet HEAD~1 HEAD -- 'src/**/Resources/translations/*.xlf' || (echo 'true' && exit 1)) && echo 'false') >> $GITHUB_OUTPUT
224-
225-
- name: Check Translation Status
226-
if: steps.changed-translation-files.outputs.changed == 'true'
227-
run: |
228-
php src/Symfony/Component/Translation/Resources/bin/translation-status.php -v
229-
php .github/sync-translations.php
230-
git diff --exit-code src/ || (echo '::error::Run "php .github/sync-translations.php" to fix XLIFF files.' && exit 1)

CHANGELOG-7.1.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@ in 7.1 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v7.1.0...v7.1.1
99

10+
* 7.1.0-RC1 (2024-05-17)
11+
12+
* bug #54970 [DependencyInjection] Process PHP configs using the ContainerConfigurator (MatTheCat)
13+
* bug #49186 [Serializer] Improve exception message in UnwrappingDenormalizer (andersonamuller)
14+
* bug #54694 [PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type (llupa)
15+
* bug #54851 [Serializer] Fixed "Warning: Attempt to read property "value" on string" (michaljusiega, xabbuh)
16+
* bug #54913 [Serializer] Fix CurrentType for missing property (ElisDN)
17+
* feature #54941 Les-Tilleuls.coop is sponsoring Symfony 7.1, thanks to them! \o/ (nicolas-grekas)
18+
* bug #54797 [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10 (HypeMC)
19+
* bug #54878 [Filesystem] Fix dumpFile `stat failed` error hitting custom handler (acoulton)
20+
* bug #54924 [Validator] IBAN Check digits should always between 2 and 98 (karstennilsen)
21+
* bug #54919 [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode (fmata)
22+
* bug #54910 [HttpFoundation]  filter out empty HTTP header parts (xabbuh)
23+
* bug #54888 [String] Fix folded in compat mode (smnandre)
24+
* bug #54925 [VarDumper]  adapt namespace changes for new DOM extension classes (xabbuh)
25+
* bug #54835 [DoctrineBridge]  fix setting validated fields not using the options array (xabbuh)
26+
* bug #54863 [Process] Return `false` when `open_basedir` prevents access to `/dev/tty` (mjauvin)
27+
* bug #54908 [DependencyInjection] Fix "Cannot replace arguments" errors caused by ResolveAutowireInlineAttributesPass (nicolas-grekas)
28+
* bug #54860 [HttpClient] Revert fixing curl default options (alexandre-daubois)
29+
* feature #54859 [Messenger] Don't mark `EnvelopeAwareExceptionInterface` internal (valtzu)
30+
* bug #54850 [VarExporter] fix `ProxyHelper::generateLazyProxy()` when a method returns null (nikophil)
31+
* bug #54842 [Messenger] Don't drop stamps when message validation fails (valtzu)
32+
* bug #54838 [WebProfilerBundle] Fix assignment to constant variable (HypeMC)
33+
* bug #54837 [Mailer] [Sendgrid] Use `DataPart::getContentId()` when `DataPart::setContentId()` is used (SherinBloemendaal)
34+
* bug #54839 Fix exception thrown during `LDAP_MODIFY_BATCH_REMOVE_ALL` batch operations (phasdev)
35+
* bug #54834 [Validator] Check `Locale` class existence before using it (alexandre-daubois)
36+
* bug #54830 [HttpClient] Fix cURL default options for PHP 8.4 (alexandre-daubois)
37+
* bug #54828 [Serializer] Fix `GetSetMethodNormalizer` not working with setters with optional args (HypeMC)
38+
* bug #54816 [Cache] Fix support for predis/predis:^2.0 (mfettig)
39+
1040
* 7.1.0-BETA1 (2024-05-02)
1141

1242
* feature #54818 [Translation] Crowdin is backing its translation bridge, thanks to them! \o/ (nicolas-grekas)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Sponsor
2020
Symfony 7.1 is [backed][27] by
2121
- [Rector][29]
2222
- [JoliCode][30]
23+
- [Les-Tilleuls.coop][31]
2324

2425
**Rector** helps successful and growing companies to get the most of the code
2526
they already have. Including upgrading to the latest Symfony LTS. They deliver
@@ -31,6 +32,11 @@ so you can focus on the features.
3132
strong expertise in PHP & Symfony technologies. They can help you build your
3233
projects using state-of-the-art practices.
3334

35+
**Les-Tilleuls.coop** is a team of 70+ Symfony experts who can help you design, develop and
36+
fix your projects. They provide a wide range of professional services including development,
37+
consulting, coaching, training and audits. They also are highly skilled in JS, Go and DevOps.
38+
They are a worker cooperative!
39+
3440
Help Symfony by [sponsoring][28] its development!
3541

3642
Documentation
@@ -97,3 +103,4 @@ and supported by [Symfony contributors][19].
97103
[28]: https://symfony.com/sponsor
98104
[29]: https://getrector.com
99105
[30]: https://jolicode.com
106+
[31]: https://les-tilleuls.coop

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ext-xml": "*",
4040
"doctrine/event-manager": "^2",
4141
"doctrine/persistence": "^3.1",
42-
"twig/twig": "^3.0.4",
42+
"twig/twig": "^3.10",
4343
"psr/cache": "^2.0|^3.0",
4444
"psr/clock": "^1.0",
4545
"psr/container": "^1.1|^2.0",

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bridge\Doctrine\PropertyInfo;
1313

1414
use Doctrine\Common\Collections\Collection;
15+
use Doctrine\DBAL\Types\BigIntType;
1516
use Doctrine\DBAL\Types\Types;
1617
use Doctrine\ORM\EntityManagerInterface;
1718
use Doctrine\ORM\Mapping\AssociationMapping;
@@ -129,6 +130,12 @@ public function getType(string $class, string $property, array $context = []): ?
129130
}
130131

131132
$nullable = $metadata instanceof ClassMetadata && $metadata->isNullable($property);
133+
134+
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
135+
if (Types::BIGINT === $typeOfField && !method_exists(BigIntType::class, 'getName')) {
136+
return Type::collection(Type::int(), Type::string());
137+
}
138+
132139
$enumType = null;
133140

134141
if (null !== $enumClass = self::getMappingValue($metadata->getFieldMapping($property), 'enumType') ?? null) {
@@ -236,6 +243,15 @@ public function getTypes(string $class, string $property, array $context = []):
236243
}
237244

238245
$nullable = $metadata instanceof ClassMetadata && $metadata->isNullable($property);
246+
247+
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
248+
if (Types::BIGINT === $typeOfField && !method_exists(BigIntType::class, 'getName')) {
249+
return [
250+
new LegacyType(LegacyType::BUILTIN_TYPE_INT, $nullable),
251+
new LegacyType(LegacyType::BUILTIN_TYPE_STRING, $nullable),
252+
];
253+
}
254+
239255
$enumType = null;
240256
if (null !== $enumClass = self::getMappingValue($metadata->getFieldMapping($property), 'enumType') ?? null) {
241257
$enumType = new LegacyType(LegacyType::BUILTIN_TYPE_OBJECT, $nullable, $enumClass);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bridge\Doctrine\Tests\Fixtures;
13+
14+
use Doctrine\ORM\EntityRepository;
15+
16+
class MockableRepository extends EntityRepository
17+
{
18+
public function findByCustom()
19+
{
20+
}
21+
}

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Doctrine\Common\EventManager;
1616
use Doctrine\DBAL\DriverManager;
1717
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
18+
use Doctrine\DBAL\Types\BigIntType;
1819
use Doctrine\DBAL\Types\Type as DBALType;
1920
use Doctrine\ORM\EntityManager;
2021
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
@@ -153,10 +154,17 @@ public function testExtractEnumLegacy()
153154
*/
154155
public static function legacyTypesProvider(): array
155156
{
157+
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
158+
if (!method_exists(BigIntType::class, 'getName')) {
159+
$expectedBingIntType = [new LegacyType(LegacyType::BUILTIN_TYPE_INT), new LegacyType(LegacyType::BUILTIN_TYPE_STRING)];
160+
} else {
161+
$expectedBingIntType = [new LegacyType(LegacyType::BUILTIN_TYPE_STRING)];
162+
}
163+
156164
return [
157165
['id', [new LegacyType(LegacyType::BUILTIN_TYPE_INT)]],
158166
['guid', [new LegacyType(LegacyType::BUILTIN_TYPE_STRING)]],
159-
['bigint', [new LegacyType(LegacyType::BUILTIN_TYPE_STRING)]],
167+
['bigint', $expectedBingIntType],
160168
['time', [new LegacyType(LegacyType::BUILTIN_TYPE_OBJECT, false, 'DateTime')]],
161169
['timeImmutable', [new LegacyType(LegacyType::BUILTIN_TYPE_OBJECT, false, 'DateTimeImmutable')]],
162170
['dateInterval', [new LegacyType(LegacyType::BUILTIN_TYPE_OBJECT, false, 'DateInterval')]],
@@ -290,9 +298,16 @@ public function testExtract(string $property, ?Type $type)
290298
*/
291299
public static function typeProvider(): iterable
292300
{
301+
// DBAL 4 has a special fallback strategy for BINGINT (int -> string)
302+
if (!method_exists(BigIntType::class, 'getName')) {
303+
$expectedBigIntType = Type::collection(Type::int(), Type::string());
304+
} else {
305+
$expectedBigIntType = Type::string();
306+
}
307+
293308
yield ['id', Type::int()];
294309
yield ['guid', Type::string()];
295-
yield ['bigint', Type::string()];
310+
yield ['bigint', $expectedBigIntType];
296311
yield ['time', Type::object(\DateTime::class)];
297312
yield ['timeImmutable', Type::object(\DateTimeImmutable::class)];
298313
yield ['dateInterval', Type::object(\DateInterval::class)];

src/Symfony/Bridge/Doctrine/Tests/Security/User/EntityUserProviderTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,11 @@ private function getManager($em, $name = null)
236236

237237
private function getObjectManager($repository)
238238
{
239-
$em = $this->getMockBuilder(ObjectManager::class)
240-
->onlyMethods(['getClassMetadata', 'getRepository'])
241-
->getMockForAbstractClass();
242-
$em->expects($this->any())
243-
->method('getRepository')
239+
$objectManager = $this->createMock(ObjectManager::class);
240+
$objectManager->method('getRepository')
244241
->willReturn($repository);
245242

246-
return $em;
243+
return $objectManager;
247244
}
248245

249246
private function createSchema($em)

0 commit comments

Comments
 (0)
0