Skip to content

Commit

Permalink
Update vimeo/psalm version + Fix BC checker (#74)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergei Predvoditelev <sergei@predvoditelev.ru>
  • Loading branch information
dependabot[bot] and vjik committed Mar 6, 2023
1 parent 5945ac3 commit de56bf0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/bc.yml
@@ -1,15 +1,14 @@
on:
pull_request:
push:
- pull_request
- push

name: backwards compatibility

jobs:
roave_bc_check:
name: Roave BC Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
uses: yiisoft/actions/.github/workflows/bc.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.0']
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -29,7 +29,7 @@
"phpunit/phpunit": "^9.5",
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.18",
"vimeo/psalm": "^4.30|^5.7",
"yiisoft/test-support": "^1.2"
},
"autoload": {
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down
3 changes: 3 additions & 0 deletions src/ArgumentException.php
Expand Up @@ -21,6 +21,9 @@

abstract class ArgumentException extends \InvalidArgumentException
{
/**
* @var string
*/
protected const EXCEPTION_MESSAGE = 'Something is wrong with argument "%s" when calling "%s"%s.';

public function __construct(ReflectionFunctionAbstract $reflection, string $parameter)
Expand Down
2 changes: 2 additions & 0 deletions src/ResolvingState.php
Expand Up @@ -62,6 +62,7 @@ public function disablePushTrailingArguments(bool $condition): void
*/
public function addResolvedValue(&$value): void
{
/** @psalm-suppress UnsupportedReferenceUsage */
$this->resolvedValues[] = &$value;
}

Expand Down Expand Up @@ -157,6 +158,7 @@ private function sortArguments(array $arguments): void
if (!is_object($value)) {
throw new InvalidArgumentException($this->reflection, (string)$key);
}
/** @psalm-suppress UnsupportedReferenceUsage */
$this->numericArguments[] = &$value;
} else {
$this->namedArguments[$key] = &$value;
Expand Down

0 comments on commit de56bf0

Please sign in to comment.