[Web] Some minor fixes and improvements for PHP 8

This commit is contained in:
andryyy
2021-08-08 16:06:55 +02:00
parent eec75690e0
commit cf8fdae277
138 changed files with 2398 additions and 2342 deletions

View File

@@ -0,0 +1,60 @@
name: CI
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.2, 7.3, 7.4, 8.0]
dependency-version: [prefer-lowest, prefer-stable]
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mailparse
coverage: none
- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest --no-progress
- name: Execute tests
run: vendor/bin/phpunit
php-cs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Install dependencies
run: composer update --no-progress --ignore-platform-reqs
- name: Execute phpcs
run: vendor/bin/phpcs src tests --standard=psr2
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mailparse
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-suggest --no-progress
- name: Execute code coverage
run: |
vendor/bin/phpunit --coverage-clover=coverage.xml --whitelist src
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.COVERALLS_REPO_TOKEN }}

View File

@@ -1,6 +1,6 @@
# php-mime-mail-parser
A fully tested email parser for PHP 7.1+ (mailparse extension wrapper).
A fully tested email parser for PHP 7.2+ (mailparse extension wrapper).
It's the most effective php email parser around in terms of performance, foreign character encoding, attachment handling, and ease of use.
Internet Message Format RFC [822](https://tools.ietf.org/html/rfc822), [2822](https://tools.ietf.org/html/rfc2822), [5322](https://tools.ietf.org/html/rfc5322).
@@ -23,7 +23,7 @@ Yes. All known issues have been reproduced, fixed and tested.
We use GitHub Actions, Codecov, Codacy to help ensure code quality. You can see real-time statistics below:
[![Actions Status](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/badge/php-mime-mail-parser/php-mime-mail-parser?style=flat-square)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/php-mime-mail-parser/php-mime-mail-parser)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fphp-mime-mail-parser%2Fphp-mime-mail-parser%2Fbadge%3Fref%3Dmaster&style=flat-square)](https://actions-badge.atrox.dev/php-mime-mail-parser/php-mime-mail-parser/goto?ref=master)
[![Coverage](https://img.shields.io/codecov/c/gh/php-mime-mail-parser/php-mime-mail-parser?style=flat-square)](https://codecov.io/gh/php-mime-mail-parser/php-mime-mail-parser)
[![Code Quality](https://img.shields.io/codacy/grade/4e0e44fee21147ddbdd18ff976251875?style=flat-square)](https://app.codacy.com/app/php-mime-mail-parser/php-mime-mail-parser)
@@ -40,19 +40,20 @@ To install the latest version of PHP MIME Mail Parser, run the command below:
The following versions of PHP are supported:
* PHP 7.1
* PHP 7.2
* PHP 7.3
* PHP 7.4
Previous Versions:
| PHP Compatibility | Version |
| ------------- | ------------- |
| HHVM | php-mime-mail-parser 2.11.1 |
| PHP 5.4 | php-mime-mail-parser 2.11.1 |
| PHP 5.5 | php-mime-mail-parser 2.11.1 |
| HHVM | php-mime-mail-parser 2.11.1 |
| PHP 5.4 | php-mime-mail-parser 2.11.1 |
| PHP 5.5 | php-mime-mail-parser 2.11.1 |
| PHP 5.6 | php-mime-mail-parser 3.0.4 |
| PHP 7.0 | php-mime-mail-parser 3.0.4 |
| PHP 7.1 | php-mime-mail-parser 5.0.5 |
Make sure you have the mailparse extension (http://php.net/manual/en/book.mailparse.php) properly installed. The command line `php -m | grep mailparse` need to return "mailparse".

View File

@@ -1,7 +1,7 @@
{
"name": "php-mime-mail-parser/php-mime-mail-parser",
"type": "library",
"description": "A fully tested email parser for PHP 7.1+ (mailparse extension wrapper).",
"description": "A fully tested email parser for PHP 7.2+ (mailparse extension wrapper).",
"keywords": ["mime", "mail", "mailparse", "MimeMailParser", "parser", "php"],
"homepage": "https://github.com/php-mime-mail-parser/php-mime-mail-parser",
"license": "MIT",
@@ -42,14 +42,13 @@
"url":"https://github.com/php-mime-mail-parser/php-mime-mail-parser.git"
},
"require": {
"php": "^7.1",
"php": "^7.2|^8.0",
"ext-mailparse": "*"
},
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpunit/php-token-stream": "^3.0",
"php-coveralls/php-coveralls": "^2.1",
"squizlabs/php_codesniffer": "^3.4"
"phpunit/phpunit": "^8.0",
"php-coveralls/php-coveralls": "^2.2",
"squizlabs/php_codesniffer": "^3.5"
},
"replace": {
"exorus/php-mime-mail-parser": "*",