Skip to content

Commit f8cfe9d

Browse files
Merge pull request #5 from renandelmonico/new-vos
Updated PHP version and some new VOs
2 parents a4487b9 + 26b0fde commit f8cfe9d

29 files changed

+1094
-840
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ infection.txt
33
.phpunit.result.cache
44
vendor/
55
.phpdoc
6+
coverage
7+
.vscode

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.1
1+
FROM php:8.2
22

33
RUN apt-get update && apt-get install -y libcurl4-openssl-dev pkg-config libssl-dev
44

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ test-mutation:
22
docker run -it --rm -v $(shell pwd):$(shell pwd) -w=$(shell pwd) value-objects bash -c 'vendor/bin/infection'
33

44
test-unit:
5-
docker run -it --rm -v $(shell pwd):$(shell pwd) -w=$(shell pwd) php:8.1 bash -c 'vendor/bin/phpunit'
5+
docker run -it --rm -v $(shell pwd):$(shell pwd) -w=$(shell pwd) php:8.2 bash -c 'vendor/bin/phpunit'
6+
7+
test-coverage:
8+
docker run -it --rm -v $(shell pwd):$(shell pwd) -w=$(shell pwd) value-objects bash -c 'vendor/bin/phpunit --coverage-html=coverage'
69

710
composer-install:
8-
docker run --rm --interactive --tty --volume $(shell pwd):/app composer install
11+
docker run --rm --interactive --tty --volume $(shell pwd):/app composer:2.5 install
912

1013
doc-generate:
1114
docker run --rm -v $(shell pwd):/data phpdoc/phpdoc run -d src --sourcecode --visibility=public,protected --title=renandelmonico/value-objects

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Value Objects Library
22

3+
![Packagist Downloads](https://img.shields.io/packagist/dt/renandelmonico/value-objects)
4+
![Packagist Stars](https://img.shields.io/packagist/stars/renandelmonico/value-objects)
5+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/renandelmonico/value-objects)
6+
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/renandelmonico/value-objects)
7+
![Packagist License](https://img.shields.io/packagist/l/renandelmonico/value-objects)
8+
39
A lib to aggregate in your projects with most commons VO's.
410

511
> Produced by Renan Delmonico to use in his projects
@@ -28,12 +34,15 @@ make doc-generate
2834
- Address
2935
- Boolean
3036
- City
37+
- DateTime
3138
- Email
3239
- Integer
40+
- IP (IPv4 and IPv6)
3341
- Numeric
3442
- Password
3543
- Str
3644
- Text
45+
- UUID
3746

3847
## Enums
3948

@@ -43,10 +52,10 @@ make doc-generate
4352

4453
## Pull Requests
4554

46-
Before you submit a Pull Request you must run the unit and mutation tests.
55+
Before you submit a Pull Request you must run the unit and mutation tests and check if the coverage is 100%.
4756

4857
### How?
4958

50-
There are two commands in Makefile (`test-unit` and `test-mutation`). You must run both commands.
59+
There are three commands in Makefile (`test-unit`, `test-mutation` and `test-coverage`). You must run this commands.
5160

5261
> Please, rate this lib ❤️ and give stars ⭐

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=8.1"
15+
"php": ">=8.2",
16+
"ramsey/uuid": "^4.3"
1617
},
1718
"require-dev": {
1819
"phpunit/phpunit": "^9.5",
@@ -27,5 +28,10 @@
2728
"psr-4": {
2829
"Test\\": "tests/"
2930
}
31+
},
32+
"config": {
33+
"allow-plugins": {
34+
"infection/extension-installer": true
35+
}
3036
}
3137
}

0 commit comments

Comments
 (0)