Closed remicollet closed 2 years ago
I've provided a screenshot in report 346 to see what it look like if you apply following patch.
diff --git a/src/Presentation/Console/Command/AnalyserCommand.php b/src/Presentation/Console/Command/AnalyserCommand.php
index 0c9e12c0..3ad51a6e 100644
--- a/src/Presentation/Console/Command/AnalyserCommand.php
+++ b/src/Presentation/Console/Command/AnalyserCommand.php
@@ -17,6 +17,8 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Messenger\Exception\HandlerFailedException;
+use function sprintf;
+
/**
* Analyse a data source to find out requirements.
*
@@ -65,8 +67,29 @@ final class AnalyserCommand extends AbstractCommand implements CommandInterface
try {
$this->queryBus->query($compatibilityQuery);
} catch (HandlerFailedException $e) {
+ $exceptions = [];
+ foreach($e->getNestedExceptions() as $exception) {
+ $exceptions[] = $exception->getMessage()
+ . sprintf(' from file "%s" at line %d', $exception->getFile(), $exception->getLine());
+ }
$io = new Style($input, $output);
- $io->error($e->getMessage());
+ $io->error(
+ sprintf(
+ 'Cannot analyse data source "%s" for following reason(s)',
+ $compatibilityQuery->getSource()
+ )
+ );
+ $io->listing($exceptions);
+ /** @var ApplicationInterface $app */
+ $app = $this->getApplication();
+ $io->note(
+ sprintf(
+ 'Issue found by %s version %s with DB version %s',
+ $app->getName(),
+ $app->getInstalledVersion(),
+ $app->getInstalledVersion(true, 'bartlett/php-compatinfo-db')
+ )
+ );
return self::FAILURE;
}
And to fix error, patch to apply is :
diff --git a/src/Application/Sniffs/Fibers/FiberSniff.php b/src/Application/Sniffs/Fibers/FiberSniff.php
index b45a91a7..426f96bd 100644
--- a/src/Application/Sniffs/Fibers/FiberSniff.php
+++ b/src/Application/Sniffs/Fibers/FiberSniff.php
@@ -55,6 +55,10 @@ final class FiberSniff extends SniffAbstract
return null;
}
+ if (!$node->class instanceof Node\Name) {
+ return null;
+ }
+
if ('Fiber' === (string) $node->class) {
$this->updateNodeElementVersion($node, $this->attributeKeyStore, ['php.min' => '8.1.0alpha1']);
$this->updateNodeElementRule($node, $this->attributeKeyStore, self::CA81);
Even if CompatibilityAnalyser, after that, display a report, I'm not yet sure about the minimum PHP value found ;-) But it's another problem !
Patches were applied on branch 6.3
@remicollet FYI when I said
Even if CompatibilityAnalyser, after that, display a report, I'm not yet sure about the minimum PHP value found ;-) But it's another problem !
I finally found origin of detection issue. Fix will follow !
After applying fix of issue 348, analysis of laminas mail 2.16.0 give me acceptable results.
Trying to analyse laminas-mail 2.16.0 sources tree