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 bd4ace6

Browse filesBrowse files
[gha] swap the php versions we use in jobs
1 parent 382cde2 commit bd4ace6
Copy full SHA for bd4ace6

File tree

Expand file treeCollapse file tree

8 files changed

+43
-101
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+43
-101
lines changed

‎.github/workflows/unit-tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/unit-tests.yml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
matrix:
2222
include:
2323
- php: '7.2'
24-
- php: '8.1'
2524
- php: '7.4'
26-
mode: high-deps
2725
- php: '8.0'
26+
mode: high-deps
27+
- php: '8.1'
2828
mode: low-deps
2929
- php: '8.2'
3030
mode: experimental
@@ -172,14 +172,14 @@ jobs:
172172
exit 0
173173
fi
174174
175-
(cd src/Symfony/Component/HttpFoundation; cp composer.json composer.bak; composer require --dev --no-update mongodb/mongodb)
176-
177175
if [[ "${{ matrix.mode }}" = low-deps ]]; then
178176
echo "$COMPONENTS" | xargs -n1 | parallel -j +3 "_run_tests {} 'cd {} && $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT'"
179177
180178
exit 0
181179
fi
182180
181+
(cd src/Symfony/Component/HttpFoundation; cp composer.json composer.bak; composer require --dev --no-update mongodb/mongodb)
182+
183183
# matrix.mode = high-deps
184184
echo "$COMPONENTS" | xargs -n1 | parallel -j +3 "_run_tests {} 'cd {} && $COMPOSER_UP && $PHPUNIT$LEGACY'" || X=1
185185

‎src/Symfony/Bridge/Doctrine/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/composer.json
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@
4949
"conflict": {
5050
"doctrine/dbal": "<2.7",
5151
"doctrine/orm": "<2.6.3",
52+
"doctrine/lexer": "<1.1",
5253
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
5354
"symfony/dependency-injection": "<3.4",
5455
"symfony/form": "<4.4",
5556
"symfony/http-kernel": "<4.3.7",
5657
"symfony/messenger": "<4.3",
58+
"symfony/proxy-manager-bridge": "<4.4.19",
5759
"symfony/security-core": "<4.4",
5860
"symfony/validator": "<4.4.2|<5.0.2,>=5.0"
5961
},

‎src/Symfony/Component/ErrorHandler/ErrorHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/ErrorHandler.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,9 @@ public function handleException(\Throwable $exception)
609609
}
610610

611611
$loggedErrors = $this->loggedErrors;
612-
$this->loggedErrors = $exception === $handlerException ? 0 : $this->loggedErrors;
612+
if ($exception === $handlerException) {
613+
$this->loggedErrors &= ~$type;
614+
}
613615

614616
try {
615617
$this->handleException($handlerException);

‎src/Symfony/Component/ErrorHandler/Tests/phpt/exception_rethrown.phpt

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/Tests/phpt/exception_rethrown.phpt
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ if (true) {
1616
{
1717
public function log($level, $message, array $context = []): void
1818
{
19-
echo 'LOG: ', $message, "\n";
19+
if (0 !== strpos($message, 'Deprecated: ')) {
20+
echo 'LOG: ', $message, "\n";
21+
}
2022
}
2123
}
2224
}
@@ -34,5 +36,5 @@ Exception {%S
3436
#message: "foo"
3537
#code: 0
3638
#file: "%s"
37-
#line: 25
39+
#line: 27
3840
}

‎src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
use Symfony\Component\Validator\Constraint;
1616
use Symfony\Component\Validator\ConstraintValidator;
1717

18-
final class ConstraintValidatorTest extends TestCase
18+
class ConstraintValidatorTest extends TestCase
1919
{
2020
/**
2121
* @dataProvider formatValueProvider
2222
*/
2323
public function testFormatValue($expected, $value, $format = 0)
2424
{
25+
\Locale::setDefault('en');
26+
2527
$this->assertSame($expected, (new TestFormatValueConstraintValidator())->formatValueProxy($value, $format));
2628
}
2729

‎src/Symfony/Component/Validator/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"egulias/email-validator": "^2.1.10|^3"
4242
},
4343
"conflict": {
44-
"doctrine/lexer": "<1.0.2",
44+
"doctrine/lexer": "<1.1",
4545
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
4646
"symfony/dependency-injection": "<3.4",
4747
"symfony/http-kernel": "<4.4",

‎src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php
+11-9Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static function castReflectionGenerator(\ReflectionGenerator $c, array $a
134134
array_unshift($trace, [
135135
'function' => 'yield',
136136
'file' => $function->getExecutingFile(),
137-
'line' => $function->getExecutingLine() - 1,
137+
'line' => $function->getExecutingLine() - (int) (\PHP_VERSION_ID < 80100),
138138
]);
139139
$trace[] = $frame;
140140
$a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1);
@@ -263,15 +263,17 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
263263
unset($a[$prefix.'allowsNull']);
264264
}
265265

266-
try {
267-
$a[$prefix.'default'] = $v = $c->getDefaultValue();
268-
if ($c->isDefaultValueConstant()) {
269-
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
270-
}
271-
if (null === $v) {
272-
unset($a[$prefix.'allowsNull']);
266+
if ($c->isOptional()) {
267+
try {
268+
$a[$prefix.'default'] = $v = $c->getDefaultValue();
269+
if ($c->isDefaultValueConstant()) {
270+
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
271+
}
272+
if (null === $v) {
273+
unset($a[$prefix.'allowsNull']);
274+
}
275+
} catch (\ReflectionException $e) {
273276
}
274-
} catch (\ReflectionException $e) {
275277
}
276278

277279
return $a;

‎src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
+15-83Lines changed: 15 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -122,21 +122,8 @@ public function testReflectionParameter()
122122
{
123123
$var = new \ReflectionParameter(reflectionParameterFixture::class, 0);
124124

125-
if (\PHP_VERSION_ID < 80100) {
126-
$this->assertDumpMatchesFormat(
127-
<<<'EOTXT'
128-
ReflectionParameter {
129-
+name: "arg1"
130-
position: 0
131-
typeHint: "Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass"
132-
default: null
133-
}
134-
EOTXT
135-
, $var
136-
);
137-
} else {
138-
$this->assertDumpMatchesFormat(
139-
<<<'EOTXT'
125+
$this->assertDumpMatchesFormat(
126+
<<<'EOTXT'
140127
ReflectionParameter {
141128
+name: "arg1"
142129
position: 0
@@ -145,8 +132,7 @@ public function testReflectionParameter()
145132
}
146133
EOTXT
147134
, $var
148-
);
149-
}
135+
);
150136
}
151137

152138
public function testReflectionParameterScalar()
@@ -468,108 +454,54 @@ public function testGenerator()
468454
$generator = new GeneratorDemo();
469455
$generator = $generator->baz();
470456

471-
if (\PHP_VERSION_ID < 80100) {
472-
$expectedDump = <<<'EODUMP'
457+
$expectedDump = <<<'EODUMP'
473458
Generator {
474459
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
475-
executing: {
460+
%s: {
476461
%sGeneratorDemo.php:14 {
477462
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz()
478463
› {
479464
› yield from bar();
480465
› }
481466
}
482-
}
467+
%A}
483468
closed: false
484469
}
485470
EODUMP;
486-
} else {
487-
$expectedDump = <<<'EODUMP'
488-
Generator {
489-
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
490-
trace: {
491-
./src/Symfony/Component/VarDumper/Tests/Fixtures/GeneratorDemo.php:13 {
492-
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz()
493-
› public function baz()
494-
› {
495-
› yield from bar();
496-
}
497-
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz() {}
498-
}
499-
closed: false
500-
}
501-
EODUMP;
502-
}
503471

504472
$this->assertDumpMatchesFormat($expectedDump, $generator);
505473

506474
foreach ($generator as $v) {
507475
break;
508476
}
509477

510-
if (\PHP_VERSION_ID < 80100) {
511-
$expectedDump = <<<'EODUMP'
478+
$expectedDump = <<<'EODUMP'
512479
array:2 [
513480
0 => ReflectionGenerator {
514481
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
515-
trace: {
516-
%s%eTests%eFixtures%eGeneratorDemo.php:9 {
482+
%s: {
483+
%s%eTests%eFixtures%eGeneratorDemo.php:%d {
517484
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo()
518-
› {
519-
› yield 1;
520-
› }
521-
}
485+
%A › yield 1;
486+
%A }
522487
%s%eTests%eFixtures%eGeneratorDemo.php:20 { …}
523488
%s%eTests%eFixtures%eGeneratorDemo.php:14 { …}
524-
}
489+
%A }
525490
closed: false
526491
}
527492
1 => Generator {
528-
executing: {
529-
%sGeneratorDemo.php:10 {
493+
%s: {
494+
%s%eTests%eFixtures%eGeneratorDemo.php:%d {
530495
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo()
531496
› yield 1;
532497
› }
533498
534499
}
535-
}
536-
closed: false
537-
}
538-
]
539-
EODUMP;
540-
} else {
541-
$expectedDump = <<<'EODUMP'
542-
array:2 [
543-
0 => ReflectionGenerator {
544-
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
545-
trace: {
546-
%s%eTests%eFixtures%eGeneratorDemo.php:9 {
547-
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo()
548-
› {
549-
› yield 1;
550-
› }
551-
}
552-
%s%eTests%eFixtures%eGeneratorDemo.php:20 { …}
553-
%s%eTests%eFixtures%eGeneratorDemo.php:14 { …}
554-
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz() {}
555-
}
556-
closed: false
557-
}
558-
1 => Generator {
559-
trace: {
560-
./src/Symfony/Component/VarDumper/Tests/Fixtures/GeneratorDemo.php:9 {
561-
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo()
562-
› {
563-
› yield 1;
564-
› }
565-
}
566-
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo() {}
567-
}
500+
%A }
568501
closed: false
569502
}
570503
]
571504
EODUMP;
572-
}
573505

574506
$r = new \ReflectionGenerator($generator);
575507
$this->assertDumpMatchesFormat($expectedDump, [$r, $r->getExecutingGenerator()]);

0 commit comments

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