Skip to content

Commit 920e408

Browse files
committed
minor #3 Simpify test suite (chalasr)
This PR was merged into the 0.1-dev branch. Discussion ---------- Simpify test suite - Removes the ext-timecop dev dependency - Stop using MicroKernelTrait to avoid the need for forward compatibility layers in test classes Commits ------- c3cd62f Simpify test suite
2 parents 904d57f + c3cd62f commit 920e408

20 files changed

+299
-540
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ cache:
1515
- $HOME/.composer/cache
1616

1717
before_script:
18-
- pecl install timecop-1.2.10
1918
- composer self-update
2019
- composer require --no-update symfony/config=$SYMFONY_VERSION symfony/http-kernel=$SYMFONY_VERSION symfony/dependency-injection=$SYMFONY_VERSION symfony/options-resolver=$SYMFONY_VERSION
2120
- composer require --no-update --dev symfony/framework-bundle=$SYMFONY_VERSION symfony/yaml=$SYMFONY_VERSION
@@ -24,4 +23,4 @@ before_script:
2423
script:
2524
- stty cols 120
2625
- if [ "$CHECK_CS" == 1 ]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.15.8/php-cs-fixer.phar && php php-cs-fixer.phar fix --dry-run --diff; fi
27-
- PSR_HTTP_PROVIDER=nyholm vendor/bin/simple-phpunit
26+
- vendor/bin/simple-phpunit

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
[![Latest Stable Version](https://poser.pugx.org/league/oauth2-server-bundle/v/stable)](https://packagist.org/packages/thephpleague/oauth2-server-bundle)
55

66
OAuth2ServerBundle is a Symfony bundle integrating the [oauth2-server](https://github.com/thephpleague/oauth2-server) library into Symfony applications.
7+
Fork of trikoder/oauth2-bundle, for the better.
78

8-
## Status
9+
## Quick Start
910

10-
**Work in progress**
11+
1. Require the bundle and a PSR 7/17 implementation using Composer:
1112

12-
Forked from of [Trikoder/OAuth2-Bundle](https://github.com).
13+
```sh
14+
composer require league/oauth2-server-bundle nyholm/psr7
15+
```
1316

1417
## Documentation
1518

1619
The docs [can be found in the `docs/` directory](docs/index.md) of this repository.
1720

1821
## License
19-
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
22+
See the [LICENSE](LICENSE) file for copyrights and limitations (MIT).

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"symfony/security-bundle": "^4.4|^5.0"
2828
},
2929
"require-dev": {
30-
"ext-timecop": "*",
3130
"laminas/laminas-diactoros": "^2.2",
3231
"nyholm/psr7": "^1.2",
3332
"symfony/browser-kit": "^4.4|^5.0",

dev/docker/Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ LABEL maintainer="Petar Obradović <[email protected]>"
66
ARG COMPOSER_VERSION=1.9.3
77
ARG FLEX_VERSION=1.6.2
88
ARG PHP_CS_FIXER_VERSION=2.16.2
9-
ARG TIMECOP_VERSION=1.2.10
109
ARG XDEBUG_VERSION=2.9.2
1110

1211
ENV XDEBUG_REMOTE_AUTOSTART 0
13-
ENV TIMECOP_FUNC_OVERRIDE 0
1412

1513
# This is where we're going to store all of our non-project specific binaries
1614
RUN mkdir -p /app/bin
@@ -27,10 +25,8 @@ RUN apk add --update --no-cache --virtual .build-deps \
2725
zip \
2826
&& pecl install \
2927
xdebug-${XDEBUG_VERSION} \
30-
timecop-${TIMECOP_VERSION} \
3128
&& docker-php-ext-enable \
3229
xdebug \
33-
timecop \
3430
&& apk del --purge .build-deps
3531

3632
RUN mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
@@ -41,9 +37,6 @@ RUN echo '[xdebug]' >> ${PHP_INI_DIR}/conf.d/docker-php-ext-xdebug.ini \
4137
&& echo 'xdebug.remote_connect_back = 0' >> ${PHP_INI_DIR}/conf.d/docker-php-ext-xdebug.ini \
4238
&& echo 'xdebug.remote_host = %XDEBUG_REMOTE_HOST%' >> ${PHP_INI_DIR}/conf.d/docker-php-ext-xdebug.ini
4339

44-
RUN echo '[timecop]' >> ${PHP_INI_DIR}/conf.d/docker-php-ext-timecop.ini \
45-
&& echo 'timecop.func_override = ${TIMECOP_FUNC_OVERRIDE}' >> ${PHP_INI_DIR}/conf.d/docker-php-ext-timecop.ini
46-
4740
# Utilities needed to run this image
4841
RUN apk add --update --no-cache \
4942
git \

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ services:
66
HOST_USER_ID: ${HOST_USER_ID}
77
HOST_GROUP_ID: ${HOST_GROUP_ID}
88
HOST_IP: ${HOST_IP:-}
9-
PSR_HTTP_PROVIDER: ${PSR_HTTP_PROVIDER:-nyholm}
109
SYMFONY_REQUIRE: ${SYMFONY_REQUIRE:-4.4.*}
1110
image: league/oauth2-server-bundle
1211
volumes:

docs/index.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
# OAuth2-Server Bundle
2-
3-
Symfony bundle which provides OAuth 2.1 authorization/resource server capabilities on top of the [thephpleague/oauth2-server](https://github.com/thephpleague/oauth2-server) library.
4-
51
## Important notes
62

73
This bundle provides the "glue" between [thephpleague/oauth2-server](https://github.com/thephpleague/oauth2-server) library and the Symfony framework.
84
It implements [thephpleague/oauth2-server](https://github.com/thephpleague/oauth2-server) library in a way specified by its official documentation.
95
For implementation into Symfony projects, please see [bundle documentation](docs/basic-setup.md) and official [Symfony Security documentation](https://symfony.com/doc/current/security.html).
106

11-
## Status
12-
13-
This package is currently in the active development.
14-
157
## Features
168

179
* API endpoint for client authorization and token issuing
@@ -124,7 +116,7 @@ This package is currently in the active development.
124116

125117
```yaml
126118
oauth2:
127-
resource: '@LeagueOAuth2Bundle/Resources/config/routes.xml'
119+
resource: '@LeagueOAuth2ServerBundle/Resources/config/routes.xml'
128120
```
129121

130122
You can verify that everything is working by issuing a `POST` request to the `/token` endpoint.

phpunit.xml.dist

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<env name="KERNEL_CLASS" value="League\Bundle\OAuth2ServerBundle\Tests\TestKernel" />
1313
<env name="SHELL_VERBOSITY" value="-1" />
1414
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
15+
<env name="SYMFONY_PHPUNIT_REMOVE" value="" />
1516
</php>
1617

1718
<testsuites>
@@ -36,8 +37,4 @@
3637
</exclude>
3738
</whitelist>
3839
</filter>
39-
40-
<listeners>
41-
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
42-
</listeners>
4340
</phpunit>

src/Resources/config/storage/doctrine.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,19 @@
2020
<service id="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\ClientManager">
2121
<argument key="$entityManager" />
2222
</service>
23-
<service id="league.oauth2-server.manager.doctrine.client_manager" alias="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\ClientManager">
24-
<deprecated>The "%alias_id%" service alias is deprecated and will be removed in v4.</deprecated>
25-
</service>
2623

2724
<service id="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\AccessTokenManager">
2825
<argument key="$entityManager" />
2926
</service>
30-
<service id="league.oauth2-server.manager.doctrine.access_token_manager" alias="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\AccessTokenManager">
31-
<deprecated>The "%alias_id%" service alias is deprecated and will be removed in v4.</deprecated>
32-
</service>
3327

3428
<service id="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\RefreshTokenManager">
3529
<argument key="$entityManager" />
3630
</service>
37-
<service id="league.oauth2-server.manager.doctrine.refresh_token_manager" alias="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\RefreshTokenManager">
38-
<deprecated>The "%alias_id%" service alias is deprecated and will be removed in v4.</deprecated>
39-
</service>
4031

4132
<service id="League\Bundle\OAuth2ServerBundle\Manager\InMemory\ScopeManager" />
42-
<service id="league.oauth2-server.manager.in_memory.scope_manager" alias="League\Bundle\OAuth2ServerBundle\Manager\InMemory\ScopeManager">
43-
<deprecated>The "%alias_id%" service alias is deprecated and will be removed in v4.</deprecated>
44-
</service>
4533

4634
<service id="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\AuthorizationCodeManager">
4735
<argument key="$entityManager" />
4836
</service>
49-
<service id="league.oauth2-server.manager.doctrine.authorization_code_manager" alias="League\Bundle\OAuth2ServerBundle\Manager\Doctrine\AuthorizationCodeManager">
50-
<deprecated>The "%alias_id%" service alias is deprecated and will be removed in v4.</deprecated>
51-
</service>
5237
</services>
5338
</container>

0 commit comments

Comments
 (0)