(new SchemaValidator())->validate($content, $userSchema, [$enterpriseUserSchema, $customUserSchema]);
it seems validator doesn't seem to bother checking if attributes are defined in extensions. Once any attribute is defined in $userSchema, it will add a validation error, having errors like so
[xxx] Attribute is not defined [urn:ietf:params:scim:schemas:core:2.0:User]
even though attribute is defined by extension.
I would suggest to either remove validation error if during validation of extensions it turns out attributes are there, or merge attributes from all schemas together and validate that in one go.
When using schema extensions like so
it seems validator doesn't seem to bother checking if attributes are defined in extensions. Once any attribute is defined in $userSchema, it will add a validation error, having errors like so
even though attribute is defined by extension.
I would suggest to either remove validation error if during validation of extensions it turns out attributes are there, or merge attributes from all schemas together and validate that in one go.