From b1022d895db9be6ad9cfb43ad70bea0a829eba61 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 30 Sep 2015 14:35:11 +0200 Subject: [PATCH] standardization --- .editorconfig | 23 ++++++++++++ .gitattributes | 1 + .gitignore | 8 +++-- AUTHORS | 1 + BUGS | 1 + CONTRIBUTING.md | 39 ++++++++++++++++++++ README.md | 49 ++++++++++++++++++-------- THANKS | 4 +++ config.m4 | 8 +---- config.w32 | 25 +++++++------ config0.m4 | 24 +++++++++++++ package.xml | 38 ++++++++++++-------- php_raphf.c => src/php_raphf_api.c | 0 php_raphf_api.h => src/php_raphf_api.h | 0 14 files changed, 173 insertions(+), 48 deletions(-) create mode 100644 .editorconfig create mode 100644 AUTHORS create mode 100644 BUGS create mode 100644 CONTRIBUTING.md create mode 100644 THANKS create mode 100644 config0.m4 rename php_raphf.c => src/php_raphf_api.c (100%) rename php_raphf_api.h => src/php_raphf_api.h (100%) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9b444ae --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +; see http://editorconfig.org +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab +charset = utf-8 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.json] +indent_style = space +indent_size = 4 + +[package.xml] +indent_style = space +indent_size = 1 + +[config.w32] +end_of_line = crlf diff --git a/.gitattributes b/.gitattributes index 0c2cd57..b458680 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ package.xml merge=touch php_raphf.h merge=touch +config.w32 eol=crlf diff --git a/.gitignore b/.gitignore index 076cb14..f24f704 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ *~ /*.tgz /.deps -/*.lo -/*.la +*.lo +*.la /config.[^mw]* /configure* /lib* @@ -21,3 +21,7 @@ /autom4te* /.dep.inc run-tests.php +/.cproject +/.project +.libs/ +/php_raphf_api.h diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..67bbd91 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Michael Wallner diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..75711d2 --- /dev/null +++ b/BUGS @@ -0,0 +1 @@ +Yay, now known and unresolved issues yet! diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..968bd44 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,39 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of +fostering an open and welcoming community, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating +documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free +experience for everyone, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic + addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct. By adopting this Code of Conduct, project +maintainers commit themselves to fairly and consistently applying these +principles to every aspect of managing this project. Project maintainers who do +not follow or enforce the Code of Conduct may be permanently removed from the +project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by opening an issue or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the +[Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at http://contributor-covenant.org/version/1/2/0/. diff --git a/README.md b/README.md index 34f117e..63b3f63 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,48 @@ -# pecl/raphf +# ext-raphf -## About: +[![Build Status](https://travis-ci.org/m6w6/ext-raphf.svg?branch=v1.1.x)](https://travis-ci.org/m6w6/ext-raphf) The "Resource and Persistent Handle Factory" extension provides facilities to manage those in a convenient manner. -## Installation: +## Documentation -This extension is hosted at [PECL](http://pecl.php.net) and can be installed with [PEAR](http://pear.php.net)'s pecl command: +See the [online markdown reference](https://mdref.m6w6.name/raphf). - # pecl install raphf +Known issues are listed in [BUGS](./BUGS) and future ideas can be found in [TODO](./TODO). -Also, watch out for self-installing [pharext](https://github.com/m6w6/pharext) packages attached to [releases](https://github.com/m6w6/ext-raphf/releases). +## Installing +### PECL -## INI Directives: + pecl install raphf -* raphf.persistent_handle.limit = -1 - The per process/thread persistent handle limit. +### PHARext -## Internals: +Watch out for [PECL replicates](https://replicator.pharext.org?raphf) +and pharext packages attached to [releases](./releases). -> ***NOTE:*** - This extension mostly only provides infrastructure for other extensions. - See the [API docs here](http://m6w6.github.io/ext-raphf/). +### Checkout -## Documentation: + git clone github.com:m6w6/ext-raphf + cd ext-raphf + /path/to/phpize + ./configure --with-php-config=/path/to/php-config + make + sudo make install -Userland documentation can be found at https://mdref.m6w6.name/raphf +## ChangeLog + +A comprehensive list of changes can be obtained from the +[PECL website](https://pecl.php.net/package-changelog.php?package=raphf). + +## License + +ext-raphf is licensed under the 2-Clause-BSD license, which can be found in +the accompanying [LICENSE](./LICENSE) file. + +## Contributing + +All forms of contribution are welcome! Please see the bundled +[CONTRIBUTING](./CONTRIBUTING.md) note for the general principles followed. + +The list of past and current contributors is maintained in [THANKS](./THANKS). diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..8167585 --- /dev/null +++ b/THANKS @@ -0,0 +1,4 @@ +Thanks go to the following people, who have contributed to this project: + +Anatol Belski +Remi Collet diff --git a/config.m4 b/config.m4 index 13d3b83..3b883c8 100644 --- a/config.m4 +++ b/config.m4 @@ -1,7 +1 @@ -PHP_ARG_ENABLE(raphf, whether to enable raphf support, -[ --enable-raphf Enable resource and persistent handles factory support]) - -if test "$PHP_RAPHF" != "no"; then - PHP_INSTALL_HEADERS(ext/raphf, php_raphf.h php_raphf_api.h) - PHP_NEW_EXTENSION(raphf, php_raphf.c, $ext_shared) -fi +sinclude(config0.m4) diff --git a/config.w32 b/config.w32 index 5bdf84e..939cc1b 100644 --- a/config.w32 +++ b/config.w32 @@ -1,10 +1,15 @@ - - -ARG_ENABLE("raphf", "for raphf support", "no"); - -if (PHP_RAPHF == "yes") { - EXTENSION("raphf", "php_raphf.c"); - - AC_DEFINE("HAVE_RAPHF", 1); - PHP_INSTALL_HEADERS("ext/raphf", "php_raphf.h"); -} +ARG_ENABLE("raphf", "for raphf support", "no"); + +if (PHP_RAPHF == "yes") { + var PHP_RAPHF_HEADERS=glob("src/*.h"), PHP_RAPHF_SOURCES=glob("src/*.c"); + + EXTENSION("raphf", PHP_RAPHF_SOURCES); + PHP_INSTALL_HEADERS("ext/raphf", "php_propro.h"); + for (var i=0; i - ]]> - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/php_raphf.c b/src/php_raphf_api.c similarity index 100% rename from php_raphf.c rename to src/php_raphf_api.c diff --git a/php_raphf_api.h b/src/php_raphf_api.h similarity index 100% rename from php_raphf_api.h rename to src/php_raphf_api.h -- 2.30.2