Skip to content

Commit

Permalink
Merge pull request #8 from b4mtech/main
Browse files Browse the repository at this point in the history
Add Laravel 10 Support
  • Loading branch information
Gummibeer authored Jun 25, 2024
2 parents 9483e37 + 20aac5e commit ecc99d5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.0, 7.4]
laravel: [9.*,8.*]
php: [8.2,8.1]
laravel: [10.*,9.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: 9.*
php: 7.4
include:
- laravel: 8.*
testbench: 6.*
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to `laravel-unavatar` will be documented in this file

## 0.5.0 - 2023-07-28

- add Laravel 10 support
- drop Laravel 8 support

## 0.3.0 - 2022-04-08

- add Laravel 9 support
Expand Down
15 changes: 6 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
"source": "https://github.com/Astrotomic/laravel-unavatar"
},
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.0 || ^8.1",
"ext-json": "*",
"astrotomic/php-unavatar": "^0.2.0 || ^0.3.0",
"illuminate/support": "^8.0 || ^9.0",
"illuminate/view": "^8.0 || ^9.0"
"astrotomic/php-unavatar": "^0.3.0",
"illuminate/support": "^9.0 || ^10.0",
"illuminate/view": "^9.0 || ^10.0"
},
"require-dev": {
"gajus/dindent": "^2.0",
"orchestra/testbench": "^6.0 || ^7.0",
"phpunit/phpunit": "^9.3"
"orchestra/testbench": "^7.0 || ^8.0",
"phpunit/phpunit": "^9.0 || ^10.0"
},
"autoload": {
"psr-4": {
Expand All @@ -46,9 +46,6 @@
"Astrotomic\\Unavatar\\Laravel\\Tests\\": "tests"
}
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
Expand Down
10 changes: 5 additions & 5 deletions tests/ComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public function it_can_render(): void
{
$expected = <<<'HTML'
<img
src="https://unavatar.now.sh/astrotomic.info"
src="https://unavatar.io/astrotomic.info"
alt="Astrotomic avatar"
loading="lazy"
/>
Expand All @@ -23,7 +23,7 @@ public function it_can_render_with_fallback(): void
{
$expected = <<<'HTML'
<img
src="https://unavatar.now.sh/astrotomic.info/?fallback=https%3A%2F%2Fexample.com%2Favatar.jpg"
src="https://unavatar.io/astrotomic.info/?fallback=https%3A%2F%2Fexample.com%2Favatar.jpg"
alt="astrotomic.info avatar"
loading="lazy"
/>
Expand All @@ -37,7 +37,7 @@ public function it_can_render_clearbit(): void
{
$expected = <<<'HTML'
<img
src="https://unavatar.now.sh/clearbit/astrotomic.info"
src="https://unavatar.io/clearbit/astrotomic.info"
alt="astrotomic.info avatar"
loading="lazy"
/>
Expand All @@ -51,7 +51,7 @@ public function it_can_render_deviantart(): void
{
$expected = <<<'HTML'
<img
src="https://unavatar.now.sh/deviantart/astrotomic"
src="https://unavatar.io/deviantart/astrotomic"
alt="astrotomic avatar"
loading="lazy"
/>
Expand All @@ -65,7 +65,7 @@ public function it_can_render_dribbble(): void
{
$expected = <<<'HTML'
<img
src="https://unavatar.now.sh/dribbble/astrotomic"
src="https://unavatar.io/dribbble/astrotomic"
alt="astrotomic avatar"
loading="lazy"
/>
Expand Down
6 changes: 3 additions & 3 deletions tests/UnavatarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function it_is_renderable(): void
$unavatar = Unavatar::github('Gummibeer');

static::assertArrayHasKey(Renderable::class, class_implements($unavatar));
static::assertSame('<img alt="Gummibeer\'s github avatar" src="https://unavatar.now.sh/github/Gummibeer" />', $unavatar->render());
static::assertSame('<img alt="Gummibeer&#039;s github avatar" src="https://unavatar.io/github/Gummibeer" />', $unavatar->render());
}

/** @test */
Expand All @@ -29,7 +29,7 @@ public function it_is_htmlable(): void
$unavatar = Unavatar::github('Gummibeer');

static::assertArrayHasKey(Htmlable::class, class_implements($unavatar));
static::assertSame('<img alt="Gummibeer\'s github avatar" src="https://unavatar.now.sh/github/Gummibeer" />', $unavatar->toHtml());
static::assertSame('<img alt="Gummibeer&#039;s github avatar" src="https://unavatar.io/github/Gummibeer" />', $unavatar->toHtml());
}

/** @test */
Expand All @@ -42,7 +42,7 @@ public function it_is_responsable_redirect(): void
$redirect = $unavatar->toResponse(Request::createFromGlobals());

static::assertInstanceOf(RedirectResponse::class, $redirect);
static::assertSame('https://unavatar.now.sh/github/Gummibeer', $redirect->getTargetUrl());
static::assertSame('https://unavatar.io/github/Gummibeer', $redirect->getTargetUrl());
}

/** @test */
Expand Down

0 comments on commit ecc99d5

Please sign in to comment.