Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Add PHP 8.2 support (#23)
Browse files Browse the repository at this point in the history
* Added PHP 8.2 support
* Dropped PHP 8.0 support
  • Loading branch information
Okipa committed Dec 23, 2022
1 parent fe56b22 commit 2f12aa9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ['8.1', '8.0']
php: ['8.2', '8.1']
laravel: ['9.*', '8.*']
include:
- laravel: '9.*'
Expand Down Expand Up @@ -53,13 +53,13 @@ jobs:
# Lower PHP and laravel versions.

- name: PHPUnit without code coverage
if: matrix.php != '8.1' || matrix.laravel != '9.*'
if: matrix.php != '8.2' || matrix.laravel != '9.*'
run: vendor/bin/testbench package:test --parallel --no-coverage

# Last PHP and laravel versions.

- name: Code analysis
if: matrix.php == '8.1' && matrix.laravel == '9.*'
if: matrix.php == '8.2' && matrix.laravel == '9.*'
run: |
# Remove this line once Larastan and Livewire are working well together
sed -i -e 's#.*protected \$enablesPackageDiscoveries.*#&\nprotected function overrideApplicationBindings($app){return["brickables"=>"Okipa\\\\LaravelBrickables\\\\Brickables"];}#' vendor/nunomaduro/larastan/src/ApplicationResolver.php
Expand All @@ -68,13 +68,13 @@ jobs:
vendor/bin/phpstan analyse
- name: PHPUnit with code coverage
if: matrix.php == '8.1' && matrix.laravel == '9.*'
if: matrix.php == '8.2' && matrix.laravel == '9.*'
run: |
mkdir -p build/logs
vendor/bin/testbench package:test --parallel --coverage-text --coverage-clover build/logs/clover.xml
- name: Code coverage upload to Coveralls
if: env.COVERALLS_REPO_TOKEN && matrix.php == '8.1' && matrix.laravel == '9.*'
if: env.COVERALLS_REPO_TOKEN && matrix.php == '8.2' && matrix.laravel == '9.*'
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [3.1.0](https://github.com/Okipa/laravel-brickables/compare/3.0.1...3.1.0)

2022-12-23

* Added PHP 8.2 support
* Dropped PHP 8.0 support

## [3.0.1](https://github.com/Okipa/laravel-brickables/compare/3.0.0...3.0.1)

2022-10-27
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Found this package helpful? Please consider supporting my work!

| Laravel version | PHP version | Package version |
|---|---|---|
| ^8.0 | ^9.0 | ^8.1 | ^8.2 | ^3.1 |
| ^8.0 | ^9.0 | ^8.0 | ^8.1 | ^3.0 |
| ^7.0 | ^8.0 | ^7.4 | ^8.0 | ^2.0 |
| ^5.8 | ^6.0 | ^7.0 | ^7.1 | ^7.2 | ^7.3 | ^7.4 | ^1.0 |
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
],
"require": {
"php": "^8.0|^8.1",
"php": "^8.1|^8.2",
"illuminate/contracts": "^8.0|^9.0",
"spatie/eloquent-sortable": "^3.10.0|^4.0.1"
},
Expand Down
8 changes: 8 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,13 @@
</coverage>
<php>
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
<server name="APP_ENV" value="testing"/>
<server name="LOG_CHANNEL" value="null"/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<server name="MAIL_MAILER" value="array"/>
<server name="SESSION_DRIVER" value="array"/>
</php>
</phpunit>
11 changes: 0 additions & 11 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@

abstract class TestCase extends Orchestra
{
protected function getEnvironmentSetUp($app): void
{
// Setup default database to use sqlite :memory:
$app['config']->set('database.default', 'testing');
$app['config']->set('database.connections.testing', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
}

protected function getPackageProviders($app): array
{
return [BrickablesServiceProvider::class];
Expand Down

0 comments on commit 2f12aa9

Please sign in to comment.