[Runtime] Fix class validation of composer "extra.runtime.class" #43376
+0
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug of validating a runtime class from the composer param
extra.runtime.class
. When provided, it always fails. Taking as an example theRuntime\Swoole\Runtime
of theruntime/swoole
package, when executing thecomposer dump-autoload
, it ends with the following exception, even though theruntime/swoole
package was installed.When a composer plugin is executed, the composer autoloader for the project is not registered, thereby any reference to a class from installed packages won't work.
The fix drops this check to avoid it. I don't think it's worth checking here if a runtime class is valid or not. For instance, anything that comes from the
$_SERVER['APP_RUNTIME']
is accepted, nothing is validated.