createFromInput(new ArgvInput()); $queryBus = $container->get(QueryBusInterface::class); // perform request, on a data source with default analyser $dataSource = dirname(__DIR__) . '/src'; // equivalent to CLI command `phpcompatinfo analyser:run ../src` $compatibilityQuery = new GetCompatibilityQuery($dataSource, [], false, ''); try { /** @var Profile $profile */ $profile = $queryBus->query($compatibilityQuery); $data = $profile->getData(); $dump = reset($data); var_export($dump); } catch (HandlerFailedException $e) { foreach ($e->getWrappedExceptions() as $ex) { printf('Exception -- %s%s%s%s', $ex->getMessage(), PHP_EOL, $ex->getTraceAsString(), PHP_EOL); }; }