Skip to content

Commit

Permalink
support laravel 10 and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PyaeSoneAungRgn committed Apr 9, 2023
1 parent c49befa commit 05aaead
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 47 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/run-tests.yml.bk
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
php: [8.2, 8.1]
laravel: [9.*]
laravel: [9.*, 10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"require": {
"php": "^8.1",
"spatie/laravel-package-tools": "^1.13.0",
"illuminate/contracts": "^9.0",
"illuminate/support": "^9.0",
"illuminate/contracts": "^9.0|^10.0",
"guzzlehttp/guzzle": "^7.0"
},
"require-dev": {
Expand Down
8 changes: 0 additions & 8 deletions docs/predictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,3 @@ use SportmonksFootballApi;

SportmonksFootballApi::prediction()->valueBets();
```

## GET Value Bets by Fixture ID

```php
use SportmonksFootballApi;

SportmonksFootballApi::prediction()->valueBetsByFixtureId($fixtureId);
```
8 changes: 0 additions & 8 deletions docs/rivals.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ use SportmonksFootballApi;

SportmonksFootballApi::rival()->all();
```

## GET Rivals by Team ID

```php
use SportmonksFootballApi;

SportmonksFootballApi::rival()->byTeamId($teamId);
```
5 changes: 5 additions & 0 deletions docs/version-history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Version History

- 1.1.0
- support laravel 10
- fixed `league()->byFixtureDate()`
- removed `prediction()->valueBetsByFixtureId()`
- removed `rival()->byTeamId()`
- 1.0.1
- bug fixed `setFilter`
- 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/LeagueResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function byLive(): array
public function byFixtureDate(string $date): array
{
return $this->get(
url: "leagues/fixtures/date/{$date}"
url: "leagues/date/{$date}"
);
}

Expand Down
7 changes: 0 additions & 7 deletions src/Resources/PredictionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,4 @@ public function valueBets(): array
url: 'predictions/value-bets'
);
}

public function valueBetsByFixtureId(int|string $id): array
{
return $this->get(
url: "predictions/value-bets/fixture/{$id}"
);
}
}
7 changes: 0 additions & 7 deletions src/Resources/RivalResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@ public function all(): array
url: 'rivals'
);
}

public function byTeamId(int|string $id): array
{
return $this->get(
url: "teams/rivals/{$id}"
);
}
}
6 changes: 0 additions & 6 deletions tests/Feature/PredictionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,3 @@
it('can get value bets', function () {
expect(football()->prediction()->valueBets())->toBeArray();
});

it('can get value bets by fixture id', function () {
expect(football()->prediction()->valueBetsByFixtureId(
id: 10336114
))->toBeArray();
});
6 changes: 0 additions & 6 deletions tests/Feature/RivalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@
it('can get all rivals', function () {
expect(football()->rival()->all())->toBeArray();
});

it('can get rivals by team id', function () {
expect(football()->rival()->byTeamId(
id: 1
))->toBeArray();
});

1 comment on commit 05aaead

@vercel
Copy link

@vercel vercel bot commented on 05aaead Apr 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.