Skip to content

Commit

Permalink
The library now fully supports PHP 8.0 and min PHP version now bumped…
Browse files Browse the repository at this point in the history
… to PHP 7.3+,. Updated docblocks where was previously using my previous GitHub username. phpunit test cases and xml manifest now fully compatible with PHPUnit 9. README file explains how to install older versions of this lib to support older PHP versions.
  • Loading branch information
allebb committed Dec 23, 2020
1 parent 24667a3 commit b119106
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 51 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
strategy:
fail-fast: false
matrix:
#php-versions: [ '7.3', '7.4', '8.0' ]
php-versions: [ '7.3', '7.4', '8.0' ]

steps:
Expand All @@ -27,26 +26,9 @@ jobs:
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

#- name: Cache composer dependencies
# uses: actions/cache@v2
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# # Use composer.json for key, if composer.lock is not committed.
# # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
# restore-keys: ${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer install --no-suggest --no-progress --prefer-dist --optimize-autoloader

#- name: PHPUnit Tests
# uses: php-actions/phpunit@v1
# with:
# bootstrap: vendor/autoload.php
# configuration: phpunit.xml
# args: --coverage-text
# memory_limit: 256M

- name: PHPUnit Tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml

Expand All @@ -60,7 +42,7 @@ jobs:
yml: ./codedev.yml
fail_ci_if_error: true

# For code coverage report we are uploading our code coverage report to scrutinizer
# For code coverage report we are uploading our code coverage report to Scrutinizer
- name: Downloading scrutinizer ocular.phar
run: wget https://scrutinizer-ci.com/ocular.phar

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Requirements

This library is unit tested against PHP 7.3, 7.4 and 8.0!

If you need to use an older version of PHP, you should instead install the 1.x version of this library (see below for details).

License
-------

Expand All @@ -31,6 +33,13 @@ The recommended way of installing this library is via. [Composer](http://getcomp
composer require ballen/linguist
```

*If you need to use an older version of PHP, version 1.x.x supports PHP 5.6, 7.0, 7.1 and 7.2, you can install this version using Composer with this command instead:**

```shell
composer require ballen/linguist ^1.0
```


Examples
--------

Expand Down
2 changes: 1 addition & 1 deletion phpunit.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
35 changes: 12 additions & 23 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="phpunit.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
>
<testsuites>
<testsuite name="Package Unit Tests">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="phpunit.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnError="false" stopOnFailure="false" verbose="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Package Unit Tests">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/HtmlTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/MarkdownTansformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/PlaintextTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/TransformerInitTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/TransformerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author Bobby Allen <ballen@bobbyallen.me>
* @license http://www.gnu.org/licenses/gpl-3.0.html
* @link https://github.com/bobsta63/linguist
* @link https://github.com/allebb/linguist
* @link http://www.bobbyallen.me
*
*/
Expand Down

0 comments on commit b119106

Please sign in to comment.