From ce45d15bb5dfec0baa444a56ec0a8aacf070f063 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 12 May 2022 16:05:49 +0200 Subject: [PATCH] Skip schema validation when running completion for increased bootstrap performance --- src/Composer/Factory.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index af468ab80..ee7e04586 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -704,6 +704,10 @@ class Factory */ private static function validateJsonSchema(?IOInterface $io, $fileOrData, int $schema = JsonFile::LAX_SCHEMA, ?string $source = null): void { + if (Platform::isInputCompletionProcess()) { + return; + } + try { if ($fileOrData instanceof JsonFile) { $fileOrData->validateSchema($schema);