Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.1 Support #32

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
php: [8.0, 7.4, 7.3]
php: [8.1, 8.0, 7.4, 7.3]

name: P${{ matrix.php }}

Expand All @@ -46,4 +46,4 @@ jobs:

- name: Execute Tests
run: composer tests


17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@
],
"prefer-stable": true,
"require": {
"php": "^7.3|^8.0",
"illuminate/console": "~5.8.0|^6.0|^7.0|^8.0|^9.0",
"illuminate/database": "~5.8.0|^6.0|^7.0|^8.0|^9.0",
"illuminate/events": "~5.8.0|^6.0|^7.0|^8.0|^9.0",
"illuminate/filesystem": "~5.8.0|^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0"
"php": "^7.3|^8.0|^8.1",
"illuminate/console": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/database": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/events": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/filesystem": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0"
},
"require-dev": {
"orchestra/testbench": "^5",
"squizlabs/php_codesniffer": "^3.7"
"orchestra/testbench": "^6|^7|^8",
"squizlabs/php_codesniffer": "^3.7",
"laravel/legacy-factories": "^1.3"
},
"autoload": {
"psr-0": {
Expand Down
6 changes: 1 addition & 5 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<testsuites>
<testsuite name="Baseline Eloquent Test">
Expand All @@ -23,4 +19,4 @@
<logging>
<text outputFile="build/coverage.txt"/>
</logging>
</phpunit>
</phpunit>
2 changes: 0 additions & 2 deletions tests/Basic/BasicBaumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,9 @@ public function makeBaumTest()
$model = $faker->domainWord . rand(1, 9999);

$this->artisan('make:baum ' . $model)
->expectsOutput('Model created successfully.')
->assertExitCode(0);

$this->artisan('make:baum ' . $model . ' --force')
->expectsOutput('Model created successfully.')
->assertExitCode(0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Baum\Tests\Main\Models\SoftCategory;
use Baum\Tests\Main\Support\PopulateData;

trait NodeModelExtensionsTest
trait NodeModelExtensionsTestTrait
{
protected function categories($name, $className = Category::class)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Main/Standard/CategoryColumnsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Baum\Tests\Main\Standard;

use Baum\Tests\Main\Concerns\NodeModelExtensionsTest;
use Baum\Tests\Main\Concerns\NodeModelExtensionsTestTrait;
use Baum\Tests\Main\Models\Category;
use Baum\Tests\Main\Models\MultiScopedCategory;
use Baum\Tests\Main\Models\OrderedCategory;
Expand All @@ -16,7 +16,7 @@
class CategoryColumnsTest extends UnitAbstract
{
//use Cast, Testable;
use NodeModelExtensionsTest;
use NodeModelExtensionsTestTrait;

public function testGetParentColumnName()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Main/Standard/CategoryCustomEventsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Baum\Tests\Main\Standard;

use Baum\Tests\Main\Concerns\NodeModelExtensionsTest;
use Baum\Tests\Main\Concerns\NodeModelExtensionsTestTrait;
use Baum\Tests\Main\Models\Category;
use Baum\Tests\Main\Support\PopulateData;
use Baum\Tests\Main\UnitAbstract;
use Illuminate\Support\Facades\Event;

class CategoryCustomEventsTest extends UnitAbstract
{
use NodeModelExtensionsTest;
use NodeModelExtensionsTestTrait;

public function testMovingEventFired()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Main/Standard/CategoryHierarchyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Baum\Tests\Main\Standard;

use Baum\Tests\Main\Concerns\NodeModelExtensionsTest;
use Baum\Tests\Main\Concerns\NodeModelExtensionsTestTrait;
use Baum\Tests\Main\Models\Category;
use Baum\Tests\Main\Support\MyTrait;
use Baum\Tests\Main\Support\PopulateData;
Expand All @@ -12,7 +12,7 @@
class CategoryHierarchyTest extends UnitAbstract
{
use MyTrait;
use NodeModelExtensionsTest;
use NodeModelExtensionsTestTrait;

public function testAllStatic()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Main/Standard/CategoryMovementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace Baum\Tests\Main\Standard;

use Baum\Exceptions\MoveNotPossibleException;
use Baum\Tests\Main\Concerns\NodeModelExtensionsTest;
use Baum\Tests\Main\Concerns\NodeModelExtensionsTestTrait;
use Baum\Tests\Main\Models\Category;
use Baum\Tests\Main\Support\PopulateData;
use Baum\Tests\Main\UnitAbstract;

class CategoryMovementTest extends UnitAbstract
{
use NodeModelExtensionsTest;
use NodeModelExtensionsTestTrait;

public function testMoveLeft()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Main/Standard/CategoryMultiScopedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Baum\Tests\Main\Standard;

use Baum\Exceptions\MoveNotPossibleException;
use Baum\Tests\Main\Concerns\NodeModelExtensionsTest;
use Baum\Tests\Main\Concerns\NodeModelExtensionsTestTrait;
use Baum\Tests\Main\Models\MultiScopedCategory;
use Baum\Tests\Main\Models\OrderedScopedCategory;
use Baum\Tests\Main\Models\ScopedCategory;
Expand All @@ -21,7 +21,7 @@ class CategoryMultiScopedTest extends UnitAbstract
// with(new MultiScopedCategorySeeder())->run();
// }
use MyTrait;
use NodeModelExtensionsTest;
use NodeModelExtensionsTestTrait;

public function testInSameScope()
{
Expand Down
Loading