Skip to content

Commit 6375887

Browse files
Merge branch '3.4' into 4.2
* 3.4: (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 4140842 + 623fd6b commit 6375887

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
@@ -48,7 +48,7 @@ public function isFresh($timestamp)
4848
{
4949
self::refresh();
5050

51-
return self::$runtimeVendors === $this->vendors;
51+
return array_values(self::$runtimeVendors) === array_values($this->vendors);
5252
}
5353

5454
/**

Resource/ReflectionClassResource.php

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

143143
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) as $p) {
144144
yield $p->getDocComment().$p;
145-
yield print_r($defaults[$p->name], true);
145+
yield print_r(isset($defaults[$p->name]) ? $defaults[$p->name] : null, true);
146146
}
147147
}
148148

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)