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 {#540 +payload: null +groups: [ "Default" ] +fields: [ "name" => Symfony\Component\Validator\Constraints\Required {#1921 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\NotBlank {#1848 +payload: null +groups: [ "Default" ] +message: "This value should not be blank." +allowNull: false +normalizer: null } ] } "description" => Symfony\Component\Validator\Constraints\Optional {#1901 +payload: null +groups: [ "Default" ] +constraints: [] } "version" => Symfony\Component\Validator\Constraints\Optional {#1898 +payload: null +groups: [ "Default" ] +constraints: [] } "parent" => Symfony\Component\Validator\Constraints\Optional {#1923 +payload: null +groups: [ "Default" ] +constraints: [] } "options" => Symfony\Component\Validator\Constraints\Optional {#1925 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#1927 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "array" } ] } "inherit_styles" => Symfony\Component\Validator\Constraints\Optional {#1902 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#1928 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "bool" } ] } "schema_version" => Symfony\Component\Validator\Constraints\Optional {#1849 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\IdenticalTo {#1908 +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 {#1905 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#1912 +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 {#1850 +payload: null +groups: [ "Default" ] +fields: [ "name" => Symfony\Component\Validator\Constraints\Required {#1841 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\NotBlank {#1917 +payload: null +groups: [ "Default" ] +message: "This value should not be blank." +allowNull: false +normalizer: null } ] } "description" => Symfony\Component\Validator\Constraints\Optional {#1919 +payload: null +groups: [ "Default" ] +constraints: [] } "version" => Symfony\Component\Validator\Constraints\Optional {#1838 +payload: null +groups: [ "Default" ] +constraints: [] } "parent" => Symfony\Component\Validator\Constraints\Optional {#1778 +payload: null +groups: [ "Default" ] +constraints: [] } "options" => Symfony\Component\Validator\Constraints\Optional {#1846 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#1930 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "array" } ] } "inherit_styles" => Symfony\Component\Validator\Constraints\Optional {#1899 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#1911 +payload: null +groups: [ "Default" ] +message: "This value should be of type {{ type }}." +type: "bool" } ] } "schema_version" => Symfony\Component\Validator\Constraints\Optional {#202 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\IdenticalTo {#1915 +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 {#1914 +payload: null +groups: [ "Default" ] +constraints: [ Symfony\Component\Validator\Constraints\Type {#1897 +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