Skip to content

Commit

Permalink
[9.x] Improves Support\Collection and `Database\Eloquent\Collection…
Browse files Browse the repository at this point in the history
…` 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>
  • Loading branch information
3 people authored Aug 27, 2021
1 parent 81527e7 commit b1de554
Show file tree
Hide file tree
Showing 14 changed files with 1,755 additions and 500 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: types

on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
linux_tests:
runs-on: ubuntu-20.04

strategy:
fail-fast: true
matrix:
php: ['8.0']
include:
- php: '8.1'
flags: "--ignore-platform-req=php"

name: PHP ${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

- name: Install dependencies
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}

- name: Execute type checking
continue-on-error: ${{ matrix.php > 8 }}
run: vendor/bin/phpstan
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"mockery/mockery": "^1.4.3",
"orchestra/testbench-core": "^7.0",
"pda/pheanstalk": "^4.0",
"phpstan/phpstan": "^0.12.94",
"phpunit/phpunit": "^9.4",
"predis/predis": "^1.1.2",
"symfony/cache": "^6.0"
Expand Down
4 changes: 4 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
paths:
- types
level: max
Loading

0 comments on commit b1de554

Please sign in to comment.