fix: Skip error logging of missing Enum class (#345)
fix: Skip error logging of missing Enum class (#345)

* fix: Skip error logging of missing Enum class

When using Enumeration types, for each different type an [error] message will show in the console reading as the following:
The type "Enum" (parent of "http://schema.org/DayOfWeek") doesn't exist
This is because the Enumeration class is custom and handled differently from the others; it uses MyCLabs\Enum\Enum. When the types are being generated, there is a check that assigns the parent 'Enum' and adds MyCLabs\Enum\Enum::class in the uses array if the type is a subclass of http://schema.org/Enumeration.
So when the command goes in the second pass, it checks for the parent of the given class (if any), if there is one, it checks if it has a constructor and tells the parent it has child; if the parent class isn't in the "all" classes array, it logs an error to let the user know he must add this class in his schema... but this is not required for the Enum type since it's custom and extending a class from a package; thus making this seems like an error to the user when actually there is none.

* Update src/TypesGenerator.php

Co-authored-by: Kévin Dunglas <ffb4761cba839470133bee36aeb139f58d7dbaa9@dunglas.fr>

Co-authored-by: Kévin Dunglas <ffb4761cba839470133bee36aeb139f58d7dbaa9@dunglas.fr>
api-platform/schema-generator,api-platform/schema-generator