Skip to content

[FrameworkBundle] Register a NullLogger from test kernels #24385

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
Sep 30, 2017
Merged

[FrameworkBundle] Register a NullLogger from test kernels #24385

merged 1 commit into from
Sep 30, 2017

Conversation

ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented Sep 30, 2017

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

Relates to #24300

This will avoid unnecessary output on Travis or when running FrameworkBundle tests locally:

but also needed for anyone running functional tests on their project and using the default logger, in order to not get garbage output.

Do we need to find a more generic solution (like exposing a framework.default_logger option so users can set it to false for test)? Or just documenting this?

@fabpot
Copy link
Member

fabpot commented Sep 30, 2017

Documentation sounds good for now. In any case, #24300 will need some tweaks. I've tested in real-life, and this does not work well IMHO.

@fabpot
Copy link
Member

fabpot commented Sep 30, 2017

Thank you @ogizanagi.

@fabpot fabpot merged commit c109dcd into symfony:3.4 Sep 30, 2017
fabpot added a commit that referenced this pull request Sep 30, 2017
…s (ogizanagi)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Register a NullLogger from test kernels

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Relates to #24300

This will avoid unnecessary output on Travis or when running FrameworkBundle tests locally:
- before: https://travis-ci.org/symfony/symfony/jobs/281624658#L3594-L3635
- after: https://travis-ci.org/symfony/symfony/jobs/281643868#L3599-L3617

but also needed for anyone running functional tests on their project and using the default logger, in order to not get garbage output.

Do we need to find a more generic solution (like exposing a `framework.default_logger` option so users can set it to false for test)? Or just documenting this?

Commits
-------

c109dcd [FrameworkBundle] Register a NullLogger from test kernels
@ogizanagi ogizanagi deleted the tests/null_logger branch September 30, 2017 13:45
ogizanagi added a commit to Elao/PhpEnums that referenced this pull request Nov 8, 2017
This PR was merged into the 1.x-dev branch.

Discussion
----------

Update symfony 4 compatibility

TODO:

- [x] Update tests to use new PHPUnit namespaces
- [x] Fix phpunit version used through env var
- [x] Inject a `NullLogger` (see symfony/symfony#24385)

Commits
-------

64fc69d Use new PhpUnit namespaces
a4705a5 Inject a NullLogger for integration tests
46e775c Moar travis changes
e438be5 Update symfony 4 compatibility
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.

3 participants