Skip to content

Commit

Permalink
Merge pull request #30 from nextapps-be/feature/laravel-v11-support
Browse files Browse the repository at this point in the history
Add support for Laravel v11
  • Loading branch information
gdebrauwer authored Mar 15, 2024
2 parents 8d6a23b + bb85a84 commit d010220
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 26 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
laravel: [9.*, 10.*]
laravel: [9.*, 10.*, 11.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- php: 8.3
Expand All @@ -20,6 +20,8 @@ jobs:
- php: 8.2
laravel: 9.*
dependency-version: prefer-lowest
- php: 8.1
laravel: 11.*

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ vendor
coverage
.phpunit.result.cache
.php-cs-fixer.cache
.phpunit.cache
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"require": {
"php": "^8.1|^8.2|^8.3",
"ext-json": "*",
"laravel/framework": "^9.0|^10.0"
"laravel/framework": "^9.0|^10.0|^11.0"
},
"suggest": {
"ext-yaml": "*"
Expand All @@ -30,8 +30,8 @@
"adamwojs/php-cs-fixer-phpdoc-force-fqcn": "^2.0",
"friendsofphp/php-cs-fixer": "^3.0",
"jasonmccreary/laravel-test-assertions": "^2.3",
"orchestra/testbench": "^6.0|^7.0|^8.0",
"phpunit/phpunit": "^9.1",
"orchestra/testbench": "^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.5|^10.0",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
Expand Down
26 changes: 5 additions & 21 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" cacheResult="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<source>
<include>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</include>
</source>
<php>
<env name="APP_KEY" value="base64:yk+bUVuZa1p86Dqjk9OjVK2R1pm6XHxC6xEKFq8utH0="/>
</php>
Expand Down
5 changes: 5 additions & 0 deletions tests/AuthorizationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ public function getAuthIdentifier()
return 'swagger-ui-test';
}

public function getAuthPasswordName()
{
return 'password';
}

public function getAuthPassword()
{
return 'secret';
Expand Down
2 changes: 1 addition & 1 deletion tests/OpenApiRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getPackageProviders($app) : array
return [SwaggerUiServiceProvider::class];
}

public function openApiFileProvider() : array
public static function openApiFileProvider() : array
{
return [
'json file' => [__DIR__ . '/testfiles/openapi.json'],
Expand Down

0 comments on commit d010220

Please sign in to comment.