Skip to content

Commit

Permalink
Update example app to work with PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyparker committed Oct 17, 2023
1 parent 3df9015 commit e35f1f5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions example/composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"require": {
"slim/slim": "4.7.1",
"slim/psr7": "1.3.0",
"slim/php-view": "3.0.0",
"bryanjhv/slim-session": "4.0",
"slim/slim": "4.12.0",
"slim/psr7": "1.6.1",
"slim/php-view": "3.2.0",
"bryanjhv/slim-session": "4.1.2",
"duosecurity/duo_universal_php": "@dev"
},
"repositories": [
Expand Down
6 changes: 4 additions & 2 deletions example/dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM php:7
FROM php:8
EXPOSE 8080
RUN apt update && apt install -y unzip wget
WORKDIR /root
RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/885ece8a6e1370b204b89b7a542169d25aa21177/web/installer -O - -q | php -- --quiet
ADD . /src

ADD ./composer.json /src/composer.json
WORKDIR /src
RUN /root/composer.phar update
ADD . /src
ENTRYPOINT ["php", "-S", "0.0.0.0:8080"]
2 changes: 1 addition & 1 deletion example/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$config['api_hostname'],
$config['redirect_uri'],
true,
$config['http_proxy'],
$config['http_proxy'] ?? null,
);
} catch (DuoException $e) {
throw new ErrorException("*** Duo config error. Verify the values in duo.conf are correct ***\n" . $e->getMessage());
Expand Down

0 comments on commit e35f1f5

Please sign in to comment.