Skip to content

Commit bf18d5c

Browse files
committed
Initial release
0 parents  commit bf18d5c

39 files changed

+1912
-0
lines changed

.gitattributes

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Do not put this files on a distribution package (by .gitignore)
5+
/tools export-ignore
6+
/vendor export-ignore
7+
/composer.lock export-ignore
8+
9+
# Do not put this files on a distribution package
10+
/build/ export-ignore
11+
/develop/ export-ignore
12+
/tests/ export-ignore
13+
/.gitattributes export-ignore
14+
/.gitignore export-ignore
15+
/.php_cs.dist export-ignore
16+
/.scrutinizer.yml export-ignore
17+
/.travis.yml export-ignore
18+
/infection.json.dist export-ignore
19+
/phpcs.xml.dist export-ignore
20+
/phpunit.xml.dist export-ignore
21+
/psalm.xml export-ignore

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# do not include this files on git
2+
/tools
3+
/vendor
4+
/composer.lock

.php_cs.dist

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
return PhpCsFixer\Config::create()
6+
->setRiskyAllowed(true)
7+
->setCacheFile(__DIR__ . '/build/php_cs.cache')
8+
->setRules([
9+
'@PSR2' => true,
10+
'@PHP70Migration' => true,
11+
'@PHP70Migration:risky' => true,
12+
'@PHP71Migration' => true,
13+
'@PHP71Migration:risky' => true,
14+
'@PHP73Migration' => true,
15+
// symfony
16+
'class_attributes_separation' => true,
17+
'whitespace_after_comma_in_array' => true,
18+
'no_empty_statement' => true,
19+
'no_extra_blank_lines' => true,
20+
'function_typehint_space' => true,
21+
'no_alias_functions' => true,
22+
'trailing_comma_in_multiline_array' => true,
23+
'new_with_braces' => true,
24+
'no_blank_lines_after_class_opening' => true,
25+
'no_blank_lines_after_phpdoc' => true,
26+
'object_operator_without_whitespace' => true,
27+
'binary_operator_spaces' => true,
28+
'phpdoc_scalar' => true,
29+
'self_accessor' => true,
30+
'no_trailing_comma_in_singleline_array' => true,
31+
'single_quote' => true,
32+
'no_singleline_whitespace_before_semicolons' => true,
33+
'no_unused_imports' => true,
34+
'no_whitespace_in_blank_line' => true,
35+
'yoda_style' => ['equal' => true, 'identical' => true, 'less_and_greater' => null],
36+
'standardize_not_equals' => true,
37+
// contrib
38+
'concat_space' => ['spacing' => 'one'],
39+
'not_operator_with_successor_space' => true,
40+
'single_blank_line_before_namespace' => true,
41+
'linebreak_after_opening_tag' => true,
42+
'blank_line_after_opening_tag' => true,
43+
'ordered_imports' => true,
44+
'array_syntax' => ['syntax' => 'short'],
45+
])
46+
->setFinder(
47+
PhpCsFixer\Finder::create()
48+
->in(__DIR__)
49+
->exclude(['vendor', 'tools', 'build'])
50+
)
51+
;

.scrutinizer.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
filter:
2+
excluded_paths:
3+
- 'tests/'
4+
- 'vendor/'
5+
6+
build:
7+
dependencies:
8+
override:
9+
- composer self-update --no-interaction --no-progress
10+
- composer install --no-interaction --no-progress
11+
nodes:
12+
analysis:
13+
tests:
14+
override:
15+
- php-scrutinizer-run --enable-security-analysis
16+
- command: vendor/bin/phpunit --verbose --coverage-clover=build/coverage.clover
17+
coverage:
18+
file: build/coverage.clover
19+
format: clover

.travis.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: php
2+
3+
# php compatibility
4+
php: ['7.3', '7.4']
5+
6+
cache:
7+
- directories:
8+
- $HOME/.composer
9+
10+
before_script:
11+
- phpenv config-rm xdebug.ini || true
12+
- travis_retry composer install --no-interaction --no-progress --prefer-dist
13+
- bash develop/install-development-tools
14+
15+
script:
16+
- tools/phpcs -sp src/ tests/
17+
- tools/php-cs-fixer fix --dry-run --verbose
18+
- vendor/bin/phpunit --testdox --verbose
19+
- tools/phpstan analyse --level max --no-progress --verbose src/ tests/
20+
- tools/psalm --no-progress
21+
- phpdbg -qrr tools/infection --no-progress --no-interaction --show-mutations || true
22+
23+
notifications:
24+
email:
25+
if: branch = master

CODE_OF_CONDUCT.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
26+
* Trolling, insulting/derogatory comments, and personal or political attacks
27+
* Public or private harassment
28+
* Publishing others' private information, such as a physical or electronic
29+
address, without explicit permission
30+
* Other conduct which could reasonably be considered inappropriate in a
31+
professional setting
32+
33+
## Our Responsibilities
34+
35+
Project maintainers are responsible for clarifying the standards of acceptable
36+
behavior and are expected to take appropriate and fair corrective action in
37+
response to any instances of unacceptable behavior.
38+
39+
Project maintainers have the right and responsibility to remove, edit, or
40+
reject comments, commits, code, wiki edits, issues, and other contributions
41+
that are not aligned to this Code of Conduct, or to ban temporarily or
42+
permanently any contributor for other behaviors that they deem inappropriate,
43+
threatening, offensive, or harmful.
44+
45+
## Scope
46+
47+
This Code of Conduct applies both within project spaces and in public spaces
48+
when an individual is representing the project or its community. Examples of
49+
representing a project or community include using an official project e-mail
50+
address, posting via an official social media account, or acting as an appointed
51+
representative at an online or offline event. Representation of a project may be
52+
further defined and clarified by project maintainers.
53+
54+
## Enforcement
55+
56+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
57+
reported by contacting the project team at eclipxe13@gmail.com. All
58+
complaints will be reviewed and investigated and will result in a response that
59+
is deemed necessary and appropriate to the circumstances. The project team is
60+
obligated to maintain confidentiality with regard to the reporter of an incident.
61+
Further details of specific enforcement policies may be posted separately.
62+
63+
Project maintainers who do not follow or enforce the Code of Conduct in good
64+
faith may face temporary or permanent repercussions as determined by other
65+
members of the project's leadership.
66+
67+
## Attribution
68+
69+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
70+
available at [http://contributor-covenant.org/version/1/4][version]
71+
72+
[homepage]: http://contributor-covenant.org
73+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Contributing
2+
3+
Contributions are welcome. We accept pull requests on [GitHub](https://github.com/phpcfdi/rfc).
4+
5+
This project adheres to a
6+
[Contributor Code of Conduct](https://github.com/phpcfdi/rfc/blob/master/CODE_OF_CONDUCT.md).
7+
By participating in this project and its community, you are expected to uphold this code.
8+
9+
## Team members
10+
11+
* [Carlos C Soto](https://github.com/eclipxe13) - original author and maintainer
12+
* [GitHub constributors](https://github.com/phpcfdi/rfc/graphs/contributors)
13+
14+
## Communication Channels
15+
16+
You can find help and discussion in the following places:
17+
18+
* GitHub Issues: <https://github.com/phpcfdi/rfc/issues>
19+
20+
## Reporting Bugs
21+
22+
Bugs are tracked in our project's [issue tracker](https://github.com/phpcfdi/rfc/issues).
23+
24+
When submitting a bug report, please include enough information for us to reproduce the bug.
25+
A good bug report includes the following sections:
26+
27+
* Expected outcome
28+
* Actual outcome
29+
* Steps to reproduce, including sample code
30+
* Any other information that will help us debug and reproduce the issue, including stack traces, system/environment information, and screenshots
31+
32+
**Please do not include passwords or any personally identifiable information in your bug report and sample code.**
33+
34+
## Fixing Bugs
35+
36+
We welcome pull requests to fix bugs!
37+
38+
If you see a bug report that you'd like to fix, please feel free to do so.
39+
Following the directions and guidelines described in the "Adding New Features"
40+
section below, you may create bugfix branches and send us pull requests.
41+
42+
## Adding New Features
43+
44+
If you have an idea for a new feature, it's a good idea to check out our
45+
[issues](https://github.com/phpcfdi/rfc/issues) or active
46+
[pull requests](https://github.com/phpcfdi/rfc/pulls)
47+
first to see if the feature is already being worked on.
48+
If not, feel free to submit an issue first, asking whether the feature is beneficial to the project.
49+
This will save you from doing a lot of development work only to have your feature rejected.
50+
We don't enjoy rejecting your hard work, but some features just don't fit with the goals of the project.
51+
52+
When you do begin working on your feature, here are some guidelines to consider:
53+
54+
* Your pull request description should clearly detail the changes you have made.
55+
* Follow our code style using `squizlabs/php_codesniffer` and `friendsofphp/php-cs-fixer`.
56+
* Please **write tests** for any new features you add.
57+
* Please **ensure that tests pass** before submitting your pull request. We have Travis CI automatically running tests for pull requests. However, running the tests locally will help save time.
58+
* **Use topic/feature branches.** Please do not ask us to pull from your master branch.
59+
* **Submit one feature per pull request.** If you have multiple features you wish to submit, please break them up into separate pull requests.
60+
* **Send coherent history**. Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
61+
62+
## Installing development tools
63+
64+
This project uses different development tools to ensure code style, test and quality (using code analyzers).
65+
66+
```shell
67+
# install project direct dependences
68+
composer install
69+
70+
# install development tools dependences (using composer script)
71+
composer dev:install
72+
73+
# install development tools dependences (using installer script)
74+
bash develop/install-development-tools
75+
```
76+
77+
## Check the code style
78+
79+
If you are having issues with coding standars use `php-cs-fixer` and `phpcbf`
80+
81+
```shell
82+
# using composer
83+
composer dev:fix-style
84+
85+
# or using tools individually
86+
tools/php-cs-fixer fix -v
87+
tools/phpcbf -sp src/ tests/
88+
```
89+
90+
## Running Tests
91+
92+
The following tests must pass before we will accept a pull request.
93+
If any of these do not pass, it will result in a complete build failure.
94+
Before you can run these, be sure to `composer install` or `composer update`.
95+
96+
```shell
97+
# using composer
98+
composer dev:build
99+
100+
# or using tools individually
101+
tools/phpcs -sp src/ tests/
102+
tools/php-cs-fixer fix -v --dry-run
103+
vendor/bin/phpunit --coverage-text
104+
tools/phpstan analyze --level max src/ tests/
105+
tools/psalm
106+
phpdbg -qrr tools/infection --show-mutations
107+
```

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2020 Carlos C Soto
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)