Skip to content

Commit

Permalink
feat!: bump Laravel requirement to 10.x (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander authored Oct 6, 2023
1 parent 950b8fb commit 9d2ae43
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 58 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: true
matrix:
php: [8.1, 8.2]
laravel: [9]
laravel: [10]

name: Integration tests - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
steps:
Expand Down Expand Up @@ -51,6 +51,7 @@ jobs:
- name: Install Hearth
run: |
cd tests/integration
php artisan lang:publish
composer require fluid-project/hearth:dev-${{ env.hearth_version }} --no-interaction
php artisan hearth:install --two-factor --no-interaction
echo 'MAIL_FROM_ADDRESS=from@example.com' >> .env
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
os:
- ubuntu-latest
php: [8.1, 8.2]
laravel: [9.*]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
services:
mysql:
image: mysql:5.7
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
.phpunit.cache
build
composer.lock
coverage
coverage.xml
docs
phpstan.neon
phpunit.xml
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Hearth is a simple starter kit for the Laravel framework. It provides a few thin

## Installation

Hearth requires PHP >= 8.1 and Laravel >= 9.
Hearth requires PHP >= 8.1 and Laravel >= 10.

You may use Composer to install Hearth into your new Laravel project:

Expand Down Expand Up @@ -52,7 +52,7 @@ php artisan storage:link

### Emails

In order to test emails (for example, using Mailhog with [Laravel Sail](https://laravel.com/docs/8.x/sail#previewing-emails)),
In order to test emails (for example, using Mailhog with [Laravel Sail](https://laravel.com/docs/10.x/sail#previewing-emails)),
you must update your Laravel application's `.env` file's `MAIL_FROM_ADDRESS` environment variable with a
properly-formatted email address. For local development, this might be `noreply@hearth.test` (assuming your local
application is accessible at `http://hearth.test`).
Expand Down
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
"require": {
"php": "^8.1",
"chinleung/laravel-locales": "^2.0",
"chinleung/laravel-multilingual-routes": "^3.0",
"chinleung/laravel-multilingual-routes": "^4.0",
"codezero/laravel-unique-translation": "^4.0",
"commerceguys/addressing": "^2.0",
"commerceguys/intl": "^2.0",
"illuminate/contracts": "^9.20",
"laravel/fortify": "^1.10",
"laravel/framework": "^9.21",
"laravel/framework": "^10.0",
"livewire/livewire": "^2.10",
"shiftonelabs/laravel-cascade-deletes": "^2.0",
"spatie/laravel-flash": "^1.9",
Expand All @@ -35,12 +34,12 @@
"spatie/laravel-translatable": "^6.0"
},
"require-dev": {
"brianium/paratest": "^6.2",
"brianium/paratest": "^7.0",
"laravel/pint": "^1.1",
"nunomaduro/collision": "^7.9",
"nunomaduro/larastan": "^2.6",
"orchestra/testbench": "^7.0",
"phpunit/phpunit": "^9.5",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ray": "^1.26"
},
"suggest": {
Expand Down Expand Up @@ -79,7 +78,7 @@
"scripts": {
"format": "vendor/bin/pint",
"analyze": "vendor/bin/phpstan analyse",
"test": "vendor/bin/phpunit --no-coverage",
"test-coverage": "vendor/bin/phpunit --coverage-clover coverage.xml"
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --configuration phpunit-coverage.xml.dist --coverage-clover coverage.xml"
}
}
20 changes: 20 additions & 0 deletions phpunit-coverage.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Hearth Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
<php>
<env name="DB_CONNECTION" value="mysql"/>
<env name="DB_USERNAME" value="root"/>
<env name="DB_DATABASE" value="test"/>
<env name="DB_HOST" value="127.0.0.1"/>
<env name="DB_PORT" value="3306"/>
</php>
</phpunit>
57 changes: 13 additions & 44 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,46 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
<testsuite name="Hearth Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<env name="DB_CONNECTION" value="mysql" />
<env name="DB_USERNAME" value="root" />
<env name="DB_DATABASE" value="test" />
<env name="DB_HOST" value="127.0.0.1" />
<env name="DB_PORT" value="3306" />
</php>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" failOnEmptyTestSuite="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Hearth Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
<env name="DB_CONNECTION" value="mysql"/>
<env name="DB_USERNAME" value="root"/>
<env name="DB_DATABASE" value="test"/>
<env name="DB_HOST" value="127.0.0.1"/>
<env name="DB_PORT" value="3306"/>
</php>
</phpunit>

0 comments on commit 9d2ae43

Please sign in to comment.