Skip to content

Commit

Permalink
PHP 8 Compatiblity trial - adding PHP 8.0 (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobstrecansky authored Dec 15, 2020
1 parent efcf148 commit 7f7acaa
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4']
php-versions: ['7.3', '7.4', '8.0']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -44,6 +44,8 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest

- name: Check Style
env:
PHP_CS_FIXER_IGNORE_ENV: 1
run: vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --stop-on-violation --using-cache=no

- name: Run Phan
Expand Down
2 changes: 1 addition & 1 deletion .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
'vendor/php-http',
'vendor/phan/phan/src/Phan',
'vendor/phpunit/phpunit/src',
'vendor/endclothing/prometheus_client_php/src',
'vendor/promphp/prometheus_client_php/src',
],

// A list of individual files to include in analysis
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"type": "library",
"license": "Apache-2.0",
"require": {
"php": "^7.3",
"php": "^7.3 || ^8.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.5",
"guzzlehttp/guzzle": "^7.1.0",
"psr/http-client": "^1.0",
"php-http/guzzle6-adapter": "^2.0",
"endclothing/prometheus_client_php": "^1.0"
"php-http/guzzle7-adapter": "^0.1.1",
"promphp/prometheus_client_php": "^2.2.1"
},
"authors": [
{
Expand Down Expand Up @@ -42,7 +42,7 @@
"phpunit/phpunit": "^9.3",
"composer/xdebug-handler": "^1.3",
"phan/phan": "^3.0",
"friendsofphp/php-cs-fixer": "^2.16",
"friendsofphp/php-cs-fixer": "^2.17.1",
"vimeo/psalm": "^4.0",
"phpstan/phpstan": "^0.12.50",
"phpstan/phpstan-phpunit": "^0.12.16",
Expand Down
2 changes: 1 addition & 1 deletion contrib/Otlp/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Request;
use Http\Adapter\Guzzle6\Client;
use Http\Adapter\Guzzle7\Client;
use OpenTelemetry\Sdk\Trace;
use OpenTelemetry\Trace as API;
use Psr\Http\Client\ClientExceptionInterface;
Expand Down
2 changes: 1 addition & 1 deletion contrib/Zipkin/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Psr7\Request;
use Http\Adapter\Guzzle6\Client;
use Http\Adapter\Guzzle7\Client;
use InvalidArgumentException;
use OpenTelemetry\Sdk\Trace;
use OpenTelemetry\Trace as API;
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM php:7.3-buster
FROM php:8-buster

RUN apt-get -y update && apt-get -y install git zip && \
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
chmod +x /usr/local/bin/composer && \
pecl install ast-1.0.4 xdebug && \
pecl install ast-1.0.10 xdebug && \
docker-php-ext-enable ast xdebug && \
# The pcntl extension is used for speeding up `make phan`
docker-php-ext-install pcntl
Expand Down

0 comments on commit 7f7acaa

Please sign in to comment.