Skip to content

Commit

Permalink
Merge pull request nWidart#1533 from jonquihote/master
Browse files Browse the repository at this point in the history
Support for Laravel 10
  • Loading branch information
dcblogdev authored Feb 16, 2023
2 parents 189449b + 00721e4 commit d000c73
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All Notable changes to `laravel-modules` will be documented in this file.

## Next

## 10.0 - 2022-02-14

### Changed

- Minimum PHP version to 8.1 for supporting Laravel 10
- Laravel 10 version
- Increased PHPUnit to 10.0
- Increased Mockery to 1.5

## Updated

- [@dev-karpenko](https://github.com/dev-karpenko) updated get attributes cache [#1526](https://github.com/nWidart/laravel-modules/pull/1526)
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=8.1",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"mockery/mockery": "^1.4",
"orchestra/testbench": "^7.0",
"phpunit/phpunit": "^10.0",
"mockery/mockery": "^1.5",
"orchestra/testbench": "^8.0",
"friendsofphp/php-cs-fixer": "^3.6",
"laravel/framework": "^9.21",
"spatie/phpunit-snapshot-assertions": "^4.2",
"laravel/framework": "^10.0",
"spatie/phpunit-snapshot-assertions": "^5.0",
"phpstan/phpstan": "^1.4"
},
"autoload": {
Expand All @@ -54,13 +54,13 @@
}
},
"branch-alias": {
"dev-master": "9.0-dev"
"dev-master": "10.0-dev"
}
},
"scripts": {
"update-snapshots": "./vendor/bin/phpunit --no-coverage -d --update-snapshots",
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --debug --coverage-html coverage",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
"pcf": "vendor/bin/php-cs-fixer fix --verbose"
},
"minimum-stability": "dev",
Expand Down
25 changes: 11 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
backupStaticProperties="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Laravel Modules Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<junit outputFile="build/report.junit.xml"/>
</logging>
</phpunit>
2 changes: 1 addition & 1 deletion src/Commands/ModelShowCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Nwidart\Modules\Commands;

use Illuminate\Foundation\Console\ShowModelCommand;
use Illuminate\Database\Console\ShowModelCommand;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand('module:model-show', 'Show information about an Eloquent model in modules')]
Expand Down
1 change: 1 addition & 0 deletions tests/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ protected function getPackageProviders($app)
*/
protected function getEnvironmentSetUp($app)
{
$app['config']->set('app.asset_url', null);
$app['config']->set('database.default', 'sqlite');
$app['config']->set('database.connections.sqlite', [
'driver' => 'sqlite',
Expand Down
2 changes: 1 addition & 1 deletion tests/Commands/ComponentClassMakeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Nwidart\Modules\Tests\BaseTestCase;
use Spatie\Snapshots\MatchesSnapshots;

class ComponentClassCommandTest extends BaseTestCase
class ComponentClassMakeCommandTest extends BaseTestCase
{
use MatchesSnapshots;
/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Commands/ComponentViewMakeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Nwidart\Modules\Tests\BaseTestCase;
use Spatie\Snapshots\MatchesSnapshots;

class ComponentViewCommandTest extends BaseTestCase
class ComponentViewMakeCommandTest extends BaseTestCase
{
use MatchesSnapshots;
/**
Expand Down
2 changes: 1 addition & 1 deletion tests/LaravelModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Nwidart\Modules\Contracts\ActivatorInterface;
use Nwidart\Modules\Json;

class ModuleTest extends BaseTestCase
class LaravelModuleTest extends BaseTestCase
{
/**
* @var TestingModule
Expand Down

0 comments on commit d000c73

Please sign in to comment.