Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Symfony 4 support (#40)
Browse files Browse the repository at this point in the history
* Symfony 4 support
* Allow spomky-labs/jose 7.0
  • Loading branch information
Spomky committed Nov 29, 2017
1 parent 68876ea commit 06ee938
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ matrix:
allow_failures:
- php: nightly
include:
- php: 5.6
- php: 5.6
env: deps=low
- php: 7.0
- php: 7.0
env: deps=low
- php: hhvm
- php: nightly
- php: 7.1
- php: 7.2
- php: nightly
env: deps=low

services:
- memcached
Expand All @@ -26,7 +22,7 @@ before_script:
- phpenv config-rm xdebug.ini || true

# we add memcached extension
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

# prepare composer and dependencies
- composer self-update
Expand Down
3 changes: 2 additions & 1 deletion DependencyInjection/Source/AbstractSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ abstract class AbstractSource
abstract protected function createDefinition(ContainerBuilder $container, array $config);

/**
* {@inheritdoc}
* @param string $type
* @param string $name
*/
public function create(ContainerBuilder $container, $type, $name, array $config)
{
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/Source/JWKSetSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function createService($name, array $config, ContainerBuilder $container)
return;
}
}

throw new \LogicException(sprintf('The JWKSet definition "%s" is not configured.', $name));
}

Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/Source/JWKSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function createService($name, array $config, ContainerBuilder $container)
return;
}
}

throw new \LogicException(sprintf('The JWK definition "%s" is not configured.', $name));
}

Expand Down
4 changes: 2 additions & 2 deletions Routing/JWKSetLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public function addJWKSetRoute($pattern, $name)
{
$controller_id = 'jose.controller.'.$name;

$defaults =['_controller' => $controller_id.':getAction', '_format' => 'json'];
$requirements =['_format' => 'json|pem'];
$defaults = ['_controller' => $controller_id.':getAction', '_format' => 'json'];
$requirements = ['_format' => 'json|pem'];
$route = new Route($pattern.'.{_format}', $defaults, $requirements);
$this->routes->add('jwkset_'.$name, $route);
}
Expand Down
1 change: 1 addition & 0 deletions Tests/Context/RequestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public function iTheRequestTo($method, $uri)
$client->followRedirects(false);

$this->getRequestBuilder()->setUri($this->locatePath($uri));

try {
$client->request(
$method,
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
}
],
"require": {
"spomky-labs/jose": "^6.1",
"symfony/console": "^2.8|^3.0",
"symfony/http-kernel": "^2.8|^3.0",
"symfony/framework-bundle": "^2.8|^3.0",
"symfony/dependency-injection": "^2.8|^3.0",
"symfony/config": "^2.8|^3.0"
"spomky-labs/jose": "^6.1|^7.0",
"symfony/console": "^2.8|^3.0|^4.0",
"symfony/http-kernel": "^2.8|^3.0|^4.0",
"symfony/framework-bundle": "^2.8|^3.0|^4.0",
"symfony/dependency-injection": "^2.8|^3.0|^4.0",
"symfony/config": "^2.8|^3.0|^4.0"
},
"require-dev": {
"symfony/finder": "^2.8|^3.0",
"symfony/var-dumper": "^2.8|^3.0",
"symfony/finder": "^2.8|^3.0|^4.0",
"symfony/var-dumper": "^2.8|^3.0|^4.0",
"behat/behat": "^3.1",
"behat/mink": "^1.5",
"behat/mink-extension": "^2.0",
Expand Down

0 comments on commit 06ee938

Please sign in to comment.