Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bridge\PhpUnit] Fix clock-mock registration #16455

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

Merged
merged 1 commit into from
Nov 4, 2015

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Once a method has been executed, PHP ignores any new function that could be injected in the namespace afterwards (HHVM does not ignore them btw).
Which means we have to inject clock-mocking functions into all clock-mocked namespaces before any actual implementation is used in that namespace.
This PR does it.

nicolas-grekas added a commit to nicolas-grekas/symfony that referenced this pull request Nov 4, 2015
@nicolas-grekas nicolas-grekas merged commit 0a6a10a into symfony:2.8 Nov 4, 2015
nicolas-grekas added a commit that referenced this pull request Nov 4, 2015
This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge\PhpUnit] Fix clock-mock registration

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Once a method has been executed, PHP ignores any new function that could be injected in the namespace afterwards (HHVM does not ignore them btw).
Which means we have to inject clock-mocking functions into all clock-mocked namespaces before any actual implementation is used in that namespace.
This PR does it.

Commits
-------

0a6a10a [Bridge\PhpUnit] Fix clock-mock registration
@nicolas-grekas nicolas-grekas deleted the early-clock-mock branch November 4, 2015 09:21
nicolas-grekas added a commit that referenced this pull request Nov 4, 2015
 (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Clean clock-mock injection, replaced by #16455

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I really hope this PR is the last one on the clock-mocking topic!

Commits
-------

388534e [HttpKernel] Clean clock-mock injection, replaced by #16455
nicolas-grekas added a commit that referenced this pull request Nov 4, 2015
* 2.3:
  [HttpKernel] Clean clock-mock injection, replaced by #16455

Conflicts:
	src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
nicolas-grekas added a commit that referenced this pull request Nov 4, 2015
* 2.7:
  [HttpKernel] Clean clock-mock injection, replaced by #16455
nicolas-grekas added a commit that referenced this pull request Nov 4, 2015
* 2.8:
  [HttpKernel] Clean clock-mock injection, replaced by #16455
  [Bridge\PhpUnit] Fix clock-mock registration
nicolas-grekas added a commit to nicolas-grekas/symfony that referenced this pull request Nov 4, 2015
* 2.7:
  [HttpKernel] Clean clock-mock injection, replaced by symfony#16455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants