diff --git a/src/Extension/ExtensionRegistry.php b/src/Extension/ExtensionRegistry.php index 0d3e6bc7b..956feceb0 100644 --- a/src/Extension/ExtensionRegistry.php +++ b/src/Extension/ExtensionRegistry.php @@ -24,14 +24,7 @@ public function addCompilerPass(string $extensionClass): void private function addComposerPackages(): void { - // We do a try/catch here, instead of using `method_exists`. This is - // because PHPStan is being a smart-ass, and takes the state of the - // generated `Types` class into account. And that's exactly the point. - try { - $packages = Types::boltExtension(); - } catch (\Throwable $e) { - $packages = []; - } + $packages = Types::get('bolt-extension'); /** @var PackageInterface $package */ foreach ($packages as $package) {