Skip to content

Commit

Permalink
Merge pull request #252 from koriym/composer_plugins
Browse files Browse the repository at this point in the history
Allow composer plugins
  • Loading branch information
koriym committed Feb 4, 2022
2 parents 3caefc2 + 4c46f31 commit 0c72dd5
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 324 deletions.
5 changes: 4 additions & 1 deletion composer.json
Expand Up @@ -25,7 +25,10 @@
"bamarni/composer-bin-plugin": "^1.4"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 6 additions & 5 deletions src/di/SpyCompiler.php
Expand Up @@ -6,7 +6,6 @@

use Ray\Aop\BindInterface;
use Ray\Aop\CompilerInterface;
use stdClass;

use function array_keys;
use function implode;
Expand All @@ -19,12 +18,14 @@
final class SpyCompiler implements CompilerInterface
{
/**
* {@inheritdoc}
* {@inheritDoc}
*
* @psalm-suppress InvalidReturnType
* @template T of object
*/
public function newInstance(string $class, array $args, BindInterface $bind): object
public function newInstance(string $class, array $args, BindInterface $bind)
{
// never called
return new stdClass();
// never called // @phpstan-ignore-line
}

/**
Expand Down
5 changes: 5 additions & 0 deletions vendor-bin/tools/composer.json
Expand Up @@ -7,5 +7,10 @@
"psalm/plugin-phpunit": "^0.13",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.2"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

0 comments on commit 0c72dd5

Please sign in to comment.