From 41c66b1a2d2e7e8fd576c3bb3f422e5930d71928 Mon Sep 17 00:00:00 2001 From: Guilliam Xavier Date: Mon, 24 May 2021 10:15:10 +0200 Subject: [PATCH] Revert "Update docs and add more helpful output to validate command, refs #9782" This reverts commit 458bd41d8fe8df7e3da7dad8cfd09ea4dfc0d3cd. --- doc/04-schema.md | 4 +--- src/Composer/Util/ConfigValidator.php | 10 ---------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/doc/04-schema.md b/doc/04-schema.md index 95e18ae49..05149d331 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -94,9 +94,7 @@ Out of the box, Composer supports four types: CMSs like the [SilverStripe installer](https://github.com/silverstripe/silverstripe-installer) or full fledged applications distributed as packages. This can for example be used by IDEs to provide listings of projects to initialize when creating - a new workspace. Setting the type to `project` also makes the `name` and - `description` fields optional, making it a good choice for closed source - projects wishing to use `composer validate`. + a new workspace. - **metapackage:** An empty package that contains requirements and will trigger their installation, but contains no files and will not write anything to the filesystem. As such, it does not require a dist or source key to be diff --git a/src/Composer/Util/ConfigValidator.php b/src/Composer/Util/ConfigValidator.php index f98bbd74f..dd2cbcb0d 100644 --- a/src/Composer/Util/ConfigValidator.php +++ b/src/Composer/Util/ConfigValidator.php @@ -63,16 +63,6 @@ class ConfigValidator $json->validateSchema(); } catch (JsonValidationException $e) { foreach ($e->getErrors() as $message) { - if ($message === 'type : The property type is required') { - $message .= ' (see https://getcomposer.org/doc/04-schema.md#type)'; - } - if ($message === 'name : The property name is required') { - $message .= ' (or set "type" to "project" to remove this requirement)'; - } - if ($message === 'description : The property description is required') { - $message .= ' (or set "type" to "project" to remove this requirement)'; - } - if ($laxValid) { $publishErrors[] = $message; } else {