File tree 7 files changed +25
-35
lines changed
7 files changed +25
-35
lines changed Original file line number Diff line number Diff line change 11
11
fail-fast : false
12
12
matrix :
13
13
php : [8.1, 8.2, 8.3]
14
- laravel : [10.*]
14
+ laravel : [10.*, 11.* ]
15
15
dependency-version : [prefer-lowest, prefer-stable]
16
+ exclude :
17
+ - php : 8.1
18
+ laravel : 11.*
16
19
17
20
name : PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}
18
21
44
47
45
48
- name : Install dependencies
46
49
run : |
47
- composer require "illuminate/database:${{ matrix. laravel }}" "illuminate/notifications:${{ matrix.laravel }}" "illuminate/support :${{ matrix.laravel }}" --no-interaction --no-update
50
+ composer require "laravel/framework :${{ matrix.laravel }}" --no-interaction --no-update
48
51
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
49
52
50
53
- name : Execute tests
Original file line number Diff line number Diff line change @@ -7,3 +7,4 @@ phpunit.xml
7
7
.env
8
8
.phpunit.result.cache
9
9
.php-cs-fixer.cache
10
+ .phpunit.cache
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use AdamWojs \PhpCsFixerPhpdocForceFQCN \Fixer \Phpdoc \ForceFQCNFixer ;
4
3
use PhpCsFixer \Config ;
5
4
use PhpCsFixer \Finder ;
5
+ use AdamWojs \PhpCsFixerPhpdocForceFQCN \Fixer \Phpdoc \ForceFQCNFixer ;
6
6
7
7
$ rules = [
8
8
'@PSR2 ' => true ,
32
32
// Converts implicit variables into explicit ones in double-quoted strings or heredoc syntax.
33
33
'explicit_string_variable ' => true ,
34
34
// Transforms imported FQCN parameters and return types in function arguments to short version.
35
- 'fully_qualified_strict_types ' => true ,
35
+ 'fully_qualified_strict_types ' => false ,
36
36
// Add missing space between function's argument and its typehint.
37
37
'function_typehint_space ' => true ,
38
38
// Pre- or post-increment and decrement operators should be used if possible.
195
195
196
196
return (new Config ())
197
197
->registerCustomFixers ([
198
- new ForceFQCNFixer (),
198
+ new ForceFQCNFixer ()
199
199
])
200
200
->setRules ($ rules )
201
201
->setFinder ($ finder );
Original file line number Diff line number Diff line change 29
29
],
30
30
"require" : {
31
31
"php" : " ^8.1|^8.2|^8.3" ,
32
- "illuminate/database" : " ^7.0|^8.0|^9.0|^10.0" ,
33
- "illuminate/notifications" : " ^7.0|^8.0|^9.0|^10.0" ,
34
- "illuminate/support" : " ^7.0|^8.0|^9.0|^10.0"
32
+ "illuminate/database" : " ^7.0|^8.0|^9.0|^10.0|^11.0 " ,
33
+ "illuminate/notifications" : " ^7.0|^8.0|^9.0|^10.0|^11.0 " ,
34
+ "illuminate/support" : " ^7.0|^8.0|^9.0|^10.0|^11.0 "
35
35
},
36
36
"require-dev" : {
37
37
"adamwojs/php-cs-fixer-phpdoc-force-fqcn" : " ^2.0" ,
38
38
"friendsofphp/php-cs-fixer" : " ^3.0" ,
39
- "orchestra/testbench" : " ^5.0|^6.0|^7.0|^8.0" ,
40
- "phpunit/phpunit" : " ^9.1" ,
39
+ "orchestra/testbench" : " ^5.0|^6.0|^7.0|^8.0|^9.0 " ,
40
+ "phpunit/phpunit" : " ^9.1|^10.0 " ,
41
41
"squizlabs/php_codesniffer" : " ^3.6"
42
42
},
43
43
"autoload" : {
Original file line number Diff line number Diff line change 59
59
| - \NextApps\VerificationCode\Notifications\VerificationCodeCreatedInterface
60
60
|
61
61
*/
62
- 'notification ' => \ NextApps \VerificationCode \Notifications \VerificationCodeCreated::class,
62
+ 'notification ' => NextApps \VerificationCode \Notifications \VerificationCodeCreated::class,
63
63
64
64
/*
65
65
|--------------------------------------------------------------------------
72
72
| - \NextApps\VerificationCode\Models\VerificationCode
73
73
|
74
74
*/
75
- 'model ' => \ NextApps \VerificationCode \Models \VerificationCode::class,
75
+ 'model ' => NextApps \VerificationCode \Models \VerificationCode::class,
76
76
77
77
/*
78
78
|--------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <phpunit bootstrap =" vendor/autoload.php"
3
- backupGlobals =" false"
4
- backupStaticAttributes =" false"
5
- colors =" true"
6
- verbose =" true"
7
- convertErrorsToExceptions =" true"
8
- convertNoticesToExceptions =" true"
9
- convertWarningsToExceptions =" true"
10
- processIsolation =" false"
11
- stopOnFailure =" false" >
2
+ <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" >
12
3
<testsuites >
13
- <testsuite name =" Next Apps Test Suite" >
4
+ <testsuite name =" Test Suite" >
14
5
<directory >tests</directory >
15
6
</testsuite >
16
7
</testsuites >
17
- <filter >
18
- <whitelist >
8
+ <source >
9
+ <include >
19
10
<directory suffix =" .php" >src/</directory >
20
- </whitelist >
21
- </filter >
22
- <logging >
23
- <log type =" tap" target =" build/report.tap" />
24
- <log type =" junit" target =" build/report.junit.xml" />
25
- <log type =" coverage-text" target =" build/coverage.txt" />
26
- <log type =" coverage-clover" target =" build/logs/clover.xml" />
27
- </logging >
11
+ </include >
12
+ </source >
28
13
<php >
14
+ <env name =" APP_KEY" value =" base64:yk+bUVuZa1p86Dqjk9OjVK2R1pm6XHxC6xEKFq8utH0=" />
29
15
<env name =" DB_CONNECTION" value =" testing" />
30
16
</php >
31
17
</phpunit >
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function it_sets_expiration_date_based_on_config()
30
30
$ dbVerificationCode = VerificationCode::first ();
31
31
32
32
$ this ->assertNotNull ($ dbVerificationCode ->expires_at );
33
- $ this ->assertEquals (0 , $ dbVerificationCode ->expires_at ->diffInMinutes (now ()->addHours (6 )));
33
+ $ this ->assertEquals (0 , ( int ) $ dbVerificationCode ->expires_at ->diffInMinutes (now ()->addHours (6 )));
34
34
}
35
35
36
36
/** @test */
@@ -79,7 +79,7 @@ public function it_sets_expiration_date_if_not_set_on_create()
79
79
]);
80
80
81
81
$ this ->assertNotNull ($ verificationCode ->expires_at );
82
- $ this ->assertEquals (0 , $ verificationCode ->expires_at ->diffInMinutes (now ()->addHours (4 )));
82
+ $ this ->assertEquals (0 , ( int ) $ verificationCode ->expires_at ->diffInMinutes (now ()->addHours (4 )));
83
83
}
84
84
85
85
/** @test */
You can’t perform that action at this time.
0 commit comments