Bug #79349 [Opn]: Unlinked anonymous classes prevent using preloading

From: Date: Thu, 05 Mar 2020 11:03:19 +0000
Subject: Bug #79349 [Opn]: Unlinked anonymous classes prevent using preloading
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225902@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79349&edit=1

 ID:                 79349
 Updated by:         nikic@php.net
 Reported by:        nicolasgrekas@php.net
 Summary:            Unlinked anonymous classes prevent using preloading
 Status:             Open
 Type:               Bug
 Package:            opcache
 PHP Version:        7.4.3
 Block user comment: N
 Private report:     N

 New Comment:

Can you please share the relevant code in Symfony?


Previous Comments:
------------------------------------------------------------------------
[2020-03-05 11:02:09] nicolasgrekas@php.net

Typo:
Would it be possible to have nested anonymous classes be loaded at *preload* time?

------------------------------------------------------------------------
[2020-03-05 11:00:58] nicolasgrekas@php.net

Description:
------------
Following https://bugs.php.net/78937, commit
20ef51db22c46fd45976eb6d0b780c14022c8873 added a new runtime exception that says:

> Fatal error: Class foo wasn't preloaded

I don't how to deal with this exception. I feel like this is a blocker that prevents using
preloading when the preloading strategy is base on composer+autoloading. This hits Symfony.

Would it be possible to have nested anonymous classes be loaded at runtime?
This would allow the autoloader to load their dependencies, thus solving the issue.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=79349&edit=1


Thread (9 messages)

« previous php.bugs (#225902) next »