Skip to content

Commit

Permalink
Extension interface fixes; Remove phpbench; CI action (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
zloyuser authored Jan 3, 2021
1 parent 5413bf0 commit 1e98e90
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 277 deletions.
8 changes: 1 addition & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
.github export-ignore
.gitattributes export-ignore
.gitignore export-ignore
CONDUCT.md export-ignore
CONTRIBUTING.md export-ignore
ISSUE_TEMPLATE.md export-ignore
tests export-ignore
LICENSE.md export-ignore
PULL_REQUEST_TEMPLATE.md export-ignore
README.md export-ignore
tests export-ignore
benchmarks export-ignore
phpunit.xml export-ignore
phpbench.json export-ignore
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Not obligatory, but suggest an idea for implementing addition or change.

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

* Version used (e.g. PHP 7.0, PHP 7.1.2):
* Operating system and version (e.g. Ubuntu 16.04, Windows 7):
* Version used (e.g. PHP 8.0, PHP 7.1.2):
* Operating system and version (e.g. Ubuntu 20.04, Windows 10):
* Link to your project or gist, code sample
* Other important for issuer reproduce information
* Other important for issue reproduce information
File renamed without changes.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Continuous Integration"

on: [ push ]

jobs:
phpunit:
strategy:
matrix:
os: [ ubuntu-latest ]
php: [ '7.3', '7.4', '8.0' ]
name: PHPUnit (PHP ${{ matrix.php }}) tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
PHP_EXTENSIONS: mbstring, dom, intl, json, libxml, xml, xmlwriter, sockets
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}
tools: composer:v2

- name: Install dependencies
run: composer update -ov

- name: Run tests with phpunit
run: php ./vendor/bin/phpunit
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.phpunit.result.cache
composer.lock
/.vscode
/.idea
/tmp
/vendor
/build
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

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

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

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CONDUCT.md) for details.

## Security

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

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

[link-extension]: https://github.com/phpinnacle/ext-buffer
[link-packagist]: https://packagist.org/packages/phpinnacle/buffer
[link-scrutinizer]: https://scrutinizer-ci.com/g/phpinnacle/buffer/code-structure
[link-downloads]: https://packagist.org/packages/phpinnacle/buffer
[link-author]: https://github.com/phpinnacle
[link-contributors]: https://github.com/phpinnacle/buffer/graphs/contributors
81 changes: 0 additions & 81 deletions benchmarks/AppendBench.php

This file was deleted.

74 changes: 0 additions & 74 deletions benchmarks/ConsumeBench.php

This file was deleted.

66 changes: 0 additions & 66 deletions benchmarks/ReadBench.php

This file was deleted.

10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,26 @@
}
],
"require": {
"php": "^7.1 || ^8.0"
"php": ">=7.3"
},
"require-dev": {
"phpbench/phpbench": "^0.17",
"phpunit/phpunit": "^9.0"
},
"suggest": {
"ext-buffer": "C extension to speed up pack/unpack binary data"
},
"autoload": {
"psr-4": {
"PHPinnacle\\Buffer\\": "src"
"PHPinnacle\\Buffer\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"PHPinnacle\\Buffer\\Tests\\": "tests"
"PHPinnacle\\Buffer\\Tests\\": "tests/"
}
},
"scripts": {
"test": "phpunit",
"bench": "phpbench run benchmarks --report=aggregate"
"test": "phpunit"
},
"extra": {
"branch-alias": {
Expand Down
3 changes: 0 additions & 3 deletions phpbench.json

This file was deleted.

Loading

0 comments on commit 1e98e90

Please sign in to comment.