Skip to content

Commit

Permalink
Merge pull request #16 from Jeckel-Lab/dependabot/composer/vimeo/psal…
Browse files Browse the repository at this point in the history
…m-tw-4.1

Update vimeo/psalm requirement from ^3.8 to ^4.1
  • Loading branch information
jeckel authored Nov 2, 2020
2 parents 361ac0a + 4b75086 commit f58a225
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 46 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"require": {
"php": "^7.2",
"symfony/dependency-injection": "^4.3 || ^5.0",
"symfony/http-kernel": "^4.3 || ^5.0",
"symfony/http-kernel": "^4.3 || ^5.1.5",
"jeckel-lab/command-dispatcher": "^0.3",
"symfony/config": "^4.3 || ^5.0",
"symfony/doctrine-bridge": "^4.3 || ^5.0",
Expand All @@ -14,7 +14,7 @@
,
"require-dev": {
"roave/security-advisories": "dev-master",
"vimeo/psalm": "^3.8",
"vimeo/psalm": "^4.1",
"phpmd/phpmd": "^2.8",
"squizlabs/php_codesniffer": "^3.5",
"phpro/grumphp": "^0.19.0"
Expand Down
42 changes: 1 addition & 41 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
errorLevel="2"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
Expand All @@ -12,44 +12,4 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<LessSpecificReturnType errorLevel="info" />

<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->

<DeprecatedMethod errorLevel="info" />
<DeprecatedProperty errorLevel="info" />
<DeprecatedClass errorLevel="info" />
<DeprecatedConstant errorLevel="info" />
<DeprecatedFunction errorLevel="info" />
<DeprecatedInterface errorLevel="info" />
<DeprecatedTrait errorLevel="info" />

<InternalMethod errorLevel="info" />
<InternalProperty errorLevel="info" />
<InternalClass errorLevel="info" />

<MissingClosureReturnType errorLevel="info" />
<MissingReturnType errorLevel="info" />
<MissingPropertyType errorLevel="info" />
<InvalidDocblock errorLevel="info" />
<MisplacedRequiredParam errorLevel="info" />

<PropertyNotSetInConstructor errorLevel="info" />
<MissingConstructor errorLevel="info" />
<MissingClosureParamType errorLevel="info" />
<MissingParamType errorLevel="info" />

<RedundantCondition errorLevel="info" />

<DocblockTypeContradiction errorLevel="info" />
<RedundantConditionGivenDocblockType errorLevel="info" />

<UnresolvableInclude errorLevel="info" />

<RawObjectIteration errorLevel="info" />

<InvalidStringClass errorLevel="info" />
</issueHandlers>
</psalm>
6 changes: 3 additions & 3 deletions src/Compiler/CommandHandlerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ public function process(ContainerBuilder $container): void
$handlerMaps = [];
// Find command handlers
foreach (array_keys($container->findTaggedServiceIds($this->handlersTag)) as $serviceId) {
$classname = $container->getDefinition($serviceId)->getClass();
$classname = $container->getDefinition((string) $serviceId)->getClass();
if (null === $classname) {
throw new RuntimeException(sprintf('Unable to find service with id: %s', $serviceId));
}

$aliasId = 'command_handler.handler.alias.' . $classname;
$container->setAlias($aliasId, $serviceId)->setPublic(true);
$container->setAlias($aliasId, (string) $serviceId)->setPublic(true);

/** @var array $commands */
/** @var string[] $commands */
$commands = call_user_func([$classname, 'getHandledCommands']);
foreach ($commands as $command) {
$handlerMaps[$command] = $aliasId;
Expand Down

0 comments on commit f58a225

Please sign in to comment.