Skip to content

Commit

Permalink
PHP 8.0 support added
Browse files Browse the repository at this point in the history
  • Loading branch information
remorhaz committed Jan 15, 2021
1 parent 4ec600c commit 4f498a4
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 53 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
language: php

env:
global:
- XDEBUG=YES
- XDEBUG_MODE=coverage

matrix:
include:
- php: '7.3'
env: XDEBUG=YES
- php: '7.4'
env: XDEBUG=YES
- php: '8.0'

install:
- mkdir -p ./build/logs
- composer self-update
- composer install --prefer-source --no-interaction
- composer build

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- PHP 8.0 support.

## [0.7.3] - 2020-03-12
### Added
- Upgraded `remorhaz/php-unilex` to version 0.3.1.
Expand Down
30 changes: 0 additions & 30 deletions build.xml

This file was deleted.

14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
}
],
"require": {
"php": "^7.3",
"php": "^7.3 | ^8",
"ext-intl": "*",
"ext-json": "*",
"remorhaz/php-unilex": "^0.3.1",
"remorhaz/php-json-data": "^0.5.2",
"nikic/php-parser": "^4.3.0"
"remorhaz/php-unilex": "^0.4",
"remorhaz/php-json-data": "^0.5.3",
"nikic/php-parser": "^4.10"
},
"require-dev": {
"phpunit/phpunit": "^9.1",
"squizlabs/php_codesniffer": "^3.5.4",
"infection/infection": "^0.16"
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.5",
"infection/infection": "^0.18"
},
"autoload": {
"psr-4": {
Expand Down
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ services:
dockerfile: php-7.4.Dockerfile
volumes:
- .:/app
working_dir: /app
working_dir: /app
php8.0:
build:
context: .
dockerfile: php-8.0.Dockerfile
volumes:
- .:/app
working_dir: /app
4 changes: 3 additions & 1 deletion php-7.3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ RUN apt-get update && apt-get install -y \
pecl install xdebug && \
docker-php-ext-enable xdebug && \
docker-php-ext-configure intl --enable-intl && \
docker-php-ext-install intl
docker-php-ext-install intl && \
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" && \
echo "xdebug.max_nesting_level = 1024" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"

ENV COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_PROCESS_TIMEOUT=1200
Expand Down
5 changes: 4 additions & 1 deletion php-7.4.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ RUN apt-get update && apt-get install -y \
pecl install xdebug && \
docker-php-ext-enable xdebug && \
docker-php-ext-configure intl --enable-intl && \
docker-php-ext-install intl
docker-php-ext-install intl && \
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" && \
echo "xdebug.max_nesting_level = 1024" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"


ENV COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_PROCESS_TIMEOUT=1200
Expand Down
19 changes: 19 additions & 0 deletions php-8.0.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM php:8.0-cli

RUN apt-get update && apt-get install -y \
zip \
git \
libicu-dev && \
pecl install xdebug && \
docker-php-ext-enable xdebug && \
docker-php-ext-configure intl --enable-intl && \
docker-php-ext-install intl && \
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" && \
echo "xdebug.max_nesting_level = 1024" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"


ENV COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_PROCESS_TIMEOUT=1200

RUN curl --silent --show-error https://getcomposer.org/installer | php -- \
--install-dir=/usr/bin --filename=composer
File renamed without changes.
18 changes: 8 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
forceCoversAnnotation="true"
defaultTestSuite="all">
<testsuites>
<testsuite name="all">
<directory>tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist
processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/</directory>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">generated/</directory>
<exclude>
<file>generated/LookupTable.php</file>
</exclude>
</whitelist>
</filter>
</include>
<exclude>
<file>generated/LookupTable.php</file>
</exclude>
</coverage>
</phpunit>

0 comments on commit 4f498a4

Please sign in to comment.