Skip to content

Commit a17a2ae

Browse files
Merge branch '4.2' into 4.3
* 4.2: (23 commits) fix cs Use mocks before replacing the error handler [Config] Do not use absolute path when computing the vendor freshness Bump minimum version of symfony/phpunit-bridge Container*::getServiceIds() should return an array of string [Config][ReflectionClassResource] Use ternary instead of null coaelscing operator [Validator] Add missing Russian and Ukrainian translations [Translation] Use HTTPS and fix a url [Config] Fix for signatures of typed properties [Validator] Add missing Hungarian translations [Validator] Add Lithuanian translation for Range validator Add HTTPS to a URL sync translation files PHPDoc fixes Add notInRange translation Add danish translation for Range validator Add german translation for Range validator Update validators.es.xlf [Validator] Add missing en and fr translation ids from 4.4 [Debug][DebugClassLoader] Don't check class if the included file don't exist ...
2 parents 76cb5fd + 6375887 commit a17a2ae

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Resource/ComposerResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function isFresh($timestamp)
5050
{
5151
self::refresh();
5252

53-
return self::$runtimeVendors === $this->vendors;
53+
return array_values(self::$runtimeVendors) === array_values($this->vendors);
5454
}
5555

5656
private static function refresh()

Resource/ReflectionClassResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private function generateSignature(\ReflectionClass $class)
136136

137137
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) as $p) {
138138
yield $p->getDocComment().$p;
139-
yield print_r($defaults[$p->name], true);
139+
yield print_r(isset($defaults[$p->name]) ? $defaults[$p->name] : null, true);
140140
}
141141
}
142142

Tests/Resource/ReflectionClassResourceTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ public function provideHashedSignature()
134134
yield [1, 13, 'protected function prot($a = [123]) {}'];
135135
yield [0, 14, '/** priv docblock */'];
136136
yield [0, 15, ''];
137+
138+
if (\PHP_VERSION_ID >= 70400) {
139+
// PHP7.4 typed properties without default value are
140+
// undefined, make sure this doesn't throw an error
141+
yield [1, 5, 'public array $pub;'];
142+
yield [0, 7, 'protected int $prot;'];
143+
yield [0, 9, 'private string $priv;'];
144+
}
137145
}
138146

139147
public function testEventSubscriber()

0 commit comments

Comments
 (0)