From 9684a4fa5a03dce1dc9a125339c5f743d4ace6ed Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Fri, 28 Jul 2023 11:34:17 -0400 Subject: [PATCH 1/8] Add laravel 10 support In order to add support for laravel 10, this commit adds the necessary version to the `composer.json` file and updates the `CHANGELOG.md`. --- .github/workflows/run-tests.yml | 8 ++++++-- CHANGELOG.md | 4 ++++ composer.json | 8 ++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6d79227..655fc37 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,17 +12,21 @@ jobs: strategy: fail-fast: true matrix: - php: [8.0, 7.4] - laravel: [9.*,8.*] + php: [8.1, 8.0, 7.4] + laravel: [10.*,9.*,8.*] dependency-version: [prefer-lowest, prefer-stable] exclude: - laravel: 9.* php: 7.4 + - laravel: 10.* + php: 7.4,8.0 include: - laravel: 8.* testbench: 6.* - laravel: 9.* testbench: 7.* + - laravel: 10.* + testbench: 8.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 029160c..9968e0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `laravel-unavatar` will be documented in this file +## 0.4.0 - 2023-07-28 + +- add Laravel 10 support + ## 0.3.0 - 2022-04-08 - add Laravel 9 support diff --git a/composer.json b/composer.json index 8425934..985f126 100644 --- a/composer.json +++ b/composer.json @@ -25,15 +25,15 @@ "source": "https://github.com/Astrotomic/laravel-unavatar" }, "require": { - "php": "^7.4 || ^8.0", + "php": "^7.4 || ^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" + "illuminate/support": "^8.0 || ^9.0 || ^10.0", + "illuminate/view": "^8.0 || ^9.0 || ^10.0" }, "require-dev": { "gajus/dindent": "^2.0", - "orchestra/testbench": "^6.0 || ^7.0", + "orchestra/testbench": "^6.0 || ^7.0 || ^8.0", "phpunit/phpunit": "^9.3" }, "autoload": { From 30bd3ea0bd6acc92849392da98ae758ed7898204 Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Fri, 28 Jul 2023 11:39:57 -0400 Subject: [PATCH 2/8] Allow normalize plug to run In order to run compose normalize, this commit add the command to allow it to run as a plugin in the config. --- .github/workflows/composer-normalize.yml | 1 + .github/workflows/run-tests.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/composer-normalize.yml b/.github/workflows/composer-normalize.yml index fb8b369..f77ad61 100644 --- a/.github/workflows/composer-normalize.yml +++ b/.github/workflows/composer-normalize.yml @@ -19,6 +19,7 @@ jobs: - name: Normalize composer.json run: | composer global require ergebnis/composer-normalize + composer config allow-plugins.ergebnis/composer-normalize true composer normalize --indent-style=space --indent-size=4 --no-check-lock --no-update-lock --no-interaction --ansi - uses: stefanzweifel/git-auto-commit-action@v4.0.0 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 655fc37..1e4a612 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,7 +19,9 @@ jobs: - laravel: 9.* php: 7.4 - laravel: 10.* - php: 7.4,8.0 + php: 7.4 + - laravel: 10.* + php: 8.0 include: - laravel: 8.* testbench: 6.* From 1a9259171590dfc58f2117d6318d4839ca83b8d8 Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Fri, 28 Jul 2023 11:55:49 -0400 Subject: [PATCH 3/8] Update test to use new url This commit updates all the test to use the new unavatar.io url. --- tests/ComponentTest.php | 10 +++++----- tests/UnavatarTest.php | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/ComponentTest.php b/tests/ComponentTest.php index eab8f43..d583068 100644 --- a/tests/ComponentTest.php +++ b/tests/ComponentTest.php @@ -9,7 +9,7 @@ public function it_can_render(): void { $expected = <<<'HTML' Astrotomic avatar @@ -23,7 +23,7 @@ public function it_can_render_with_fallback(): void { $expected = <<<'HTML' astrotomic.info avatar @@ -37,7 +37,7 @@ public function it_can_render_clearbit(): void { $expected = <<<'HTML' astrotomic.info avatar @@ -51,7 +51,7 @@ public function it_can_render_deviantart(): void { $expected = <<<'HTML' astrotomic avatar @@ -65,7 +65,7 @@ public function it_can_render_dribbble(): void { $expected = <<<'HTML' astrotomic avatar diff --git a/tests/UnavatarTest.php b/tests/UnavatarTest.php index c94ee94..7ec8afe 100644 --- a/tests/UnavatarTest.php +++ b/tests/UnavatarTest.php @@ -20,7 +20,7 @@ public function it_is_renderable(): void $unavatar = Unavatar::github('Gummibeer'); static::assertArrayHasKey(Renderable::class, class_implements($unavatar)); - static::assertSame('Gummibeer\'s github avatar', $unavatar->render()); + static::assertSame('Gummibeer\'s github avatar', $unavatar->render()); } /** @test */ @@ -29,7 +29,7 @@ public function it_is_htmlable(): void $unavatar = Unavatar::github('Gummibeer'); static::assertArrayHasKey(Htmlable::class, class_implements($unavatar)); - static::assertSame('Gummibeer\'s github avatar', $unavatar->toHtml()); + static::assertSame('Gummibeer\'s github avatar', $unavatar->toHtml()); } /** @test */ @@ -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 */ From 9659c05acc737e4eaa6592a516cc5637c0fb8da1 Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Fri, 28 Jul 2023 11:58:47 -0400 Subject: [PATCH 4/8] Exclude laravel 8 with php 8.1 --- .github/workflows/run-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 1e4a612..f9c0bfe 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,6 +16,8 @@ jobs: laravel: [10.*,9.*,8.*] dependency-version: [prefer-lowest, prefer-stable] exclude: + - laravel: 8.* + php: 8.1 - laravel: 9.* php: 7.4 - laravel: 10.* From 6c6a04a4d30bfd79a0e6688a9126b7744362a08c Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Fri, 28 Jul 2023 12:01:37 -0400 Subject: [PATCH 5/8] Fix test to use html safe charaters --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 985f126..f6d959b 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "require": { "php": "^7.4 || ^8.0 || ^8.1", "ext-json": "*", - "astrotomic/php-unavatar": "^0.2.0 || ^0.3.0", + "astrotomic/php-unavatar": "^0.3.0", "illuminate/support": "^8.0 || ^9.0 || ^10.0", "illuminate/view": "^8.0 || ^9.0 || ^10.0" }, From e605020a280b4d2e82a2dcdad90dca132fdb0626 Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Mon, 7 Aug 2023 09:43:05 -0400 Subject: [PATCH 6/8] Remove support for Laravel 8 as it is end of life. --- .github/workflows/run-tests.yml | 12 ++---------- CHANGELOG.md | 1 + composer.json | 10 +++++----- tests/UnavatarTest.php | 4 ++-- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f9c0bfe..996a1cc 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,21 +12,13 @@ jobs: strategy: fail-fast: true matrix: - php: [8.1, 8.0, 7.4] - laravel: [10.*,9.*,8.*] + php: [8.1, 8.0] + laravel: [10.*,9.*] dependency-version: [prefer-lowest, prefer-stable] exclude: - - laravel: 8.* - php: 8.1 - - laravel: 9.* - php: 7.4 - - laravel: 10.* - php: 7.4 - laravel: 10.* php: 8.0 include: - - laravel: 8.* - testbench: 6.* - laravel: 9.* testbench: 7.* - laravel: 10.* diff --git a/CHANGELOG.md b/CHANGELOG.md index 9968e0a..1ac0002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to `laravel-unavatar` will be documented in this file ## 0.4.0 - 2023-07-28 - add Laravel 10 support +- drop Laravel 8 support ## 0.3.0 - 2022-04-08 diff --git a/composer.json b/composer.json index f6d959b..4621983 100644 --- a/composer.json +++ b/composer.json @@ -25,16 +25,16 @@ "source": "https://github.com/Astrotomic/laravel-unavatar" }, "require": { - "php": "^7.4 || ^8.0 || ^8.1", + "php": "^8.0 || ^8.1", "ext-json": "*", "astrotomic/php-unavatar": "^0.3.0", - "illuminate/support": "^8.0 || ^9.0 || ^10.0", - "illuminate/view": "^8.0 || ^9.0 || ^10.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 || ^8.0", - "phpunit/phpunit": "^9.3" + "orchestra/testbench": "^7.0 || ^8.0", + "phpunit/phpunit": "^9.0 || ^10.0" }, "autoload": { "psr-4": { diff --git a/tests/UnavatarTest.php b/tests/UnavatarTest.php index 7ec8afe..df88d3c 100644 --- a/tests/UnavatarTest.php +++ b/tests/UnavatarTest.php @@ -20,7 +20,7 @@ public function it_is_renderable(): void $unavatar = Unavatar::github('Gummibeer'); static::assertArrayHasKey(Renderable::class, class_implements($unavatar)); - static::assertSame('Gummibeer\'s github avatar', $unavatar->render()); + static::assertSame('Gummibeer's github avatar', $unavatar->render()); } /** @test */ @@ -29,7 +29,7 @@ public function it_is_htmlable(): void $unavatar = Unavatar::github('Gummibeer'); static::assertArrayHasKey(Htmlable::class, class_implements($unavatar)); - static::assertSame('Gummibeer\'s github avatar', $unavatar->toHtml()); + static::assertSame('Gummibeer's github avatar', $unavatar->toHtml()); } /** @test */ From 7d8036b6739363f0ddf0d268d92c8c726a0fa7d8 Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Thu, 17 Aug 2023 15:54:59 -0400 Subject: [PATCH 7/8] Remove support for php 8.0 as it is approaching EOL --- .github/workflows/composer-normalize.yml | 4 +++- .github/workflows/run-tests.yml | 5 +---- composer.json | 3 --- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/composer-normalize.yml b/.github/workflows/composer-normalize.yml index f77ad61..1beb045 100644 --- a/.github/workflows/composer-normalize.yml +++ b/.github/workflows/composer-normalize.yml @@ -16,10 +16,12 @@ jobs: - name: Validate Composer configuration run: composer validate --strict + # - name: Run composer normalize + # uses: docker://ergebnis/composer-normalize-action:latest - name: Normalize composer.json run: | composer global require ergebnis/composer-normalize - composer config allow-plugins.ergebnis/composer-normalize true + # composer normalize composer normalize --indent-style=space --indent-size=4 --no-check-lock --no-update-lock --no-interaction --ansi - uses: stefanzweifel/git-auto-commit-action@v4.0.0 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 996a1cc..c1aa3fc 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,12 +12,9 @@ jobs: strategy: fail-fast: true matrix: - php: [8.1, 8.0] + php: [8.2,8.1] laravel: [10.*,9.*] dependency-version: [prefer-lowest, prefer-stable] - exclude: - - laravel: 10.* - php: 8.0 include: - laravel: 9.* testbench: 7.* diff --git a/composer.json b/composer.json index 4621983..7607d0b 100644 --- a/composer.json +++ b/composer.json @@ -46,9 +46,6 @@ "Astrotomic\\Unavatar\\Laravel\\Tests\\": "tests" } }, - "config": { - "sort-packages": true - }, "extra": { "laravel": { "providers": [ From b750ed7eccc97f8e668a1c7b58036f1c7578f13d Mon Sep 17 00:00:00 2001 From: Mark Myers Date: Thu, 21 Sep 2023 00:36:58 -0400 Subject: [PATCH 8/8] Update changelog for new version This commit also updates the CHANGELOG.md file to hopefully add new version for the release. --- .github/workflows/composer-normalize.yml | 3 --- CHANGELOG.md | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/composer-normalize.yml b/.github/workflows/composer-normalize.yml index 1beb045..fb8b369 100644 --- a/.github/workflows/composer-normalize.yml +++ b/.github/workflows/composer-normalize.yml @@ -16,12 +16,9 @@ jobs: - name: Validate Composer configuration run: composer validate --strict - # - name: Run composer normalize - # uses: docker://ergebnis/composer-normalize-action:latest - name: Normalize composer.json run: | composer global require ergebnis/composer-normalize - # composer normalize composer normalize --indent-style=space --indent-size=4 --no-check-lock --no-update-lock --no-interaction --ansi - uses: stefanzweifel/git-auto-commit-action@v4.0.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ac0002..4dd12c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to `laravel-unavatar` will be documented in this file -## 0.4.0 - 2023-07-28 +## 0.5.0 - 2023-07-28 - add Laravel 10 support - drop Laravel 8 support