Merge pull request #34 from Laragear/feat/php-8.2
[1.x] Adds PHP 8.2, Laravel 10 Support
This commit is contained in:
8
.github/workflows/php.yml
vendored
8
.github/workflows/php.yml
vendored
@@ -52,11 +52,16 @@ jobs:
|
|||||||
php-version:
|
php-version:
|
||||||
- "8.0"
|
- "8.0"
|
||||||
- "8.1"
|
- "8.1"
|
||||||
|
- "8.2"
|
||||||
laravel-constrain:
|
laravel-constrain:
|
||||||
- "9.*"
|
- "9.*"
|
||||||
|
- "10.*"
|
||||||
dependencies:
|
dependencies:
|
||||||
- "lowest"
|
- "lowest"
|
||||||
- "highest"
|
- "highest"
|
||||||
|
exclude:
|
||||||
|
- laravel-constrain: "10.*"
|
||||||
|
php-version: "8.0"
|
||||||
steps:
|
steps:
|
||||||
- name: "Set up PHP"
|
- name: "Set up PHP"
|
||||||
uses: "shivammathur/setup-php@v2"
|
uses: "shivammathur/setup-php@v2"
|
||||||
@@ -77,7 +82,7 @@ jobs:
|
|||||||
run: "composer run-script test"
|
run: "composer run-script test"
|
||||||
|
|
||||||
- name: "Upload coverage to Codecov"
|
- name: "Upload coverage to Codecov"
|
||||||
uses: "codecov/codecov-action@v2"
|
uses: "codecov/codecov-action@v3"
|
||||||
|
|
||||||
static_analysis:
|
static_analysis:
|
||||||
name: "3️⃣ Static Analysis"
|
name: "3️⃣ Static Analysis"
|
||||||
@@ -91,6 +96,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tools: "phpstan"
|
tools: "phpstan"
|
||||||
php-version: "latest"
|
php-version: "latest"
|
||||||
|
coverage: "none"
|
||||||
|
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: "actions/checkout@v3"
|
uses: "actions/checkout@v3"
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,5 +4,6 @@
|
|||||||
/.vscode
|
/.vscode
|
||||||
.php-cs-fixer.cache
|
.php-cs-fixer.cache
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
|
.phpunit.cache
|
||||||
composer.lock
|
composer.lock
|
||||||
phpunit.xml.bak
|
phpunit.xml.bak
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
"name": "Italo Israel Baeza Cabrera",
|
"name": "Italo Israel Baeza Cabrera",
|
||||||
"email": "DarkGhostHunter@Gmail.com",
|
"email": "DarkGhostHunter@Gmail.com",
|
||||||
"role": "Developer",
|
"role": "Developer",
|
||||||
"homepage": "https://patreon.com/packagesforlaravel"
|
"homepage": "https://github.com/sponsors/DarkGhostHunter"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
@@ -32,22 +32,20 @@
|
|||||||
"issues": "https://github.com/Laragear/TwoFactor/issues"
|
"issues": "https://github.com/Laragear/TwoFactor/issues"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0.2",
|
"php": "8.*",
|
||||||
"ext-openssl": "*",
|
"ext-openssl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"illuminate/auth": "9.*",
|
"illuminate/auth": "9.*|10.*",
|
||||||
"illuminate/http": "9.*",
|
"illuminate/http": "9.*|10.*",
|
||||||
"illuminate/session": "9.*",
|
"illuminate/session": "9.*|10.*",
|
||||||
"illuminate/support": "9.*",
|
"illuminate/support": "9.*|10.*",
|
||||||
"illuminate/config": "9.*",
|
"illuminate/config": "9.*|10.*",
|
||||||
"illuminate/database": "9.*",
|
"illuminate/database": "9.*|10.*",
|
||||||
"illuminate/encryption": "9.*"
|
"illuminate/encryption": "9.*|10.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"orchestra/testbench": "7.*",
|
"orchestra/testbench": "^7.22|8.*",
|
||||||
"phpunit/phpunit": "^9.5",
|
"jetbrains/phpstorm-attributes": "*"
|
||||||
"mockery/mockery": "^1.5",
|
|
||||||
"jetbrains/phpstorm-attributes": "^1.0"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -76,16 +74,8 @@
|
|||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "Patreon",
|
"type": "Github Sponsorship",
|
||||||
"url": "https://patreon.com/PackagesForLaravel"
|
"url": "https://github.com/sponsors/DarkGhostHunter"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Ko-Fi",
|
|
||||||
"url": "https://ko-fi.com/DarkGhostHunter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Buy me a cofee",
|
|
||||||
"url": "https://www.buymeacoffee.com/darkghosthunter"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Paypal",
|
"type": "Paypal",
|
||||||
|
|||||||
12
phpunit.xml
12
phpunit.xml
@@ -1,11 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false"
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
|
||||||
backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true"
|
|
||||||
convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false"
|
|
||||||
stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd">
|
|
||||||
<coverage>
|
<coverage>
|
||||||
<include>
|
<include>
|
||||||
<directory suffix=".php">src/</directory>
|
<directory suffix=".php">src/</directory>
|
||||||
|
<directory suffix=".php">stubs/controllers</directory>
|
||||||
</include>
|
</include>
|
||||||
<report>
|
<report>
|
||||||
<clover outputFile="build/logs/clover.xml"/>
|
<clover outputFile="build/logs/clover.xml"/>
|
||||||
@@ -14,14 +12,10 @@
|
|||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Test Suite">
|
<testsuite name="Test Suite">
|
||||||
<directory>tests</directory>
|
<directory>tests</directory>
|
||||||
<file>stubs/controllers/WebAuthnLoginController.php</file>
|
|
||||||
<file>stubs/controllers/WebAuthnRegisterController.php</file>
|
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<logging>
|
|
||||||
<junit outputFile="build/report.junit.xml"/>
|
|
||||||
</logging>
|
|
||||||
<php>
|
<php>
|
||||||
|
<includePath>stubs/controllers</includePath>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<env name="APP_DEBUG" value="true"/>
|
<env name="APP_DEBUG" value="true"/>
|
||||||
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
|
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace Tests;
|
namespace Tests;
|
||||||
|
|
||||||
use Illuminate\Contracts\Auth\Authenticatable;
|
use Illuminate\Contracts\Auth\Authenticatable;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
use Illuminate\Support\Facades\File;
|
use Illuminate\Support\Facades\File;
|
||||||
use Illuminate\Support\Fluent;
|
use Illuminate\Support\Fluent;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
@@ -28,19 +29,25 @@ class ServiceProviderTest extends TestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @define-env usesCustomTestTime
|
||||||
|
*/
|
||||||
public function test_publishes_migrations(): void
|
public function test_publishes_migrations(): void
|
||||||
{
|
{
|
||||||
$format = now()->format('Y_m_d_His');
|
|
||||||
|
|
||||||
static::assertSame(
|
static::assertSame(
|
||||||
[
|
[
|
||||||
realpath(WebAuthnServiceProvider::MIGRATIONS . '/2022_07_01_000000_create_webauthn_credentials.php') =>
|
realpath(WebAuthnServiceProvider::MIGRATIONS . '/2022_07_01_000000_create_webauthn_credentials.php') =>
|
||||||
$this->app->databasePath("migrations/{$format}_create_webauthn_credentials.php"),
|
$this->app->databasePath("migrations/2020_01_01_163025_create_webauthn_credentials.php"),
|
||||||
],
|
],
|
||||||
ServiceProvider::pathsToPublish(WebAuthnServiceProvider::class, 'migrations')
|
ServiceProvider::pathsToPublish(WebAuthnServiceProvider::class, 'migrations')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function usesCustomTestTime()
|
||||||
|
{
|
||||||
|
$this->travelTo(Carbon::create(2020, 01, 01, 16, 30, 25));
|
||||||
|
}
|
||||||
|
|
||||||
public function test_bounds_user(): void
|
public function test_bounds_user(): void
|
||||||
{
|
{
|
||||||
static::assertNull($this->app->make(WebAuthnAuthenticatable::class));
|
static::assertNull($this->app->make(WebAuthnAuthenticatable::class));
|
||||||
|
|||||||
Reference in New Issue
Block a user