Skip to content
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

Fix trailing slash in XdebugFilterScriptGenerator - closes #3834 #3835

Closed
wants to merge 1 commit into from
Closed

Fix trailing slash in XdebugFilterScriptGenerator - closes #3834 #3835

wants to merge 1 commit into from

Conversation

shivammathur
Copy link
Contributor

This should properly add the trailing slash to files in xdebug-filter.php as reported in #3834

@sebastianbergmann
Copy link
Owner

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have already fixed the issue in 002c0e2.

My patch does not add addslashes(), though. Are you sure that this is required?

@shivammathur
Copy link
Contributor Author

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have already fixed the issue in 002c0e2.

My patch does not add addslashes(), though. Are you sure that this is required?

Without addslashes it will lead to endquote being escaped by DIRECTORY_SEPARATOR and it will give a syntax error while running the tests.

<?php declare(strict_types=1);
if (!\function_exists('xdebug_set_filter')) {
    return;
}

\xdebug_set_filter(
    \XDEBUG_FILTER_CODE_COVERAGE,
    \XDEBUG_PATH_WHITELIST,
    [
        'C:\path\dir\'
    ]
);

Error: (T_ENCAPSED_AND_WHITESPACE), expecting ']' in xdebug-filter.php

it should be 'C:\path\dir\\'

sebastianbergmann added a commit that referenced this pull request Sep 7, 2019
@shivammathur shivammathur deleted the fix/xdebug-filter branch September 25, 2019 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants