Skip to content

Commit 15addfa

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Workflow] Add ZEturf as backer [PropertyInfo] Fix extracting int range type [WebProfilerBundle] Fix AJAX requests info are truncated in the WDT
2 parents 9ef53cb + 7a9e4e9 commit 15addfa

File tree

5 files changed

+69
-1
lines changed

5 files changed

+69
-1
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ div.sf-toolbar .sf-toolbar-block a:hover {
333333
.sf-toolbar-block.hover .sf-toolbar-info {
334334
display: block;
335335
padding: 10px;
336-
max-width: 480px;
336+
max-width: 525px;
337337
max-height: 480px;
338338
word-wrap: break-word;
339339
overflow: hidden;

src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,23 @@ public function testDummyNamespaceWithProperty()
401401
$this->assertEquals('A\Property', $phpStanTypes[0]->getClassName());
402402
$this->assertEquals($phpDocTypes[0]->getClassName(), $phpStanTypes[0]->getClassName());
403403
}
404+
405+
/**
406+
* @dataProvider intRangeTypeProvider
407+
*/
408+
public function testExtractorIntRangeType(string $property, ?array $types)
409+
{
410+
$this->assertEquals($types, $this->extractor->getTypes('Symfony\Component\PropertyInfo\Tests\Fixtures\IntRangeDummy', $property));
411+
}
412+
413+
public function intRangeTypeProvider(): array
414+
{
415+
return [
416+
['a', [new Type(Type::BUILTIN_TYPE_INT)]],
417+
['b', [new Type(Type::BUILTIN_TYPE_INT, true)]],
418+
['c', [new Type(Type::BUILTIN_TYPE_INT)]],
419+
];
420+
}
404421
}
405422

406423
class PhpStanOmittedParamTagTypeDocBlock
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
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\Component\PropertyInfo\Tests\Fixtures;
13+
14+
class IntRangeDummy
15+
{
16+
/**
17+
* @var int<0, 100>
18+
*/
19+
public $a;
20+
21+
/**
22+
* @var int<min, 100>|null
23+
*/
24+
public $b;
25+
26+
/**
27+
* @var int<50, max>
28+
*/
29+
public $c;
30+
}

src/Symfony/Component/PropertyInfo/Util/PhpStanTypeHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ private function extractTypes(TypeNode $node, NameScope $nameScope): array
117117
if ($node instanceof GenericTypeNode) {
118118
[$mainType] = $this->extractTypes($node->type, $nameScope);
119119

120+
if (Type::BUILTIN_TYPE_INT === $mainType->getBuiltinType()) {
121+
return [$mainType];
122+
}
123+
120124
$collectionKeyTypes = $mainType->getCollectionKeyTypes();
121125
$collectionKeyValues = [];
122126
if (1 === \count($node->genericTypes)) {

src/Symfony/Component/Workflow/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ Workflow Component
44
The Workflow component provides tools for managing a workflow or finite state
55
machine.
66

7+
Sponsor
8+
-------
9+
10+
The Workflow component for Symfony 5.4/6.0 is [backed][1] by [ZEturf][2].
11+
12+
The ZEturf group is an online gaming operator licensed in 6 markets in Europe and
13+
Africa. It operates two brands, ZEturf on horse racing betting, and ZEbet on
14+
sports betting. In parallel with the development of its betting activities, the
15+
group is also investing in Entertainment / gaming with Free-to-Play and
16+
Play-to-Earn projects.
17+
18+
Help Symfony by [sponsoring][3] its development!
19+
720
Resources
821
---------
922

@@ -12,3 +25,7 @@ Resources
1225
* [Report issues](https://github.com/symfony/symfony/issues) and
1326
[send Pull Requests](https://github.com/symfony/symfony/pulls)
1427
in the [main Symfony repository](https://github.com/symfony/symfony)
28+
29+
[1]: https://symfony.com/backers
30+
[2]: https://zeturf.com
31+
[3]: https://symfony.com/sponsor

0 commit comments

Comments
 (0)