Skip to content

Commit 60e2098

Browse files
committed
bug #127 Fix Dockerfile with modern PHP stack (ajgarlag)
This PR was squashed before being merged into the 0.4-dev branch. Discussion ---------- Fix Dockerfile with modern PHP stack In order to compile php extensions we need to modernize the PHP stack Commits ------- e32abc8 Fix Dockerfile with modern PHP stack
2 parents ff14fe0 + e32abc8 commit 60e2098

File tree

7 files changed

+27
-21
lines changed

7 files changed

+27
-21
lines changed

.github/workflows/unit-tests.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,19 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
#Stable supported versions
13-
php: ['7.4', '8.0', '8.1']
14-
symfony: ['5.3.*', '5.4.*', '6.0.*', '6.1.*']
13+
php: ['7.4', '8.0', '8.1', '8.2']
14+
symfony: ['5.4.*', '6.2.*']
1515
composer-flags: ['--prefer-stable']
1616
can-fail: [false]
1717
exclude:
1818
- php: '7.4'
19-
symfony: '6.0.*'
20-
- php: '7.4'
21-
symfony: '6.1.*'
19+
symfony: '6.2.*'
2220
- php: '8.0'
23-
symfony: '6.1.*'
21+
symfony: '6.2.*'
2422
include:
2523
# Lowest supported versions
2624
- php: '7.2'
27-
symfony: '5.3.*'
25+
symfony: '5.4.*'
2826
composer-flags: '--prefer-stable --prefer-lowest'
2927
can-fail: false
3028
# EOL PHP versions
@@ -37,10 +35,10 @@ jobs:
3735
composer-flags: '--prefer-stable'
3836
can-fail: false
3937
# Development versions
40-
- php: '8.1'
41-
symfony: '6.2.x-dev'
38+
- php: '8.2'
39+
symfony: '6.3.x-dev'
4240
composer-flags: ''
43-
can-fail: false
41+
can-fail: true
4442

4543
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
4644

@@ -51,8 +49,13 @@ jobs:
5149
- name: "checkout"
5250
uses: "actions/checkout@v2"
5351

54-
- name: "build the environment"
52+
- name: "build the PHP7 environment"
5553
run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} php"
54+
if: startsWith(matrix.php, '7')
55+
56+
- name: "build the PHP8 environment"
57+
run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} --build-arg XDEBUG_VERSION='3.2.0' php"
58+
if: startsWith(matrix.php, '8')
5659

5760
- name: "install dependencies"
5861
run: "dev/bin/php composer update --ansi ${{ matrix.composer-flags }}"

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
"league/oauth2-server": "^8.3",
2323
"nyholm/psr7": "^1.4",
2424
"psr/http-factory": "^1.0",
25-
"symfony/event-dispatcher": "^5.3|^6.0",
26-
"symfony/framework-bundle": "^5.3|^6.0",
25+
"symfony/event-dispatcher": "^5.4|^6.2",
26+
"symfony/framework-bundle": "^5.4|^6.2",
2727
"symfony/polyfill-php81": "^1.22",
2828
"symfony/psr-http-message-bridge": "^2.0",
29-
"symfony/security-bundle": "^5.3|^6.0"
29+
"symfony/security-bundle": "^5.4|^6.2"
3030
},
3131
"require-dev": {
3232
"ext-pdo": "*",
3333
"ext-pdo_sqlite": "*",
34-
"symfony/browser-kit": "^5.3|^6.0",
35-
"symfony/phpunit-bridge": "^5.3|^6.0"
34+
"symfony/browser-kit": "^5.4|^6.2",
35+
"symfony/phpunit-bridge": "^5.4|^6.2"
3636
},
3737
"autoload": {
3838
"psr-4": { "League\\Bundle\\OAuth2ServerBundle\\": "src/" }

dev/docker/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ LABEL maintainer="Petar Obradović <petar.obradovic@trikoder.net>"
77
RUN mkdir -p /app/bin
88
ENV PATH /app/bin:$PATH
99

10+
ARG XDEBUG_VERSION=3.1.6
11+
1012
# Install needed core and PECL extensions
1113
RUN apk add --update --no-cache --virtual .build-deps \
1214
${PHPIZE_DEPS} \
1315
libxml2-dev \
1416
libzip-dev \
17+
linux-headers \
1518
zlib-dev \
1619
&& docker-php-ext-install -j $(getconf _NPROCESSORS_ONLN) \
1720
xml \
1821
zip \
1922
&& pecl install \
20-
xdebug \
23+
xdebug-${XDEBUG_VERSION} \
2124
&& docker-php-ext-enable \
2225
xdebug \
2326
&& apk del --purge .build-deps

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
HOST_USER_ID: ${HOST_USER_ID}
77
HOST_GROUP_ID: ${HOST_GROUP_ID}
88
HOST_IP: ${HOST_IP:-}
9-
SYMFONY_REQUIRE: ${SYMFONY_REQUIRE:-5.3.*}
9+
SYMFONY_REQUIRE: ${SYMFONY_REQUIRE:-5.4.*}
1010
image: league/oauth2-server-bundle
1111
volumes:
1212
- .:/app/src

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For implementation into Symfony projects, please see [bundle documentation](basi
1313
## Requirements
1414

1515
* [PHP 7.2](http://php.net/releases/7_2_0.php) or greater
16-
* [Symfony 5.2](https://symfony.com/roadmap/5.2) or greater
16+
* [Symfony 5.4](https://symfony.com/roadmap/5.4) or greater
1717

1818
## Installation
1919

src/Security/Authenticator/OAuth2Authenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function doAuthenticate(Request $request) /* : Passport */
128128
/**
129129
* @return OAuth2Token
130130
*
131-
* @psalm-suppress DeprecatedClass
131+
* @psalm-suppress DeprecatedInterface
132132
*/
133133
public function createAuthenticatedToken(PassportInterface $passport, string $firewallName): TokenInterface
134134
{

src/Security/EventListener/CheckScopeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function checkPassport(CheckPassportEvent $event): void
3131
/**
3232
* @var Passport $passport
3333
*
34-
* @psalm-suppress DeprecatedClass
34+
* @psalm-suppress DeprecatedInterface
3535
*/
3636
$passport = $event->getPassport();
3737
if (!$passport->hasBadge(ScopeBadge::class)) {

0 commit comments

Comments
 (0)