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

Skip to content

[VarDumper] Add functional test for ServerDumpCommand #53737

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

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from

Conversation

louismariegaborit
Copy link
Contributor

Q A
Branch? 7.1
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

Update DumpServer to add functional test for the ServerDumpCommand.
This PR will allow to use DumpServer in the ServerLogCommand and test this command that had regressions in the past.

It's a try following a comment in another closed PR (#53518 (comment) cc @nicolas-grekas)

@carsonbot carsonbot added this to the 7.1 milestone Feb 2, 2024
@louismariegaborit louismariegaborit force-pushed the var_dumper_add_tests branch 2 times, most recently from e1f6536 to 0573d8d Compare February 2, 2024 22:34
@louismariegaborit
Copy link
Contributor Author

@nicolas-grekas I tried to use DumpServer with the update in this PR and it allows testing ServerLogCommand. :)
I do a dedicated PR after this.

I wonder if it should be targeted 7.1 or 6.4

@OskarStark OskarStark changed the title [VarDumper] Add functional test for ServerDumpCommand [VarDumper] Add functional test for ServerDumpCommand Feb 5, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Here are some comments to help move forward hopefully.

[$data, $context] = $payload;

$callback($data, $context, $clientId);
$callback($clientId, $message);
Copy link
Member

Choose a reason for hiding this comment

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

that's a BC break as this changes the contract of the callback.
Also I'm not sure this makes sense it terms of responsibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this following your comment in the PR #53518.
Do you have an idea ?
To help you, here a try of usage on the monolog bridge to see possibilities.

Copy link
Member

Choose a reason for hiding this comment

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

I'm sorry we should try to keep the existing signature callback.
It's fine to me if we don't factorize the code with ServerLogCommand
The motivation for this PR is testing. Can't we do an integration test instead, where we start a real process?

@xabbuh xabbuh added the Feature label May 15, 2024
@xabbuh xabbuh modified the milestones: 7.1, 7.2 May 15, 2024
@fabpot
Copy link
Member

fabpot commented Aug 19, 2024

@louismariegaborit What's the status of this PR?

@fabpot fabpot modified the milestones: 7.2, 7.3 Nov 20, 2024
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.

5 participants