Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

implemented safe versions of the classes DateTime and DateTimeImmutable #138

Merged
merged 4 commits into from
Sep 23, 2019

Conversation

Kharhamel
Copy link
Collaborator

This allow to redeclare methods such as createFromFormat to throw exception instead of returning null.

@coveralls
Copy link

coveralls commented Sep 18, 2019

Pull Request Test Coverage Report for Build 243

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 36.159%

Totals Coverage Status
Change from base Build 223: 0.0%
Covered Lines: 418
Relevant Lines: 1156

💛 - Coveralls

@Kharhamel Kharhamel changed the title WIP: implemented safe versions of the classes DateTime and DateTimeImmutable implemented safe versions of the classes DateTime and DateTimeImmutable Sep 18, 2019
@Kharhamel Kharhamel changed the title implemented safe versions of the classes DateTime and DateTimeImmutable WIP: implemented safe versions of the classes DateTime and DateTimeImmutable Sep 19, 2019
@Kharhamel Kharhamel force-pushed the datetime branch 3 times, most recently from 2d521a5 to 1f8d457 Compare September 23, 2019 13:50
@Kharhamel Kharhamel changed the title WIP: implemented safe versions of the classes DateTime and DateTimeImmutable implemented safe versions of the classes DateTime and DateTimeImmutable Sep 23, 2019
@Kharhamel Kharhamel force-pushed the datetime branch 3 times, most recently from d57bb8b to db160b2 Compare September 23, 2019 14:19
Copy link
Member

@moufmouf moufmouf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some proposed changes

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lib/DateTime.php Outdated Show resolved Hide resolved
Co-Authored-By: David Négrier <d.negrier@thecodingmachine.com>
@moufmouf moufmouf mentioned this pull request Sep 23, 2019
@moufmouf moufmouf merged commit 025069d into thecodingmachine:master Sep 23, 2019
@moufmouf
Copy link
Member

Thanks @Kharhamel !

Now, we should probably modify Safe phpstan rules to trigger warnings on any use of "new DateTime" or any DateTime factory!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants