diff --git a/src/request-parameters/RequestParametersBase.php b/src/request-parameters/RequestParametersBase.php index a4a5d57..01d894d 100644 --- a/src/request-parameters/RequestParametersBase.php +++ b/src/request-parameters/RequestParametersBase.php @@ -64,7 +64,7 @@ classname $class, $spec = $specs[$name]; invariant( /* HH_FIXME[4162] need reified generics */ - $spec instanceof $class, + \is_a($spec, $class), 'Expected %s to be a %s, got %s', $name, $class, diff --git a/src/uri-patterns/UriBuilderBase.php b/src/uri-patterns/UriBuilderBase.php index e157a77..055e496 100644 --- a/src/uri-patterns/UriBuilderBase.php +++ b/src/uri-patterns/UriBuilderBase.php @@ -74,7 +74,7 @@ classname> $parameter_type, \implode(', ', $this->parameters->keys()->map($x ==> "'".$x."'")), ); invariant( - $part instanceof $parameter_type, + \is_a($part, $parameter_type), 'Expected %s to be a %s, got a %s', $name, $parameter_type,