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

ro_RO Person: fixed generating first and last day of year #1942

Open
wants to merge 84 commits into
base: master
Choose a base branch
from

Conversation

scybulski
Copy link

@scybulski scybulski commented Feb 26, 2020

I've noticed in Febuary tests in all PRs fail because of Romanian Person provider.
I found out it was because the first and last day of the year was generated incorrectly.
This made the provider in one of the tests to generate non-existing date 1957-02-29 which was then compared against 1957-03-01
PHP function strtotime() assumes that when no month name is given, the first day of current month in the specified year is generated. Furthermore, looks like in some cases strtotime("last day of ") was called which resulted in generating 2020-02-29 and then only month and day value was used to generate a date which does not exist in non-leap years.

The tests are likely to pass in the following months without this update until February in next leap year which is 2024.

@codecov-io
Copy link

Codecov Report

Merging #1942 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1942      +/-   ##
============================================
- Coverage     56.58%   56.52%   -0.07%     
  Complexity     2068     2068              
============================================
  Files           306      306              
  Lines          4851     4851              
============================================
- Hits           2745     2742       -3     
- Misses         2106     2109       +3
Impacted Files Coverage Δ Complexity Δ
src/Faker/Provider/ro_RO/Person.php 96.61% <100%> (ø) 23 <0> (ø) ⬇️
src/Faker/Provider/en_IN/Person.php 0% <0%> (-100%) 1% <0%> (ø)
src/Faker/Provider/fa_IR/Company.php 33.33% <0%> (-33.34%) 3% <0%> (ø)
src/Faker/Provider/sr_Cyrl_RS/Address.php 66.66% <0%> (-33.34%) 3% <0%> (ø)
src/Faker/Provider/cs_CZ/Address.php 66.66% <0%> (-33.34%) 3% <0%> (ø)
src/Faker/Provider/en_AU/Address.php 75% <0%> (-25%) 4% <0%> (ø)
src/Faker/Provider/it_IT/Address.php 75% <0%> (-25%) 4% <0%> (ø)
src/Faker/Provider/en_ZA/Address.php 25% <0%> (-25%) 4% <0%> (ø)
src/Faker/Provider/me_ME/Address.php 44.44% <0%> (-22.23%) 4% <0%> (ø)
src/Faker/Provider/sk_SK/Person.php 66.66% <0%> (-22.23%) 9% <0%> (ø)
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04c47e3...0225e10. Read the comment docs.

@mikk150
Copy link
Contributor

mikk150 commented Feb 28, 2020

@fzaninotto plz have this merged, so we all can have working PR-s

@scybulski
Copy link
Author

@fzaninotto, can we have this simple PR merged to avoid issues with tests in the future?

GrahamCampbell and others added 23 commits October 27, 2020 12:08
Thanks for your contribution
* Fix IBAN generation for CR (Costa Rica)
Fix generating lastname for female gender. Changed from latin 'a' to cyrillic 'а'

Co-Authored-By: Chris Döhring <6341536+chris-doehring@users.noreply.github.com>
JoshuaLuckers and others added 27 commits October 29, 2020 12:33
* Other Brazilian names

* Changes reverted to short array syntax
Co-authored-by: Pim Jansen <pjansen@senet.nl>
We label this BC break as a bug
Added link to documentation to README.md
Co-authored-by: Nyholm <tobias.nyholm@gmail.com>
Co-authored-by: Tobias Nyholm <tobias.nyholm@gmail.com>
* Prepare release of 1.11.0

* Updated date

* Added cs to change log

Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
* add Singapore NRIC/FIN provider

* cast number to int
pimjansen and others added 2 commits November 21, 2020 12:47
…otto#64)


Co-authored-by: Pim Jansen <pjansen@senet.nl>
Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet