File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 55use Amp \Serialization \SerializationException as SerializerException ;
66
77if (!\class_exists (SerializationException::class)) {
8- // Alias must be defined in an always-loaded file as catch blocks do not trigger the autoloader.
9- \class_alias (SerializerException::class, SerializationException::class);
8+ // Wrap definition in error handler to avoid apparently PHP bug with preloading, see amphp/parallel#159
9+ set_error_handler (function (): bool { return true ; });
10+ try {
11+ // Alias must be defined in an always-loaded file as catch blocks do not trigger the autoloader.
12+ \class_alias (SerializerException::class, SerializationException::class);
13+ } finally {
14+ restore_error_handler ();
15+ }
1016}
1117
1218/**
You can’t perform that action at this time.
0 commit comments