Skip to content

Commit

Permalink
Fixes for dev requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Aug 23, 2024
1 parent 5e6de45 commit 084e9b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Composer/ComposerFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public function getData(): array
{
$read = $this->readFactory->create($this->composerFile, 'file');
$composerContents = $read->readAll();

try {
$extensionData = $this->serializer->unserialize($composerContents);
} catch (InvalidArgumentException $invalidArgumentException) {
throw new RuntimeException('Unserialize of file "' . $this->composerFile . '" failed: '.$invalidArgumentException->getMessage());
}

if (empty($extensionData)) {
throw new RuntimeException('Empty contents after decoding file "' . $this->composerFile . '"');
}
Expand Down Expand Up @@ -84,6 +84,6 @@ public function getName(): string
public function getRequirements(): array
{
// @todo: Merge this with require-dev?
return $this->get('require');
return array_merge($this->get('require'), $this->get('require-dev'));
}
}
5 changes: 4 additions & 1 deletion Scan/ScanComposerRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ private function isComposerDependencyNeeded(string $dependency, array $component

$validDependencies = [
'php',
'magento/magento-composer-installer'
'magento/magento-composer-installer',
'phpstan/phpstan',
'bitexpert/phpstan-magento',
'yireo/magento2-integration-test-helper',
];

if (\in_array($dependency, $validDependencies)) {
Expand Down

0 comments on commit 084e9b8

Please sign in to comment.