Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,9 @@
"php": "^8.1",
"composer-plugin-api": "^2.0",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"enlightn/security-checker": "^1.5 || ^2.0",
"kint-php/kint": "@stable",
"php-cs-fixer/shim": "@stable",
"php-parallel-lint/php-parallel-lint": "^1.4",
"phpmd/phpmd": "^2.15 || 3.x-dev",
"phpro/grumphp-shim": "^2.15",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing in PackagesInstaller (there are more missing actually, but this one is for sure very relevant)

"phpstan/phpstan": "@stable",
"squizlabs/php_codesniffer": "^3.12.0 || ^4.0",
"youwe/composer-dependency-installer": "^2.0",
"youwe/composer-file-installer": "^2.0.0"
"youwe/composer-file-installer": "^2.0.0",
"php-parallel-lint/php-parallel-lint": "^1.4"
},
"conflict": {
"phpro/grumphp-shim": ">= 2.18.0"
Expand All @@ -47,8 +40,13 @@
},
"require-dev": {
"composer/composer": "@stable",
"mikey179/vfsstream": "@stable",
"phpunit/phpunit": "@stable"
"enlightn/security-checker": "^1.5 || ^2.0",
"mikey179/vfsstream": "^1.6",
"phpmd/phpmd": "^2.15",
"phpro/grumphp-shim": "^2.15",
"phpstan/phpstan": "^2.2",
"squizlabs/php_codesniffer": "^4.0",
"phpunit/phpunit": ">=9.6"
},
"replace": {
"sensiolabs/security-checker": "*"
Expand All @@ -61,7 +59,10 @@
"grumphp": {
"config-default-path": "grumphp.yml"
},
"class": "Youwe\\TestingSuite\\Composer\\Plugin"
"class": "Youwe\\TestingSuite\\Composer\\Plugin",
"test-dependencies": {
"phpunit/phpunit": "^11.0"
}
},
"autoload": {
"psr-4": {
Expand Down
30 changes: 30 additions & 0 deletions src/Installer/PackagesInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ class PackagesInstaller implements InstallerInterface
'updateDependencies' => true,
'allowVersionOverride' => false,
],
'enlightn/security-checker' => [
'version' => '@stable',
'updateDependencies' => true,
'allowVersionOverride' => false,
],
'phpstan/phpstan' => [
'version' => '@stable',
'updateDependencies' => true,
'allowVersionOverride' => false,
],
'php-cs-fixer/shim' => [
'version' => '^1.0',
'updateDependencies' => true,
'allowVersionOverride' => false,
],
'phpmd/phpmd' => [
'version' => '^2.15 || 3.x-dev',
'updateDependencies' => true,
'allowVersionOverride' => false,
],
'squizlabs/php_codesniffer' => [
'version' => '^3.12.0 || ^4.0',
'updateDependencies' => true,
'allowVersionOverride' => false,
],
],
'magento2' => [
'phpstan/extension-installer' => [
Expand Down Expand Up @@ -91,6 +116,11 @@ class PackagesInstaller implements InstallerInterface
'version' => '@stable',
'updateDependencies' => true,
],
'php-cs-fixer/shim' => [
'version' => '^1.0',
'updateDependencies' => true,
'allowVersionOverride' => false,
],
],
];

Expand Down
7 changes: 4 additions & 3 deletions tests/Installer/PackagesInstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,11 @@ public function testPhpUnitIsInstalledForUnknownProjectType(): void
$depInstallerMock,
);

$mapping = $installer->mapping[MappingResolver::DEFAULT_MAPPING_TYPE];

$depInstallerMock
->expects($this->exactly(1))
->method('installPackage')
->with('phpunit/phpunit', '@stable', true, true, false);
->expects($this->exactly(count($mapping)))
->method('installPackage');

$installer->install();
}
Expand Down
Loading