Skip to content

Commit

Permalink
Use PSR-4
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Jul 30, 2015
1 parent c78b58b commit 36fe993
Show file tree
Hide file tree
Showing 52 changed files with 32 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/*
vendor
composer.lock
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
language: php

php:
- 5.4
- 5.5
- 5.6
cache:
directories:
- $HOME/.composer/cache

matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
- php: 7.0
- php: hhvm
allow_failures:
- php: hhvm

before_script:
- composer self-update
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ compliant server.

## Requirements

- PHP 5.4 or higher
- PHP 5.5 or higher
- [ZfrOAuth2Server](https://github.com/zf-fr/zfr-oauth2-server)

## Versioning note
Expand All @@ -23,7 +23,7 @@ Please note that until I reach 1.0, I **WILL NOT** follow semantic version. This
Installation is only officially supported using Composer:

```sh
php composer.phar require zfr/zfr-oauth2-server-module:0.6.*
php composer.phar require zfr/zfr-oauth2-server-module:0.7.*
```

Copy-paste the `zfr_oauth2_server.global.php.dist` file to your `autoload` folder, and enable the module by adding
Expand All @@ -43,11 +43,14 @@ interface. Then, you need to modify the Doctrine mapping to associate this inter
class. The code is already set in the `zfr_oauth2_server.global.php.dist` file:

```php
use Application\Entity\User;
use ZfrOAuth2\Server\Entity\TokenOwnerInterface;

return [
'doctrine' => [
'entity_resolver' => [
'orm_default' => [
'ZfrOAuth2\Server\Entity\TokenOwnerInterface' => 'Application\Entity\User'
TokenOwnerInterface::class => Application\Entity\User::class
]
]
]
Expand All @@ -61,11 +64,14 @@ want to support. For instance, the following config will make your server compat
grant as well as the "Refresh token" grant:

```php
use ZfrOAuth2\Server\Grant\PasswordGrant;
use ZfrOAuth2\Server\Grant\RefreshTokenGrant';

return [
'zfr_oauth2_server' => [
'grants' => [
'ZfrOAuth2\Server\Grant\PasswordGrant',
'ZfrOAuth2\Server\Grant\RefreshTokenGrant'
PasswordGrant::class,
RefreshTokenGrant::class
]
]
]
Expand Down
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"zendframework/zend-console": "~2.2",
"zendframework/zend-stdlib": "~2.2",
"doctrine/doctrine-module": "~0.9",
"zfr/zfr-oauth2-server": "dev-psr7 as 0.7.0"
"zfr/zfr-oauth2-server": "dev-master as 0.7.0"
},
"require-dev": {
"phpunit/phpunit": "~4.6",
Expand All @@ -35,8 +35,13 @@
"satooshi/php-coveralls": "~0.6"
},
"autoload": {
"psr-0": {
"psr-4": {
"ZfrOAuth2Module\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ZfrOAuth2ModuleTest\\": "tests/"
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 36fe993

Please sign in to comment.