Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] Add a stream helper#53518

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

louismariegaborit
Copy link
Contributor

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
Issues
LicenseMIT

As I explain inanother PR, testing commands likeserver:dump orserver:log is very difficult due to the infinite loop that waits for cancellation by the user.

I suggest to create a new helper in console component to use same code between above two commands and test them to avoid regression in these commands.

What do you think ?

Regarding the use of the new StreamHelper, the Dumper component seems to no longer need the DumpServer class because we use now only the getHost function. To replace DumpServer in the command, I would like to use the ParameterBag but I can use it in the binary var-dump-server ? Or I should add a string parameter that I set by CompilerPass for the command ?


$commandTester->setInputs([$input]);

$commandTester->execute(['--format' => 'html']);
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

For this test, I can only use html because value of the dump doesn't be available in the command result. I seems that it be prompt in php stream not in the command.
@ogizanagi Could you help me to add cli format in this test ?

@louismariegaboritlouismariegaboritforce-pushed thestream_helper branch 2 times, most recently from0131c92 to8bb6db9CompareJanuary 11, 2024 20:04
@nicolas-grekas
Copy link
Member

nicolas-grekas commentedJan 29, 2024
edited
Loading

Thanks for the PR.
I'm wondering if we shouldn't do it the other way around: make ServerLogCommand use DumpServer?
It would provide two benefits:

  • the proposed helper is not really a "stream" helper, but one that helps some specific kind of line-based server - not generic enough maybe - at least not for the name "stream"
  • less dependency constraints (no need for bumps)

It'd be fine making VarDumper a required dependency of the command in 7.1 (throwing a LogicException when DumpServer is not found in the constructor of ServerLogCommand)

WDYT?

nicolas-grekas added a commit that referenced this pull requestJan 29, 2024
…ouismariegaborit)This PR was merged into the 6.3 branch.Discussion----------[MonologBridge] Fix context data and display extra data| Q             | A| ------------- | ---| Branch?       | 6.3| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Issues        | ->| License       | MITFix the compatibility with Monolog 3. In the PR#52222 we had the compatibility with Monolog 3 but context parameter is incorrect and extra parameter is missing.No test can be added because testing this command is not possible at this time. Another PR (#53518) was opened to add test on this command.Commits-------8687ae0 Fix context data and display extra data
@nicolas-grekas
Copy link
Member

I'm closing for now, waiting for a new PR in case you're up to giving my above proposal a try 🙏

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
7.1
Development

Successfully merging this pull request may close these issues.

4 participants
@louismariegaborit@nicolas-grekas@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp