Skip to content

Commit b1de554

Browse files
nunomadurotaylorotwelldriesvints
authored
[9.x] Improves Support\Collection and Database\Eloquent\Collection type definitions (#38538)
* Adds CI workflow * Adds phpstan * Adds work in progress regarding generic collections * Fixes missing template * Renames template * Updates test * Apply fixes from StyleCI * Adds work in progress regarding generic collections * Adds work in progress regarding generic collections * Adds work in progress regarding generic collections * Adds work in progress regarding generic collections * Adds work in progress regarding generic collections * Styling * Apply fixes from StyleCI * Apply fixes from StyleCI * Adds work in progress regarding generic collections * Remove work on Models * Revert "Remove work on Models" This reverts commit d6c4291. * Removes `prefer-lowest` * Removes non needed code on CI job Co-authored-by: Dries Vints <dries@vints.io> * Fixes `Eloquent\Collection::load` types * Adds work in progress regarding generic collections * Fixes `Eloquent\Collection::load` related methods Co-authored-by: Taylor Otwell <taylorotwell@users.noreply.github.com> Co-authored-by: Dries Vints <dries@vints.io>
1 parent 81527e7 commit b1de554

File tree

14 files changed

+1755
-500
lines changed

14 files changed

+1755
-500
lines changed

.github/workflows/types.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: types
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
linux_tests:
11+
runs-on: ubuntu-20.04
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
php: ['8.0']
17+
include:
18+
- php: '8.1'
19+
flags: "--ignore-platform-req=php"
20+
21+
name: PHP ${{ matrix.php }}
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v2
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php }}
31+
tools: composer:v2
32+
coverage: none
33+
34+
- name: Install dependencies
35+
uses: nick-invision/retry@v1
36+
with:
37+
timeout_minutes: 5
38+
max_attempts: 5
39+
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}
40+
41+
- name: Execute type checking
42+
continue-on-error: ${{ matrix.php > 8 }}
43+
run: vendor/bin/phpstan

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"mockery/mockery": "^1.4.3",
8989
"orchestra/testbench-core": "^7.0",
9090
"pda/pheanstalk": "^4.0",
91+
"phpstan/phpstan": "^0.12.94",
9192
"phpunit/phpunit": "^9.4",
9293
"predis/predis": "^1.1.2",
9394
"symfony/cache": "^6.0"

phpstan.neon.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
paths:
3+
- types
4+
level: max

0 commit comments

Comments
 (0)