I’m having the same issue, and I’ve traced it to this function on line 4353 in system/Content/Controller.php:
protected function sendModerationAlert( array $values, \IPS\Content\Item|\IPS\Content\Comment $content ) : \IPS\core\Alerts\Alert
{ }
More specifically, the second argument, the union types, causes issues for the editForm function in system/Plugin/Hook.php. On line 370, the editForm function loops through parameters and tries to get their types and names:
$parameters[] = ( $parameter->getType() ? ( ( ( $parameter->allowsNull() ) ? '?' : '' ). '\\' . $parameter->getType()->getName() . ' ' ) : '' ) . ( $parameter->isPassedByReference() ? '&' : '' ) . '$' . $parameter->name . ( $parameter->isOptional() ? ( '=' . var_export( $parameter->getDefaultValue(), TRUE ) ) : '' );
This works with single types, but not with union types.
A single type returns a ReflectionNamedType, while union types return ReflectionUnionType, and trying to call getName() on a ReflectionUnionType will not work. I assume a simple check for ReflectionUnionType inside the try block would solve the issue.
As far as I can tell, this issue affects all hooks to \IPS\Content\Controller and every class extending that class.
For the record, I’m using PHP 8.1.16.