Skip to content

Commit

Permalink
Update vimeo/psalm requirement from 4.6.4 to 4.7.0 (#167)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>

* psalm fixes, psalm badges, shepherd in build

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jay Klehr <jay@diablomedia.com>
  • Loading branch information
dependabot[bot] and jaydiablo authored Mar 29, 2021
1 parent a3fedec commit 0e53374
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Static Analysis
run: |
composer phpstan
composer psalm
composer psalm -- --shepherd
- name: Code Style Check
run: composer style-check
# php-cs-fixer doesn't fully support PHP 8 yet
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Doctrine 1 ORM
[![Latest Stable Version](https://poser.pugx.org/diablomedia/doctrine1/v/stable)](https://packagist.org/packages/diablomedia/doctrine1)
[![Total Downloads](https://poser.pugx.org/diablomedia/doctrine1/downloads)](https://packagist.org/packages/diablomedia/doctrine1)
[![License](https://poser.pugx.org/diablomedia/doctrine1/license)](https://packagist.org/packages/diablomedia/doctrine1)
[![Psalm Type coverage](https://shepherd.dev/github/diablomedia/doctrine1/coverage.svg)](https://psalm.dev/)
[![Psalm level](https://shepherd.dev/github/diablomedia/doctrine1/level.svg?)](https://psalm.dev/)

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.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"phpunit/php-code-coverage": "^9.1.10",
"friendsofphp/php-cs-fixer": "2.18.4",
"phpstan/phpstan": "0.12.82",
"vimeo/psalm": "4.6.4"
"vimeo/psalm": "4.7.0"
},
"scripts": {
"test": "cd tests && php run.php",
Expand Down
11 changes: 10 additions & 1 deletion lib/Doctrine/Connection/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,17 +691,23 @@ public function buildFlushTree(array $tables)
}

// build the correct order
/**
* @var array<int, string> $flushList
*/
$flushList = array();
foreach ($classesToOrder as $class) {
$table = $this->conn->getTable($class);
$currentClass = $table->getComponentName();

/**
* @var int|false $index
*/
$index = array_search($currentClass, $flushList);

if ($index === false) {
//echo "adding $currentClass to flushlist";
$flushList[] = $currentClass;
$index = max(array_keys($flushList));
$index = (int) max(array_keys($flushList));
}

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

/**
* @var int|false $relatedCompIndex
*/
$relatedCompIndex = array_search($relatedClassName, $flushList);
$type = $rel->getType();

Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<psalm
totallyTyped="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"
errorBaseline="psalm-baseline.xml"
errorLevel="2"
>
<projectFiles>
<directory name="./lib/" />
Expand Down

0 comments on commit 0e53374

Please sign in to comment.