Skip to content

Commit

Permalink
Drop support for PHP7, add support for PHP8
Browse files Browse the repository at this point in the history
  • Loading branch information
mzijlstra committed Feb 16, 2023
1 parent fb5bd47 commit 9c1889e
Show file tree
Hide file tree
Showing 73 changed files with 366 additions and 364 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.1",
"php": "^8.1",
"bshaffer/oauth2-server-php": "^1.12",
"laminas/laminas-loader": "^2.6",
"laminas/laminas-mvc": "^3.1",
Expand All @@ -35,7 +35,7 @@
"laminas/laminas-http": "^2.10"
},
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^8.0",
"phpstan/phpstan": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
Expand Down
52 changes: 26 additions & 26 deletions config/module.config.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
return array(
'service_manager' => array(
'invokables' => array(
return [
'service_manager' => [
'invokables' => [
/** Containers **/
'OAuth2Provider/Containers/StorageContainer' => 'OAuth2Provider\Containers\StorageContainer',
'OAuth2Provider/Containers/ConfigContainer' => 'OAuth2Provider\Containers\ConfigContainer',
Expand All @@ -26,8 +26,8 @@
'OAuth2Provider/Options/TokenType/Bearer' => 'OAuth2Provider\Options\TokenType\BearerConfigurations',
'OAuth2Provider/Options/ScopeType/Scope' => 'OAuth2Provider\Options\ScopeType\ScopeConfigurations',
'OAuth2Provider/Options/ClientAssertionType/HttpBasic' => 'OAuth2Provider\Options\ClientAssertionType\HttpBasicConfigurations',
),
'factories' => array(
],
'factories' => [
/** Main Options Configuration (oauth2provider.config.php) **/
'OAuth2Provider/Options/Configuration' => 'OAuth2Provider\Service\Factory\ConfigurationFactory',

Expand Down Expand Up @@ -73,17 +73,17 @@

/** 5. Client Assertion Type Strategies (OAuth2Provider/Service/ServerFeature/ClientAssertionTypeFactory) **/
'OAuth2Provider/ClientAssertionStrategy/HttpBasic' => 'OAuth2Provider\Service\Factory\ClientAssertionTypeStrategy\HttpBasicFactory',
),
'abstract_factories' => array(
],
'abstract_factories' => [
'OAuth2Provider\Service\AbstractFactory\ServerAbstractFactory',
'OAuth2Provider\Service\AbstractFactory\RequestAbstractFactory',
'OAuth2Provider\Service\AbstractFactory\ResponseAbstractFactory',
'OAuth2Provider\Service\AbstractFactory\ContainerAbstractFactory',
),
'aliases' => array(
],
'aliases' => [
'oauth2provider.server.main' => 'OAuth2Provider/Service/MainServerFactory',
),
'shared' => array(
],
'shared' => [
/** We do not share options as it is unique to each object **/
'OAuth2Provider/Options/ServerFeatureType' => false,
'OAuth2Provider/Options/TypeAbstract' => false,
Expand All @@ -97,23 +97,23 @@
'OAuth2Provider/Options/TokenType/Bearer' => false,
'OAuth2Provider/Options/ScopeType/Scope' => false,
'OAuth2Provider/Options/ClientAssertionType/HttpBasic' => false,
),
),
'controllers' => array(
'factories' => array(
],
],
'controllers' => [
'factories' => [
'OAuthController' => 'OAuth2Provider\Service\Factory\ControllerFactory',
),
),
'view_manager' => array(
'template_path_stack' => array(
],
],
'view_manager' => [
'template_path_stack' => [
__DIR__ . '/../view',
),
'strategies' => array(
],
'strategies' => [
'ViewJsonStrategy',
),
),
'oauth2provider' => array(
],
],
'oauth2provider' => [
'default_controller' => 'OAuth2Provider\Controller\UserCredentialsController',
),
],
'router' => include __DIR__ . '/routes.config.php',
);
];
30 changes: 15 additions & 15 deletions config/module.config.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
* 3. Copy the oauth2provider key/data to module.config.php (there needs to be an own 'oauth2provider' config key)
or use this as your module.config.php if you dont have any.
*/
return array(
'oauth2provider' => array(
'servers' => array(
'default' => array(
'storages' => array(), // required. Define at least 1 storage
'configs' => array(), // optional
return [
'oauth2provider' => [
'servers' => [
'default' => [
'storages' => [], // required. Define at least 1 storage
'configs' => [], // optional
'server_class' => '', // optional
'version' => '', // optional
'controller' => '', // optional
'grant_types' => array(), // optional
'response_types' => array(), // optional
'token_type' => array(), // optional
'scope_util' => array(), // optional
'client_assertion_type' => array(), // optional
),
'grant_types' => [], // optional
'response_types' => [], // optional
'token_type' => [], // optional
'scope_util' => [], // optional
'client_assertion_type' => [], // optional
],
/**
* Multiple server versions
* To create multiple server versions for 'default':
Expand Down Expand Up @@ -55,9 +55,9 @@ return array(
),
),
*/
),
],
'main_server' => '', // optional. Defaults to 'default' server key
'main_version' => '', // optional. Refer to Multiple Server Version example above
'default_controller' => '', // required
),
);
],
];
Loading

0 comments on commit 9c1889e

Please sign in to comment.