Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit fbeb10c

Browse files
committed
Merge branch 'master' into fix/refactor-text-tests
2 parents 74e5be4 + 8ae720b commit fbeb10c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3938
-270
lines changed

.gitattributes

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/test/ export-ignore
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
/.travis.yml export-ignore
5+
/CONTRIBUTING.md export-ignore
6+
/Makefile export-ignore
7+
/phpunit.xml.dist export-ignore

.github/ISSUE_TEMPLATE/bug_report.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
### Summary
11+
12+
<!-- provide a summary here -->
13+
14+
### Versions
15+
16+
<!-- Please provide the versions of PHP as well as `fzaninotto/faker` on which the issue has been observed -->
17+
18+
| | Version |
19+
|:--------------------|:--------|
20+
| PHP | x.y.z |
21+
| `fzaninotto/faker` | x.y.z |
22+
23+
### Self-enclosed code snippet for reproduction
24+
25+
```php
26+
<!-- please replace this with a self-enclosed usage example -->
27+
```
28+
29+
### Expected output
30+
31+
```txt
32+
<!-- please replace this with the expected output of your self-enclosed example -->
33+
```
34+
35+
### Actual output
36+
37+
```txt
38+
<!-- please replace this with the actual output of your self-enclosed example -->
39+
```

.travis.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@ php:
1010
- 7.0
1111
- 7.1
1212
- 7.2
13+
- 7.3
1314
- nightly
1415

15-
sudo: false
16+
matrix:
17+
allow_failures:
18+
- nightly
1619

1720
cache:
1821
directories:
1922
- $HOME/.composer/cache
2023

24+
before_install:
25+
- phpenv config-rm xdebug.ini || true
26+
2127
before_script:
22-
- travis_retry composer self-update
2328
- travis_retry composer install --no-interaction --prefer-dist
2429

2530
script: make sniff test

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ If you've written a new formatter, adapted Faker to a new locale, or fixed a bug
55

66
Before proposing a pull request, check the following:
77

8-
* Your code should follow the [PSR-2 coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). Run `make sniff` to check that the coding standards are followed, and use [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) to fix inconsistencies.
8+
* Your code should follow the [PSR-2 coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). Run `make sniff` to check that the coding standards are followed, and run `make fix` to fix inconsistencies.
99
* Unit tests should still pass after your patch. Run the tests on your dev server (with `make test`) or check the continuous integration status for your pull request.
1010
* As much as possible, add unit tests for your code
1111
* Never use `rand()` in your providers. Faker uses the Mersenne Twister Randomizer, so use `mt_rand()` or any of the base generators (`randomNumber`, `randomElement`, etc.) instead.

Makefile

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
vendor/autoload.php:
2-
composer install --no-interaction --prefer-dist
1+
.PHONY: build fix help sniff test
2+
3+
help:
4+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5+
6+
build: fix test ## Runs fix and test targets
37

4-
.PHONY: sniff
5-
sniff: vendor/autoload.php
8+
fix: vendor/autoload.php ## Fixes code style issues with phpcbf
9+
vendor/bin/phpcbf --standard=PSR2 src
10+
11+
sniff: vendor/autoload.php ## Detects code style issues with phpcs
612
vendor/bin/phpcs --standard=PSR2 src -n
713

8-
.PHONY: test
9-
test: vendor/autoload.php
14+
test: vendor/autoload.php ## Runs tests with phpunit
1015
vendor/bin/phpunit --verbose
16+
17+
vendor/autoload.php:
18+
composer install --no-interaction --prefer-dist

composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"php": "^5.3.3 || ^7.0"
1414
},
1515
"require-dev": {
16+
"ext-intl": "*",
1617
"phpunit/phpunit": "^4.8.35 || ^5.7",
17-
"squizlabs/php_codesniffer": "^1.5",
18-
"ext-intl": "*"
18+
"squizlabs/php_codesniffer": "^2.9.2"
1919
},
2020
"autoload": {
2121
"psr-4": {
@@ -31,5 +31,8 @@
3131
"branch-alias": {
3232
"dev-master": "1.9-dev"
3333
}
34+
},
35+
"config": {
36+
"sort-packages": true
3437
}
3538
}

phpunit.xml.dist

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<phpunit
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
46
bootstrap="vendor/autoload.php"
57
colors="true"
68
>

0 commit comments

Comments
 (0)