Skip to content

Commit 0e53374

Browse files
Update vimeo/psalm requirement from 4.6.4 to 4.7.0 (#167)
* Update vimeo/psalm requirement from 4.6.4 to 4.7.0 Updates the requirements on [vimeo/psalm](https://github.com/vimeo/psalm) to permit the latest version. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](vimeo/psalm@4.6.4...4.7.0) Signed-off-by: dependabot[bot] <[email protected]> * psalm fixes, psalm badges, shepherd in build Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jay Klehr <[email protected]>
1 parent a3fedec commit 0e53374

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Static Analysis
3333
run: |
3434
composer phpstan
35-
composer psalm
35+
composer psalm -- --shepherd
3636
- name: Code Style Check
3737
run: composer style-check
3838
# php-cs-fixer doesn't fully support PHP 8 yet

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Doctrine 1 ORM
55
[![Latest Stable Version](https://poser.pugx.org/diablomedia/doctrine1/v/stable)](https://packagist.org/packages/diablomedia/doctrine1)
66
[![Total Downloads](https://poser.pugx.org/diablomedia/doctrine1/downloads)](https://packagist.org/packages/diablomedia/doctrine1)
77
[![License](https://poser.pugx.org/diablomedia/doctrine1/license)](https://packagist.org/packages/diablomedia/doctrine1)
8+
[![Psalm Type coverage](https://shepherd.dev/github/diablomedia/doctrine1/coverage.svg)](https://psalm.dev/)
9+
[![Psalm level](https://shepherd.dev/github/diablomedia/doctrine1/level.svg?)](https://psalm.dev/)
810

911
A fork of the old school Doctrine1 repo that is maintained to the point that major blockers are fixed, and kept up to date to work with current PHP versions.
1012

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"phpunit/php-code-coverage": "^9.1.10",
4646
"friendsofphp/php-cs-fixer": "2.18.4",
4747
"phpstan/phpstan": "0.12.82",
48-
"vimeo/psalm": "4.6.4"
48+
"vimeo/psalm": "4.7.0"
4949
},
5050
"scripts": {
5151
"test": "cd tests && php run.php",

lib/Doctrine/Connection/UnitOfWork.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,17 +691,23 @@ public function buildFlushTree(array $tables)
691691
}
692692

693693
// build the correct order
694+
/**
695+
* @var array<int, string> $flushList
696+
*/
694697
$flushList = array();
695698
foreach ($classesToOrder as $class) {
696699
$table = $this->conn->getTable($class);
697700
$currentClass = $table->getComponentName();
698701

702+
/**
703+
* @var int|false $index
704+
*/
699705
$index = array_search($currentClass, $flushList);
700706

701707
if ($index === false) {
702708
//echo "adding $currentClass to flushlist";
703709
$flushList[] = $currentClass;
704-
$index = max(array_keys($flushList));
710+
$index = (int) max(array_keys($flushList));
705711
}
706712

707713
$rels = $table->getRelations();
@@ -721,6 +727,9 @@ public function buildFlushTree(array $tables)
721727
continue;
722728
}
723729

730+
/**
731+
* @var int|false $relatedCompIndex
732+
*/
724733
$relatedCompIndex = array_search($relatedClassName, $flushList);
725734
$type = $rel->getType();
726735

psalm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0"?>
22
<psalm
3-
totallyTyped="false"
43
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
54
xmlns="https://getpsalm.org/schema/config"
65
xsi:schemaLocation="https://getpsalm.org/schema/config ./vendor/vimeo/psalm/config.xsd"
76
errorBaseline="psalm-baseline.xml"
7+
errorLevel="2"
88
>
99
<projectFiles>
1010
<directory name="./lib/" />

0 commit comments

Comments
 (0)