Skip to content

Commit

Permalink
Merge pull request #186 from davidbyoung/php-8.4
Browse files Browse the repository at this point in the history
Added GitHub Actions, fixed PHP 8.4 deprecation
  • Loading branch information
erusev authored Nov 3, 2024
2 parents cd57cf1 + b000c29 commit acebd17
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 41 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
- push
- pull_request

jobs:
phpunit:
runs-on: ubuntu-latest

strategy:
matrix:
php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'

steps:
- name: Checkout the source code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php }}'

- name: Install dependencies
run: composer install --prefer-source --no-interaction

- name: Run tests
run: vendor/bin/phpunit
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
.phpunit.result.cache
composer.lock
vendor/
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions ParsedownExtra.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ protected function blockMarkupComplete($Block)
#
# Setext

protected function blockSetextHeader($Line, array $Block = null)
protected function blockSetextHeader($Line, ?array $Block = null)
{
$Block = parent::blockSetextHeader($Line, $Block);

Expand Down Expand Up @@ -683,4 +683,4 @@ protected function sortFootnotes($A, $B) # callback
#

protected $regexAttribute = '(?:[#.][-\w]+[ ]*)';
}
}
17 changes: 10 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
"homepage": "https://erusev.com"
}
],
"require": {
"erusev/parsedown": "^1.8.0|^1.8.0-beta-4",
"php": ">=5.3.6",
"erusev/parsedown": "dev-master",
"ext-dom": "*",
"ext-mbstring": "*"
"ext-libxml": "*",
"ext-mbstring": "*",
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35"
"phpunit/phpunit": "^7.5|^8.5|^9.6"
},
"autoload": {
"psr-0": {"ParsedownExtra": ""}
"psr-0": {
"ParsedownExtra": ""
}
},
"autoload-dev": {
"psr-0": {
Expand All @@ -33,4 +36,4 @@
"CommonMarkTestWeak": "vendor/erusev/parsedown/test/"
}
}
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<testsuites>
<testsuite>
<testsuite name="ParsedownExtra">
<file>test/ParsedownExtraTest.php</file>
</testsuite>
</testsuites>
Expand Down

0 comments on commit acebd17

Please sign in to comment.