From f4f09c8ba740c035a45a9b1cc03c4536674f84ed Mon Sep 17 00:00:00 2001 From: Alberto Reyer Date: Thu, 3 Aug 2023 10:24:37 +0200 Subject: [PATCH] Extended output for schema validation - add the element name that has a validation error to avoid going through all columns of a schema file --- .../Business/Model/Schema/Validator/PropelSchemaValidator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Spryker/Zed/Propel/Business/Model/Schema/Validator/PropelSchemaValidator.php b/src/Spryker/Zed/Propel/Business/Model/Schema/Validator/PropelSchemaValidator.php index c54a86f..e1cf0d1 100644 --- a/src/Spryker/Zed/Propel/Business/Model/Schema/Validator/PropelSchemaValidator.php +++ b/src/Spryker/Zed/Propel/Business/Model/Schema/Validator/PropelSchemaValidator.php @@ -288,8 +288,9 @@ protected function validateAttribute(SimpleXMLElement $toXmlElement, string $key if ($this->isAttributeValueChange($toXmlAttributes, $key, $value) && !$this->isWhiteListed($fileName, $key)) { $this->addError(sprintf( - 'The attribute "%s" in one of your "%s" files has currently "%s" as value, if you would run the schema merger, this value would be overwritten with "%s". This can have weird side effects!', + 'The attribute "%s" in element "%s" in one of your "%s" files has currently "%s" as value, if you would run the schema merger, this value would be overwritten with "%s". This can have weird side effects!', $key, + (string)$toXmlElement['name'], $fileName, (string)$toXmlAttributes[$key], $value,