Skip to content

Commit 6b90c60

Browse files
committed
Merge branch 'release/1.2.1'
2 parents 80ac6cf + 237739b commit 6b90c60

File tree

20 files changed

+4734
-1807
lines changed

20 files changed

+4734
-1807
lines changed

.github/workflows/php.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main", "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate --strict
22+
23+
- name: Cache Composer packages
24+
id: composer-cache
25+
uses: actions/cache@v3
26+
with:
27+
path: vendor
28+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-php-
31+
32+
- name: Install dependencies
33+
run: composer install --no-progress
34+
35+
- name: Run style
36+
run: composer run style
37+
38+
- name: Run test
39+
run: composer run test
40+
41+
- name: Upload coverage results to Coveralls
42+
env:
43+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
44+
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
45+

.readthedocs.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/conf.py
11+
12+
# Build documentation with MkDocs
13+
#mkdocs:
14+
# configuration: mkdocs.yml
15+
16+
# Optionally build your docs in additional formats such as PDF and ePub
17+
formats: all
18+
19+
# Optionally set the version of Python and requirements required to build your docs
20+
python:
21+
version: 3.8
22+
install:
23+
- requirements: docs/requirements.txt

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2012-2018, Christophe Demko
3+
Copyright (c) 2012-2023, Christophe Demko
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
PHP BitArray
22
======================
3-
[![Travis](https://img.shields.io/travis/chdemko/php-bitarray.svg)](http://travis-ci.org/chdemko/php-bitarray)
4-
[![Coveralls](https://img.shields.io/coveralls/chdemko/php-bitarray.svg)](https://coveralls.io/r/chdemko/php-bitarray?branch=master)
5-
[![Scrutinizer](https://img.shields.io/scrutinizer/g/chdemko/php-bitarray.svg)](https://scrutinizer-ci.com/g/chdemko/php-bitarray/?branch=master)
6-
[![PHP versions](https://img.shields.io/php-eye/chdemko/bitarray.svg)](https://packagist.org/packages/chdemko/bitarray)
3+
![PHP package](https://github.com/chdemko/php-bitarray/workflows/PHP%20Composer/badge.svg?branch=develop)
4+
[![Documentation Status](https://img.shields.io/readthedocs/php-bitarray.svg)](http://php-bitarray.readthedocs.io/en/latest/?badge=latest)
5+
[![Coveralls](https://img.shields.io/coveralls/chdemko/php-bitarray.svg)](https://coveralls.io/r/chdemko/php-bitarray?branch=develop)
6+
[![Scrutinizer](https://img.shields.io/scrutinizer/g/chdemko/php-bitarray/develop.svg)](https://scrutinizer-ci.com/g/chdemko/php-bitarray/?branch=develop)
7+
[![PHP versions](https://img.shields.io/packagist/dependency-v/chdemko/bitarray/php)](https://packagist.org/packages/chdemko/bitarray)
78
[![Latest Stable Version](https://img.shields.io/packagist/v/chdemko/bitarray.svg)](https://packagist.org/packages/chdemko/bitarray)
89
[![Packagist](https://img.shields.io/packagist/dt/chdemko/bitarray.svg)](https://packagist.org/packages/chdemko/bitarray)
910
[![Latest Unstable Version](https://poser.pugx.org/chdemko/bitarray/v/unstable.svg)](https://packagist.org/packages/chdemko/bitarray)
10-
[![License](https://poser.pugx.org/chdemko/bitarray/license.svg)](https://raw.githubusercontent.com/chdemko/php-bitarray/master/LICENSE)
11+
[![License](https://poser.pugx.org/chdemko/bitarray/license.svg)](https://raw.githubusercontent.com/chdemko/php-bitarray/develop/LICENSE)
1112

1213
BitArray for PHP.
1314

@@ -27,16 +28,18 @@ It also provides methods for bitwise logical operations between two bit arrays `
2728

2829
This project uses:
2930

30-
* [PHP Code Sniffer](https://github.com/squizlabs/php_codesniffer) for checking PHP code style using [Joomla Coding Standards](https://github.com/joomla/coding-standards)
31+
* [PHP Code Sniffer](https://github.com/squizlabs/php_codesniffer) for checking PHP code style
3132
* [PHPUnit](http://phpunit.de/) for unit test (100% covered)
32-
* [phpDocumentor](http://http://www.phpdoc.org/) for api documentation
33+
* [Sphinx](https://www.sphinx-doc.org/) and [Doxygen](https://www.doxygen.nl/) for the
34+
[documentation](http://php-sorted-collections.readthedocs.io/en/latest/?badge=latest)
3335

34-
Installation
36+
37+
Instructions
3538
------------
3639

3740
Using composer: either
3841

39-
~~~
42+
~~~shell
4043
$ composer create-project chdemko/bitarray:1.2.x-dev --dev; cd bitarray
4144
~~~
4245

@@ -49,38 +52,57 @@ or create a `composer.json` file containing
4952
}
5053
}
5154
~~~
55+
5256
and run
53-
~~~
57+
58+
~~~shell
5459
$ composer install
5560
~~~
5661

5762
Create a `test.php` file containing
63+
5864
~~~php
5965
<?php
66+
6067
require __DIR__ . '/vendor/autoload.php';
6168

6269
use chdemko\BitArray\BitArray;
6370

6471
$bits = BitArray::fromTraversable([true,false,false,true]);
6572
echo $bits . PHP_EOL;
6673
~~~
74+
6775
This should print
68-
~~~
76+
77+
~~~console
6978
1001
7079
~~~
80+
7181
See the [examples](https://github.com/chdemko/php-bitarray/tree/master/examples) folder for more information.
7282

7383
Documentation
7484
-------------
7585

76-
* [http://chdemko.github.io/php-bitarray](http://chdemko.github.io/php-bitarray)
86+
Run
87+
88+
~~~shell
89+
$ sudo apt install doxygen python3-pip python3-virtualenv
90+
$ virtualenv venv
91+
$ venv/bin/activate
92+
(venv) $ pip install -r docs/requirements.txt
93+
(venv) $ sphinx-build -b html docs/ html/
94+
(venv) $ deactivate
95+
$
96+
~~~
97+
98+
if you want to create local documentation with Sphinx.
7799

78100
Citation
79101
--------
80102

81-
If you are using this project including publication in research activities, you have to cite it using ([BibTeX format](https://raw.github.com/chdemko/php-bitarray/master/cite.bib)). You are also pleased to send me an email to [email protected].
103+
If you are using this project including publication in research activities, you have to cite it using ([BibTeX format](https://raw.github.com/chdemko/php-bitarray/develop/cite.bib)). You are also pleased to send me an email to [email protected].
82104
* authors: Christophe Demko
83105
* title: php-bitarray: a PHP library for handling bit arrays
84106
* year: 2014
85-
* how published: http://chdemko.github.io/php-bitarray
107+
* how published: https://packagist.org/packages/chdemko/bitarray/
86108

cite.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@Misc{php-bitarray-2014,
22
Author = {Christophe Demko},
33
Title = {php-bitarray: a PHP library for handling bit arrays},
4-
HowPublished = {http://chdemko.github.io/php-bitarray},
4+
HowPublished = {https://packagist.org/packages/chdemko/bitarray/},
55
year = 2014
66
}

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
"php": ">=5.5.0"
1818
},
1919
"require-dev": {
20-
"phpdocumentor/phpdocumentor": "2.9.*",
21-
"php-coveralls/php-coveralls": "^2.0",
22-
"joomla/coding-standards": "~2.0@alpha",
23-
"phpunit/phpunit": "^7.0"
20+
"php-coveralls/php-coveralls": "^2.5",
21+
"squizlabs/php_codesniffer": "3.*",
22+
"phpunit/phpunit": "^10.2"
2423
},
2524
"autoload": {
2625
"psr-4": {
@@ -29,7 +28,11 @@
2928
},
3029
"extra": {
3130
"branch-alias": {
32-
"dev-master": "1.2.x-dev"
31+
"dev-main": "1.2.x-dev"
3332
}
33+
},
34+
"scripts": {
35+
"style": "vendor/bin/phpcs --report=full --extensions=php --standard=PSR12 src tests examples",
36+
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit --log-junit junit.xml"
3437
}
3538
}

0 commit comments

Comments
 (0)