Skip to content

Commit

Permalink
Test with Symfony 4.4 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas authored and markitosgv committed Nov 25, 2019
1 parent a5f04ac commit 0ed26a8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ matrix:
env: SYMFONY_VERSION=4.3.*
- php: 7.3
env: SYMFONY_VERSION=4.3.*
# 4.4.*
- php: 7.1
env: SYMFONY_VERSION=4.4.*
- php: 7.2
env: SYMFONY_VERSION=4.4.*
- php: 7.3
env: SYMFONY_VERSION=4.4.*

cache:
directories:
Expand Down
2 changes: 2 additions & 0 deletions Command/ClearInvalidRefreshTokensCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
foreach ($revokedTokens as $revokedToken) {
$output->writeln(sprintf('Revoke <comment>%s</comment>', $revokedToken->getRefreshToken()));
}

return 0;
}
}
2 changes: 2 additions & 0 deletions Command/RevokeRefreshTokenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->refreshTokenManager->delete($refreshToken);

$output->writeln(sprintf('Revoke <comment>%s</comment>', $refreshToken->getRefreshToken()));

return 0;
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"doctrine/doctrine-bundle": "~1.4",
"doctrine/mongodb-odm-bundle": "^3.4|^4.0",
"doctrine/orm": "^2.4.8",
"phpspec/phpspec": "^3.0|^4.0"
"phpspec/phpspec": "^3.0|^4.0|^5.0|^6.0"
},
"config": {
"bin-dir": "bin"
Expand Down
6 changes: 3 additions & 3 deletions spec/Request/RequestRefreshTokenSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ public function it_gets_from_body()

public function it_gets_from_json()
{
$request = Request::create(null, 'POST', array(), array(), array(), array(), json_encode(array(self::TOKEN_PARAMETER_NAME => 'abcd')));
$request = Request::create('', 'POST', array(), array(), array(), array(), json_encode(array(self::TOKEN_PARAMETER_NAME => 'abcd')));
$request->headers->set('content_type', 'application/json');

$this::getRefreshToken($request, self::TOKEN_PARAMETER_NAME)->shouldBe('abcd');
}

public function it_gets_from_json_x()
{
$request = Request::create(null, 'POST', array(), array(), array(), array(), json_encode(array(self::TOKEN_PARAMETER_NAME => 'abcd')));
$request = Request::create('', 'POST', array(), array(), array(), array(), json_encode(array(self::TOKEN_PARAMETER_NAME => 'abcd')));
$request->headers->set('content_type', 'application/x-json');

$this::getRefreshToken($request, self::TOKEN_PARAMETER_NAME)->shouldBe('abcd');
}

public function it_gets_from_json_parameter()
{
$request = Request::create(null, 'POST', array(), array(), array(), array(), json_encode(array(self::TOKEN_PARAMETER_NAME => 'abcd')));
$request = Request::create('', 'POST', array(), array(), array(), array(), json_encode(array(self::TOKEN_PARAMETER_NAME => 'abcd')));
$request->headers->set('content_type', 'application/json;charset=UTF-8');

$this::getRefreshToken($request, self::TOKEN_PARAMETER_NAME)->shouldBe('abcd');
Expand Down

0 comments on commit 0ed26a8

Please sign in to comment.