Skip to content

Commit

Permalink
Merge pull request #250 from lptn/remove_outdated_tests
Browse files Browse the repository at this point in the history
Cleanup: remove outdated tests
  • Loading branch information
lptn authored Jan 13, 2023
2 parents 4741f09 + b1b201b commit 39b89bf
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 95 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'

- name: Install dependencies
run: export COMPOSER_ROOT_VERSION=dev-master && composer install --prefer-dist --no-progress --no-suggest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
coverage: none

- name: Install composer dependencies
run: composer install -n --prefer-dist

- name: Run Psalm
run: ./vendor/bin/psalm --threads=2 --shepherd
run: ./vendor/bin/psalm --threads=2 --output-format=github --shepherd
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Packagist version](https://img.shields.io/packagist/v/psalm/plugin-laravel.svg)](https://packagist.org/packages/psalm/plugin-laravel)
[![Packagist downloads](https://img.shields.io/packagist/dt/psalm/plugin-laravel.svg)](https://packagist.org/packages/psalm/plugin-laravel)
[![Type coverage](https://shepherd.dev/github/psalm/laravel-psalm-plugin/coverage.svg)](https://shepherd.dev/github/psalm/laravel-psalm-plugin)
[![Type coverage](https://shepherd.dev/github/psalm/psalm-plugin-laravel/coverage.svg)](https://shepherd.dev/github/psalm/psalm-plugin-laravel)
[![Tests](https://github.com/psalm/psalm-plugin-laravel/actions/workflows/test.yml/badge.svg)](https://github.com/psalm/psalm-plugin-laravel/actions/workflows/test.yml)
[![Tests](https://github.com/psalm/psalm-plugin-laravel/actions/workflows/test-laravel.yml/badge.svg)](https://github.com/psalm/psalm-plugin-laravel/actions/workflows/test-laravel.yml)

Expand Down
23 changes: 0 additions & 23 deletions tests/acceptance/EloquentBuilderTypes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -177,29 +177,6 @@ Feature: Eloquent Builder types
When I run Psalm
Then I see no errors

Scenario: can call firstOrNew and firstOrCreate without parameters in Laravel 8.x
Given I have the "laravel/framework" package satisfying the "^8.0"
And I have the following code
"""
/**
* @psalm-param Builder<User> $builder
* @psalm-return User
*/
function test_firstOrCreate(Builder $builder): User {
return $builder->firstOrCreate();
}
/**
* @psalm-param Builder<User> $builder
* @psalm-return User
*/
function test_firstOrNew(Builder $builder): User {
return $builder->firstOrNew();
}
"""
When I run Psalm
Then I see no errors

Scenario: can call firstOrNew and firstOrCreate without parameters in Laravel 9.x
Given I have the "laravel/framework" package satisfying the "^9.0"
And I have the following code
Expand Down
24 changes: 0 additions & 24 deletions tests/acceptance/EloquentRelationTypes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -356,27 +356,3 @@ Feature: Eloquent Relation types
"""
When I run Psalm
Then I see no errors

Scenario: can call firstOrNew and firstOrCreate without parameters in Laravel 8.x
Given I have the "laravel/framework" package satisfying the ">= 8.0"
And I have the following code
"""
function test_hasOne_firstOrCreate(User $user): Phone {
return $user->phone()->firstOrCreate();
}
function test_hasOne_firstOrNew(User $user): Phone {
return $user->phone()->firstOrNew();
}
function test_hasMany_firstOrCreate(Post $post): Comment {
return $post->comments()->firstOrCreate();
}
function test_hasMany_firstOrNew(Post $post): Comment {
return $post->comments()->firstOrNew();
}
"""
When I run Psalm
Then I see no errors

44 changes: 0 additions & 44 deletions tests/acceptance/FactoryTypes.feature

This file was deleted.

0 comments on commit 39b89bf

Please sign in to comment.