private function detectMissingConstructorMessage(ReflectionException $exception) { return strpos($exception->getMessage(), 'does not have a constructor') !== 0; }