Bug #78225 [Opn->Csd]: Preloading Laravel results in a segfault
| From: | nikic@php.net | Date: | Thu, 04 Jul 2019 10:44:44 +0000 |
| Subject: | Bug #78225 [Opn->Csd]: Preloading Laravel results in a segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221633@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78225&edit=1
ID: 78225
Updated by: nikic@php.net
Reported by: brent at spatie dot be
Summary: Preloading Laravel results in a segfault
-Status: Open
+Status: Closed
Type: Bug
Package: opcache
Operating System: macOS Mojave
PHP Version: 7.4.0alpha2
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
I've landed a few more fixes and improvements. Preloading the whole vendor/ directory now works
without crashing. There are still some warnings, but they mostly look legitimate (classes that are
missing -- possibly optional deps?)
I'm closing this issue, please reopen or open a new one if you run into further problems.
Previous Comments:
------------------------------------------------------------------------
[2019-07-03 13:24:35] nikic@php.net
@brent: That one is likely a bug on our side, I'll take a look.
------------------------------------------------------------------------
[2019-07-03 12:51:36] brent at spatie dot be
Thanks Nikita, the improved logging helps indeed.
Could you tell me what the correct approach would be in this case?
```
Can't preload unlinked class Ramsey\Uuid\Exception\UnsupportedOperationException: Parent with
unresolved property types RuntimeException in
```
It turns out that this specific class extends
\RuntimeException like so:
```
class UnsupportedOperationException extends \RuntimeException
```
How would you go about preloading built-in classes? Shouldn't this happen automatically?
------------------------------------------------------------------------
[2019-07-03 12:07:18] nikic@php.net
I've pushed some improved diagnostics for the unlinked class messages. You'll now see
something like:
Warning: Can't preload unlinked class Illuminate\Http\Exceptions\PostTooLargeException: Unknown
parent Symfony\Component\HttpKernel\Exception\HttpException in
/home/nikic/laravel-preload/vendor/laravel/framework/src/Illuminate/Http/Exceptions/PostTooLargeException.php
on line 8
Which should make it clear that the reason why you're not seeing much preloading is that you
are only preloading Laravel, without its Symfony component dependencies.
------------------------------------------------------------------------
[2019-07-03 11:45:04] nikic@php.net
I can't reproduce this crash on current 7.4 head.
------------------------------------------------------------------------
[2019-07-02 12:49:30] brent at spatie dot be
Edit because of autofiller changing the summary
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=78225
--
Edit this bug report at https://bugs.php.net/bug.php?id=78225&edit=1