-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
* 2.3.x: Bump doctrine/.github from 5.0.0 to 5.0.1 Set label of GH actions dependabot PRs to CI Bump ramsey/composer-install from 2 to 3 (#417) Bump actions/checkout from 3 to 4 Pass CODECOV_TOKEN to the shared workflow Bump doctrine/.github from 1.5.0 to 5.0.0 Enable dependabot Add tests Repeat closure type Add isNotNull to ExpressionBuilder (#408)
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
labels: | ||
- "CI" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,6 @@ on: | |
jobs: | ||
coding-standards: | ||
name: "Coding Standards" | ||
uses: "doctrine/.github/.github/workflows/coding-standards.yml@1.5.0" | ||
uses: "doctrine/.github/.github/workflows/[email protected].1" | ||
with: | ||
php-version: "8.1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,6 @@ on: | |
jobs: | ||
composer-lint: | ||
name: "Composer Lint" | ||
uses: "doctrine/.github/.github/workflows/composer-lint.yml@1.5.0" | ||
uses: "doctrine/.github/.github/workflows/[email protected].1" | ||
with: | ||
php-version: "8.1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ on: | |
jobs: | ||
phpunit: | ||
name: "PHPUnit" | ||
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@1.5.0" | ||
uses: "doctrine/.github/.github/workflows/[email protected].1" | ||
with: | ||
php-versions: '["8.1"]' | ||
secrets: | ||
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
jobs: | ||
release: | ||
name: "Git tag, release & create merge-up PR" | ||
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@1.5.0" | ||
uses: "doctrine/.github/.github/workflows/[email protected].1" | ||
secrets: | ||
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | ||
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,6 @@ on: | |
jobs: | ||
static-analysis: | ||
name: "Static Analysis" | ||
uses: "doctrine/.github/.github/workflows/static-analysis.yml@1.5.0" | ||
uses: "doctrine/.github/.github/workflows/[email protected].1" | ||
with: | ||
php-version: "8.1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Doctrine\Tests\Common\Collections\StaticAnalysis; | ||
|
||
use Closure; | ||
use Doctrine\Common\Collections\ArrayCollection; | ||
use Doctrine\Common\Collections\Collection; | ||
|
||
/** | ||
* @phpstan-template TKey of array-key | ||
* @phpstan-template T of object | ||
* @phpstan-implements Collection<TKey, T> | ||
*/ | ||
abstract class CustomCollection implements Collection | ||
Check failure on line 16 in tests/StaticAnalysis/CustomCollection.php GitHub Actions / Static Analysis / Psalm (8.1)MethodSignatureMismatch
Check failure on line 16 in tests/StaticAnalysis/CustomCollection.php GitHub Actions / Static Analysis / Psalm (8.1)MethodSignatureMismatch
Check failure on line 16 in tests/StaticAnalysis/CustomCollection.php GitHub Actions / Static Analysis / Psalm (8.1)MethodSignatureMismatch
Check failure on line 16 in tests/StaticAnalysis/CustomCollection.php GitHub Actions / Static Analysis / Psalm (8.1)MethodSignatureMismatch
|
||
{ | ||
/** @var ArrayCollection<TKey, T> */ | ||
private ArrayCollection $collection; | ||
|
||
/** @param ArrayCollection<TKey, T> $arrayCollection */ | ||
public function __construct(ArrayCollection $arrayCollection) | ||
{ | ||
$this->collection = $arrayCollection; | ||
} | ||
|
||
/** | ||
* @psalm-param Closure(T, TKey):bool $p | ||
* | ||
* @return Collection<TKey, T> | ||
*/ | ||
public function filter(Closure $p) | ||
Check failure on line 32 in tests/StaticAnalysis/CustomCollection.php GitHub Actions / Static Analysis / PHPStan (8.1)
Check failure on line 32 in tests/StaticAnalysis/CustomCollection.php GitHub Actions / Coding Standards / Coding Standards (8.1)
|
||
{ | ||
return $this->collection->filter($p); | ||
} | ||
|
||
/** | ||
* @psalm-param Closure(TKey, T):bool $p | ||
* | ||
* @psalm-return array{0: Collection<TKey, T>, 1: Collection<TKey, T>} | ||
*/ | ||
public function partition(Closure $p) | ||
Check failure on line 42 in tests/StaticAnalysis/CustomCollection.php GitHub Actions / Static Analysis / PHPStan (8.1)
|
||
{ | ||
return $this->collection->partition($p); | ||
} | ||
} |