Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit845873f

Browse files
[DependencyInjection] Skip preloading on PHP 8.0
1 parentf12943d commit845873f

File tree

6 files changed

+48
-0
lines changed

6 files changed

+48
-0
lines changed

‎src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,14 @@ class %s extends {$options['class']}
324324
}
325325
326326
require$autoloadFile;
327+
require __DIR__.'/{$options['class']}.php';
328+
329+
if (\PHP_VERSION_ID < 80100) {
330+
// Preloading on PHP 8.0 fails with a fatal error when typed properties are used
331+
// if some of those types are referencing optional and non-installed dependencies.
332+
return;
333+
}
334+
327335
(require __DIR__.'/{$options['class']}.php')->set(\\Container{$hash}\\{$options['class']}::class, null);
328336
$preloadedFiles
329337
\$classes = [];

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10_as_files.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
131131
}
132132

133133
require dirname(__DIR__, %d).'%svendor/autoload.php';
134+
require __DIR__.'/ProjectServiceContainer.php';
135+
136+
if (\PHP_VERSION_ID < 80100) {
137+
// Preloading on PHP 8.0 fails with a fatal error when typed properties are used
138+
// if some of those types are referencing optional and non-installed dependencies.
139+
return;
140+
}
141+
134142
(require __DIR__.'/ProjectServiceContainer.php')->set(\Container%s\ProjectServiceContainer::class, null);
135143
require __DIR__.'/Container%s/getClosureService.php';
136144

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,14 @@ if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
897897
}
898898

899899
require dirname(__DIR__, %d).'%svendor/autoload.php';
900+
require __DIR__.'/ProjectServiceContainer.php';
901+
902+
if (\PHP_VERSION_ID < 80100) {
903+
// Preloading on PHP 8.0 fails with a fatal error when typed properties are used
904+
// if some of those types are referencing optional and non-installed dependencies.
905+
return;
906+
}
907+
900908
(require __DIR__.'/ProjectServiceContainer.php')->set(\Container%s\ProjectServiceContainer::class, null);
901909
require __DIR__.'/Container%s/getThrowingOneService.php';
902910
require __DIR__.'/Container%s/getTaggedIteratorService.php';

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_inlined_factories.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,14 @@ if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
552552
}
553553

554554
require dirname(__DIR__, %d).'%svendor/autoload.php';
555+
require __DIR__.'/ProjectServiceContainer.php';
556+
557+
if (\PHP_VERSION_ID < 80100) {
558+
// Preloading on PHP 8.0 fails with a fatal error when typed properties are used
559+
// if some of those types are referencing optional and non-installed dependencies.
560+
return;
561+
}
562+
555563
(require __DIR__.'/ProjectServiceContainer.php')->set(\Container%s\ProjectServiceContainer::class, null);
556564

557565
$classes = [];

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_lazy_inlined_factories.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
169169
}
170170

171171
require dirname(__DIR__, %d).'%svendor/autoload.php';
172+
require __DIR__.'/ProjectServiceContainer.php';
173+
174+
if (\PHP_VERSION_ID < 80100) {
175+
// Preloading on PHP 8.0 fails with a fatal error when typed properties are used
176+
// if some of those types are referencing optional and non-installed dependencies.
177+
return;
178+
}
179+
172180
(require __DIR__.'/ProjectServiceContainer.php')->set(\Container%s\ProjectServiceContainer::class, null);
173181

174182
$classes = [];

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy_as_files.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
130130
}
131131

132132
require dirname(__DIR__, %d).'%svendor/autoload.php';
133+
require __DIR__.'/ProjectServiceContainer.php';
134+
135+
if (\PHP_VERSION_ID < 80100) {
136+
// Preloading on PHP 8.0 fails with a fatal error when typed properties are used
137+
// if some of those types are referencing optional and non-installed dependencies.
138+
return;
139+
}
140+
133141
(require __DIR__.'/ProjectServiceContainer.php')->set(\Container%s\ProjectServiceContainer::class, null);
134142
require __DIR__.'/Container%s/proxy.php';
135143
require __DIR__.'/Container%s/getNonSharedFooService.php';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp