-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# https://php.watch/articles/composer-gitattributes | ||
|
||
# Exclude build/test files from archive | ||
/.github export-ignore | ||
/build export-ignore | ||
/tests export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/phpunit.xml.dist export-ignore | ||
|
||
# Configure diff output for .php and .phar files. | ||
*.php diff=php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: | ||
- pull_request | ||
- push | ||
|
||
name: CI | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
php: | ||
- "8.1" | ||
- "8.2" | ||
- "8.3" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: pcov | ||
ini-values: assert.exception=1, zend.assertions=1 | ||
|
||
- name: Install composer dependencies | ||
run: composer update --no-ansi --no-interaction --no-progress | ||
|
||
- name: Run tests with phpunit | ||
run: vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/vendor/ | ||
/build/ | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "phpwatch/mb-trim-polyfill", | ||
"description": "PHP: Provides a user-land polyfill for `mb_trim`, `mb_ltrim`, and `mb_rtrim` functions added in PHP 8.4.", | ||
"type": "library", | ||
"require": { | ||
"php": "^8.1", | ||
"ext-mbstring": "*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^10.5.5" | ||
}, | ||
"conflict": { | ||
"php": "^8.4" | ||
}, | ||
"license": "MIT", | ||
"autoload": { | ||
"psr-4": { | ||
"Phpwatch\\MbTrimPolyfill\\": "src/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Ayesh Karunaratne", | ||
"email": "[email protected]" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" cacheResult="true" colors="true" cacheDirectory=".phpunit.cache" requireCoverageMetadata="false" beStrictAboutCoverageMetadata="true"> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory suffix="Test.php">tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage> | ||
<report> | ||
<html outputDirectory="build/coverage-html"/> | ||
<text outputFile="php://stdout" showUncoveredFiles="false"/> | ||
</report> | ||
</coverage> | ||
<logging> | ||
<testdoxHtml outputFile="build/coverage-html"/> | ||
</logging> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</source> | ||
</phpunit> |