Skip to content

Commit 1e98e90

Browse files
authored
Extension interface fixes; Remove phpbench; CI action (#5)
1 parent 5413bf0 commit 1e98e90

17 files changed

+78
-277
lines changed

.gitattributes

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
.github export-ignore
22
.gitattributes export-ignore
33
.gitignore export-ignore
4-
CONDUCT.md export-ignore
5-
CONTRIBUTING.md export-ignore
6-
ISSUE_TEMPLATE.md export-ignore
4+
tests export-ignore
75
LICENSE.md export-ignore
8-
PULL_REQUEST_TEMPLATE.md export-ignore
96
README.md export-ignore
10-
tests export-ignore
11-
benchmarks export-ignore
127
phpunit.xml export-ignore
13-
phpbench.json export-ignore

CONDUCT.md .github/CONDUCT.md

File renamed without changes.
File renamed without changes.

ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Not obligatory, but suggest an idea for implementing addition or change.
1818

1919
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
2020

21-
* Version used (e.g. PHP 7.0, PHP 7.1.2):
22-
* Operating system and version (e.g. Ubuntu 16.04, Windows 7):
21+
* Version used (e.g. PHP 8.0, PHP 7.1.2):
22+
* Operating system and version (e.g. Ubuntu 20.04, Windows 10):
2323
* Link to your project or gist, code sample
24-
* Other important for issuer reproduce information
24+
* Other important for issue reproduce information
File renamed without changes.

.github/workflows/ci.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Continuous Integration"
2+
3+
on: [ push ]
4+
5+
jobs:
6+
phpunit:
7+
strategy:
8+
matrix:
9+
os: [ ubuntu-latest ]
10+
php: [ '7.3', '7.4', '8.0' ]
11+
name: PHPUnit (PHP ${{ matrix.php }}) tests on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
env:
14+
PHP_EXTENSIONS: mbstring, dom, intl, json, libxml, xml, xmlwriter, sockets
15+
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Install PHP with extensions
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
extensions: ${{ env.PHP_EXTENSIONS }}
25+
ini-values: ${{ env.PHP_INI_VALUES }}
26+
tools: composer:v2
27+
28+
- name: Install dependencies
29+
run: composer update -ov
30+
31+
- name: Run tests with phpunit
32+
run: php ./vendor/bin/phpunit

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
.phpunit.result.cache
21
composer.lock
32
/.vscode
43
/.idea
4+
/tmp
55
/vendor
6-
/build

README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![Latest Version on Packagist][ico-version]][link-packagist]
44
[![Software License][ico-license]](LICENSE.md)
5-
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
65
[![Total Downloads][ico-downloads]][link-downloads]
76

87
PHPinnacle Buffer is a simple tool for operating binary data in PHP. Mostly it simply wraps PHP pack/unpack functions.
@@ -68,7 +67,7 @@ And results with enabled [extension][link-extension]:
6867

6968
## Contributing
7069

71-
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
70+
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CONDUCT.md) for details.
7271

7372
## Security
7473

@@ -85,12 +84,10 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
8584

8685
[ico-version]: https://img.shields.io/packagist/v/phpinnacle/buffer.svg?style=flat-square
8786
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
88-
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/phpinnacle/buffer.svg?style=flat-square
8987
[ico-downloads]: https://img.shields.io/packagist/dt/phpinnacle/buffer.svg?style=flat-square
9088

9189
[link-extension]: https://github.com/phpinnacle/ext-buffer
9290
[link-packagist]: https://packagist.org/packages/phpinnacle/buffer
93-
[link-scrutinizer]: https://scrutinizer-ci.com/g/phpinnacle/buffer/code-structure
9491
[link-downloads]: https://packagist.org/packages/phpinnacle/buffer
9592
[link-author]: https://github.com/phpinnacle
9693
[link-contributors]: https://github.com/phpinnacle/buffer/graphs/contributors

benchmarks/AppendBench.php

-81
This file was deleted.

benchmarks/ConsumeBench.php

-74
This file was deleted.

benchmarks/ReadBench.php

-66
This file was deleted.

composer.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,26 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.1 || ^8.0"
19+
"php": ">=7.3"
2020
},
2121
"require-dev": {
22-
"phpbench/phpbench": "^0.17",
2322
"phpunit/phpunit": "^9.0"
2423
},
2524
"suggest": {
2625
"ext-buffer": "C extension to speed up pack/unpack binary data"
2726
},
2827
"autoload": {
2928
"psr-4": {
30-
"PHPinnacle\\Buffer\\": "src"
29+
"PHPinnacle\\Buffer\\": "src/"
3130
}
3231
},
3332
"autoload-dev": {
3433
"psr-4": {
35-
"PHPinnacle\\Buffer\\Tests\\": "tests"
34+
"PHPinnacle\\Buffer\\Tests\\": "tests/"
3635
}
3736
},
3837
"scripts": {
39-
"test": "phpunit",
40-
"bench": "phpbench run benchmarks --report=aggregate"
38+
"test": "phpunit"
4139
},
4240
"extra": {
4341
"branch-alias": {

phpbench.json

-3
This file was deleted.

0 commit comments

Comments
 (0)