File tree Expand file tree Collapse file tree 5 files changed +25
-23
lines changed
tests/CareerBuilder/OAuth2/Flows Expand file tree Collapse file tree 5 files changed +25
-23
lines changed Original file line number Diff line number Diff line change 1
1
base : &base
2
2
working_directory : ~/php-oauth
3
3
docker :
4
- - image : circleci /php:7.4-cli
4
+ - image : cimg /php:8.4
5
5
6
6
remote-docker : &remote_docker
7
7
setup_remote_docker
@@ -11,47 +11,47 @@ docker-info: &docker_info
11
11
12
12
version : 2
13
13
jobs :
14
- build-php71 :
14
+ build-php81 :
15
15
<< : *base
16
16
steps :
17
17
- checkout
18
18
- *remote_docker
19
19
- *docker_info
20
- - run : docker build --build-arg PHP_VERSION=7 .1 -t tests-php71 .
21
- - run : docker run tests-php71
20
+ - run : docker build --build-arg PHP_VERSION=8 .1 -t tests-php81 .
21
+ - run : docker run tests-php81
22
22
23
- build-php72 :
23
+ build-php82 :
24
24
<< : *base
25
25
steps :
26
26
- checkout
27
27
- *remote_docker
28
28
- *docker_info
29
- - run : docker build --build-arg PHP_VERSION=7 .2 -t tests-php72 .
30
- - run : docker run tests-php72
29
+ - run : docker build --build-arg PHP_VERSION=8 .2 -t tests-php82 .
30
+ - run : docker run tests-php82
31
31
32
- build-php73 :
32
+ build-php83 :
33
33
<< : *base
34
34
steps :
35
35
- checkout
36
36
- *remote_docker
37
37
- *docker_info
38
- - run : docker build --build-arg PHP_VERSION=7 .3 -t tests-php73 .
39
- - run : docker run tests-php73
38
+ - run : docker build --build-arg PHP_VERSION=8 .3 -t tests-php83 .
39
+ - run : docker run tests-php83
40
40
41
- build-php74 :
41
+ build-php84 :
42
42
<< : *base
43
43
steps :
44
44
- checkout
45
45
- *remote_docker
46
46
- *docker_info
47
- - run : docker build --build-arg PHP_VERSION=7 .4 -t tests-php74 .
48
- - run : docker run tests-php74
47
+ - run : docker build --build-arg PHP_VERSION=8 .4 -t tests-php84 .
48
+ - run : docker run tests-php84
49
49
50
50
workflows :
51
51
version : 2
52
52
all :
53
53
jobs :
54
- - build-php71
55
- - build-php72
56
- - build-php73
57
- - build-php74
54
+ - build-php81
55
+ - build-php82
56
+ - build-php83
57
+ - build-php84
Original file line number Diff line number Diff line change 1
1
ARG PHP_VERSION
2
- FROM php:${PHP_VERSION:-7 .4}-alpine
3
- RUN apk add --no-cache git $PHPIZE_DEPS && \
2
+ FROM php:${PHP_VERSION:-8 .4}-alpine
3
+ RUN apk add --no-cache linux-headers git $PHPIZE_DEPS && \
4
4
pecl install xdebug && \
5
5
docker-php-ext-enable xdebug && \
6
6
curl -# https://getcomposer.org/installer | php && \
Original file line number Diff line number Diff line change 5
5
"require" : {
6
6
"guzzlehttp/guzzle" : " ^6.5" ,
7
7
"psr/log" : " ^1.1" ,
8
- "firebase/php-jwt" : " ^ 5.0"
8
+ "firebase/php-jwt" : " 6. 5.0"
9
9
},
10
10
"require-dev" : {
11
- "phpunit/phpunit" : " ^5.7 "
11
+ "phpunit/phpunit" : " ^8.0 "
12
12
},
13
13
"autoload" : {
14
14
"psr-0" : {
Original file line number Diff line number Diff line change 14
14
15
15
use CareerBuilder \OAuth2 \AccessToken ;
16
16
use Firebase \JWT \JWT ;
17
+ use Firebase \JWT \Key ;
17
18
use GuzzleHttp \Client ;
18
19
use GuzzleHttp \Handler \MockHandler ;
19
20
use GuzzleHttp \Psr7 \Response ;
@@ -54,7 +55,7 @@ public function testGetToken()
54
55
$ postFields = [];
55
56
parse_str ($ body , $ postFields );
56
57
57
- $ jwt = JWT ::decode ($ postFields ['client_assertion ' ], 'sharedsecret ' , [ 'HS512 ' ] );
58
+ $ jwt = JWT ::decode ($ postFields ['client_assertion ' ], new Key ( 'sharedsecret ' ,'HS512 ' ) );
58
59
59
60
$ this ->assertEquals ('POST ' , $ request ->getMethod ());
60
61
$ this ->assertEquals ('clientid ' , $ postFields ['client_id ' ]);
Original file line number Diff line number Diff line change 13
13
namespace CareerBuilder \OAuth2 \Flows ;
14
14
15
15
use Firebase \JWT \JWT ;
16
+ use Firebase \JWT \Key ;
16
17
use GuzzleHttp \Client ;
17
18
use GuzzleHttp \Handler \MockHandler ;
18
19
use GuzzleHttp \Psr7 \Response ;
@@ -55,7 +56,7 @@ public function testGetToken()
55
56
$ postFields = [];
56
57
parse_str ($ body , $ postFields );
57
58
58
- $ jwt = JWT ::decode ($ postFields ['assertion ' ], 'sharedsecret ' , [ 'HS512 ' ] );
59
+ $ jwt = JWT ::decode ($ postFields ['assertion ' ], new Key ( 'sharedsecret ' ,'HS512 ' ) );
59
60
60
61
$ this ->assertEquals ('POST ' , $ request ->getMethod ());
61
62
$ this ->assertEquals ('clientid ' , $ postFields ['client_id ' ]);
You can’t perform that action at this time.
0 commit comments