Skip to content

Commit

Permalink
Laravel 10 support (#23)
Browse files Browse the repository at this point in the history
* support Laravel 10
* drop laravel 8 support
  • Loading branch information
reliq committed Mar 8, 2023
1 parent ba82eaa commit 2d40427
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ jobs:
strategy:
max-parallel: 10
matrix:
laravel-version: ['^8.0', '^9.0']
laravel-version: ['^9.0', '^10.0']
preference: ['stable']
php-version: ['7.4', '8.0']
exclude:
- laravel-version: ^8.0
php-version: 8.0
- laravel-version: ^9.0
php-version: 7.4
php-version: ['8.1', '8.2']
name: Laravel ${{ matrix.laravel-version }} (${{ matrix.preference }}) on PHP ${{ matrix.php-version }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -35,7 +30,7 @@ jobs:
- name: Run Tests
run: composer test:ci
- name: Upload Coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} #required
file: ./coverage.xml #optional
Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1",
"ext-json": "*",
"illuminate/support": "8 - 9",
"illuminate/support": "9 - 10",
"league/commonmark": "^2.2",
"monolog/monolog": "1.24 - 2",
"monolog/monolog": "1.24 - 3",
"nesbot/carbon": "^2.0",
"reliqarts/laravel-common": ">=5.0",
"symfony/browser-kit": ">=4.3",
"symfony/process": ">=4.0",
"symfony/yaml": ">=4.3"
},
"require-dev": {
"orchestra/testbench-browser-kit": "4 - 7",
"orchestra/testbench-browser-kit": "4 - 8",
"phpunit/phpunit": "^9.3",
"phpro/grumphp": "^1.0",
"phpspec/prophecy-phpunit": "^2.0",
"symplify/easy-coding-standard": ">=8.2"
"symplify/easy-coding-standard": ">=10.2"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -63,7 +63,10 @@
},
"config": {
"sort-packages": true,
"optimize-autoloader": true
"optimize-autoloader": true,
"allow-plugins": {
"phpro/grumphp": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
Expand Down
14 changes: 5 additions & 9 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

declare(strict_types=1);

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->import(SetList::CLEAN_CODE);
$containerConfigurator->import(SetList::PSR_12);

$parameters = $containerConfigurator->parameters();
$parameters->set(Option::LINE_ENDING, "\n");
$parameters->set(Option::PATHS, [__DIR__ . '/src', __DIR__ . '/tests']);
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->sets([SetList::CLEAN_CODE, SetList::PSR_12]);
$ecsConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']);
$ecsConfig->lineEnding("\n");
};
4 changes: 2 additions & 2 deletions tests/Unit/Service/Documentation/PublisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function testPublishWhenProductDirectoryIsNotWritable(): void
->shouldNotBeCalled();

$this->expectException(DirectoryNotWritableException::class);
$this->expectErrorMessage($expectedErrorMessage);
$this->expectExceptionMessage($expectedErrorMessage);

$this->subject->publish($productName, $source);
}
Expand Down Expand Up @@ -294,7 +294,7 @@ public function testUpdateWhenProductDirectoryIsNotWritable(): void
->shouldNotBeCalled();

$this->expectException(DirectoryNotWritableException::class);
$this->expectErrorMessage($expectedErrorMessage);
$this->expectExceptionMessage($expectedErrorMessage);

$this->subject->update($productName);
}
Expand Down
5 changes: 5 additions & 0 deletions tests/Unit/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace ReliqArts\Docweaver\Tests\Unit;

use Prophecy\Exception\Doubler\DoubleException;
use Prophecy\Exception\Doubler\InterfaceNotFoundException;
use Prophecy\PhpUnit\ProphecyTrait;
use ReliqArts\Docweaver\Contract\ConfigProvider;
use ReliqArts\Docweaver\Contract\Filesystem;
Expand All @@ -13,6 +15,9 @@ abstract class TestCase extends BaseTestCase
{
use ProphecyTrait;

/**
* @throws DoubleException|InterfaceNotFoundException
*/
protected function setUp(): void
{
parent::setUp();
Expand Down

0 comments on commit 2d40427

Please sign in to comment.