Skip to content

Commit

Permalink
Merge pull request #25 from eXolnet/feature/laravel11-support
Browse files Browse the repository at this point in the history
build(deps): add Laravel 11 support
  • Loading branch information
xel1045 authored Mar 26, 2024
2 parents b3574e9 + bfe8f63 commit 23929db
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 25 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ jobs:
fail-fast: true
matrix:
php: [8.1, 8.2]
laravel: [10.*]
laravel: [10.*, 11.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- php: 8.1
laravel: 11.*
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
],
"require": {
"php": "^8.1",
"illuminate/console": "^10.0",
"illuminate/contracts": "^10.0",
"illuminate/http": "^10.0",
"illuminate/support": "^10.0",
"illuminate/routing": "^10.0",
"illuminate/translation": "^10.0"
"illuminate/console": "^10.0|^11.0",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/http": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"illuminate/routing": "^10.0|^11.0",
"illuminate/translation": "^10.0|^11.0"
},
"require-dev": {
"mockery/mockery": "^1.4",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^9.3.3",
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
Expand Down
21 changes: 8 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<source>
<include>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Unit/TranslationEditorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Illuminate\Filesystem\Filesystem;
use Mockery as m;

class TranslationEditorTest extends UnitTest
class TranslationEditorTest extends UnitTestCase
{
/**
* @var \Mockery\MockInterface|\Exolnet\Translation\Editor\TranslationEditor
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Exolnet\Translation\Editor\Translator;
use Mockery as m;

class TranslatorTest extends UnitTest
class TranslatorTest extends UnitTestCase
{
/** @var \Mockery\Mock|\Exolnet\Translation\Editor\Translator*/
private $translator;
Expand Down Expand Up @@ -83,6 +83,7 @@ private function tryCatchUndefinedIndex(string $locale, string $namespace): void
{
try {
$this->translator->getAllVariables($locale, $namespace);
$this->assertTrue(true);
} catch (Exception $exception) {
$this->assertStringContainsString($namespace, $exception->getMessage());
$this->assertStringContainsString('Undefined', $exception->getMessage());
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/UnitTest.php → tests/Unit/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Mockery;
use PHPUnit\Framework\TestCase;

abstract class UnitTest extends TestCase
abstract class UnitTestCase extends TestCase
{
public function tearDown(): void
{
Expand Down

0 comments on commit 23929db

Please sign in to comment.