Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

DateTimeHelper threw an error when DateTimeImmutable was used. Fixed. #7410

Conversation

escopecz
Copy link
Sponsor Member

Please be sure you are submitting this against the staging branch.

Q A
Bug fix? Y
New feature? N
Automated tests included? N
Related user documentation PR URL /
Related developer documentation PR URL /
Issues addressed (#s or URLs) /
BC breaks? N
Deprecations? N

Description:

We prefer to use \DateTimeImmutable instead of \DateTime. Both of these have common \DateTimeInterface. But the DateTimeHelper was expecting only a DateTime object. This PR allows to use this in a template:

<?php echo $view['date']->toFull(new \DateTimeImmutable('tomorrow')); ?>

Steps to test this PR:

  1. Code review should suffice. We have tests that run the DateTimeHelper methods, so CI must be green.

@escopecz escopecz added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Apr 12, 2019
@npracht npracht added the code-review-needed PR's that require a code review before merging label Apr 12, 2019
@npracht npracht added this to the 2.15.2 milestone Apr 12, 2019
@npracht npracht added this to Ready to Test (first time) in Mautic 2 Apr 12, 2019
@kuzmany kuzmany added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test labels May 12, 2019
@escopecz escopecz moved this from Ready to Test (first time) to Ready to Test (confirmation) in Mautic 2 May 13, 2019
@kuzmany kuzmany added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged and removed code-review-needed PR's that require a code review before merging pending-test-confirmation PR's that require one test before they can be merged labels May 14, 2019
Mautic 2 automation moved this from Ready to Test (confirmation) to Ready to Test (first time) May 14, 2019
@kuzmany kuzmany merged commit ca17382 into mautic:staging May 14, 2019
Mautic 2 automation moved this from Ready to Test (first time) to Merged May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged
Projects
No open projects
Mautic 2
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

3 participants