Validator calls
In
ThemeManifest.php
line ():
throw new \InvalidArgumentException('theme.yaml must be a mapping.');}$violations = $this->validator->validate($data, new Assert\Collection(['name' => new Assert\Required(new Assert\NotBlank()),'description' => new Assert\Optional(),'version' => new Assert\Optional(),'parent' => new Assert\Optional(),
[ "value" => [ "schema_version" => 1 "id" => "cobalt" "name" => [ "uk" => "Кобальт" "en" => "Cobalt" ] "description" => [ "uk" => "Базова тема сайту — світла, з акцентним синім першим екраном." "en" => "The base site theme — light, with an accent blue hero." ] "version" => "1.0.0" "parent" => null "options" => [ "primary" => [ "type" => "color" "default" => "#2346E8" "presets" => [ "#2346E8" "#0D1530" "#5B3FD6" "#11704A" ] ] "font" => [ "type" => "choice" "default" => "onest" "choices" => [ "onest" "manrope" "geologica" ] ] "radius" => [ "type" => "choice" "default" => "round" "choices" => [ "round" "soft" "sharp" ] ] "mode" => [ "type" => "choice" "default" => "light" "choices" => [ "light" "dark" "auto" ] ] "hero_photo" => [ "type" => "bool" "default" => true ] ] ] "constraints" => Symfony\Component\Validator\Constraints\Collection {#1962 +payload: null +groups: [ "Default" ] +fields: [ "name" => Symfony\Component\Validator\Constraints\Required {#1974 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\NotBlank {#1969 +payload: null +groups: [ "Default" ] +message: "This value should not be blank." +allowNull: false +normalizer: null } ] } "description" => Symfony\Component\Validator\Constraints\Optional {#1973 +payload: null +groups: [ "Default" ] +constraints: [] } "version" => Symfony\Component\Validator\Constraints\Optional {#1972 +payload: null +groups: [ "Default" ] +constraints: [] } "parent" => Symfony\Component\Validator\Constraints\Optional {#1975 +payload: null +groups: [ "Default" ] +constraints: [] } "options" => Symfony\Component\Validator\Constraints\Optional {#1241 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#2009 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "array" } ] } "inherit_styles" => Symfony\Component\Validator\Constraints\Optional {#2019 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#2013 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "bool" } ] } "schema_version" => Symfony\Component\Validator\Constraints\Optional {#2010 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\IdenticalTo {#2012 +payload: null +groups: [ "Default" ] +message: "This value should be identical to {{ compared_value_type }} {{ compared_value }}." +value: 1 +propertyPath: null } ] } "id" => Symfony\Component\Validator\Constraints\Optional {#2018 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#2020 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "string" } ] } ] +allowExtraFields: false +allowMissingFields: false +extraFieldsMessage: "This field was not expected." +missingFieldsMessage: "This field is missing." } "groups" => null ]
No violations
In
ThemeManifest.php
line ():
throw new \InvalidArgumentException('theme.yaml must be a mapping.');}$violations = $this->validator->validate($data, new Assert\Collection(['name' => new Assert\Required(new Assert\NotBlank()),'description' => new Assert\Optional(),'version' => new Assert\Optional(),'parent' => new Assert\Optional(),
[ "value" => [ "schema_version" => 1 "id" => "svitlo" "name" => [ "uk" => "Світло" "en" => "Svitlo" ] "description" => [ "uk" => "Світле портфоліо з синіми акцентами, справжніми проєктами та окремою сторінкою досвіду." "en" => "A light portfolio with blue accents, real projects and a dedicated experience timeline." ] "version" => "1.0.0" "parent" => "cobalt" "inherit_styles" => false "options" => [ "primary" => [ "type" => "color" "default" => "#0733FF" "presets" => [ "#0733FF" "#2346E8" "#11704A" ] ] "font" => [ "type" => "choice" "default" => "onest" "choices" => [ "onest" "manrope" "geologica" ] ] "radius" => null "mode" => null "hero_photo" => null ] ] "constraints" => Symfony\Component\Validator\Constraints\Collection {#2021 +payload: null +groups: [ "Default" ] +fields: [ "name" => Symfony\Component\Validator\Constraints\Required {#202 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\NotBlank {#2023 +payload: null +groups: [ "Default" ] +message: "This value should not be blank." +allowNull: false +normalizer: null } ] } "description" => Symfony\Component\Validator\Constraints\Optional {#2024 +payload: null +groups: [ "Default" ] +constraints: [] } "version" => Symfony\Component\Validator\Constraints\Optional {#2026 +payload: null +groups: [ "Default" ] +constraints: [] } "parent" => Symfony\Component\Validator\Constraints\Optional {#2027 +payload: null +groups: [ "Default" ] +constraints: [] } "options" => Symfony\Component\Validator\Constraints\Optional {#2031 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#2032 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "array" } ] } "inherit_styles" => Symfony\Component\Validator\Constraints\Optional {#2033 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#2034 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "bool" } ] } "schema_version" => Symfony\Component\Validator\Constraints\Optional {#2035 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\IdenticalTo {#2036 +payload: null +groups: [ "Default" ] +message: "This value should be identical to {{ compared_value_type }} {{ compared_value }}." +value: 1 +propertyPath: null } ] } "id" => Symfony\Component\Validator\Constraints\Optional {#2037 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#2038 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "string" } ] } ] +allowExtraFields: false +allowMissingFields: false +extraFieldsMessage: "This field was not expected." +missingFieldsMessage: "This field is missing." } "groups" => null ]
No violations