Skip to content

Fix phpdbg local console mode when using libedit/readline #13199

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

Closed
wants to merge 1 commit into from

Conversation

petk
Copy link
Member

@petk petk commented Jan 19, 2024

When using libedit/readline integration in phpdbg, EOF makes editline write prompt again in local console mode. For example, this can be noticed when reading phpt test files from STDIN and running phpdbg.

How to reproduce the issue:

./configure --with-readline --enable-phpdbg-readline
make
./sapi/cli/php run-tests.php sapi/phpdbg
# here tests fail with prompt being repeated in the output

After this patch, phpdbg tests pass.

When using libedit/readline integration in phpdbg, EOF makes editline
write prompt again in local console mode. For example, this can be
noticed when reading phpt test files from STDIN and running phpdbg.
@iluuu1994 iluuu1994 requested a review from bwoebi January 19, 2024 23:14
@petk petk mentioned this pull request Jan 19, 2024
6 tasks
petk added a commit to petk/php-build-system that referenced this pull request Mar 19, 2024
This fixes warnings that fill up the build log due to different
compilation flags used and clang.

See: php/php-src#13199
Copy link
Member

@remicollet remicollet left a comment

Choose a reason for hiding this comment

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

I confirm phpdbg test suite passes with this fix

@remicollet
Copy link
Member

Perhaps worth applying in maintained branches (at least 8.3 is affected)

@remicollet
Copy link
Member

Tested on 8.2, 8.3 and master
Patch work on all maintained branches

petk added a commit that referenced this pull request Aug 2, 2024
* PHP-8.2:
  Fix GH-13199: Redundant prompt in phpdbg with libedit/readline
@petk petk closed this in dc670cb Aug 2, 2024
petk added a commit that referenced this pull request Aug 2, 2024
* PHP-8.3:
  Fix GH-13199: Redundant prompt in phpdbg with libedit/readline
@petk petk deleted the patch-phpdbg-local-console branch August 2, 2024 06:39
@petk
Copy link
Member Author

petk commented Aug 2, 2024

Ok, thanks for the review. Added to PHP-8.2 and up.

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