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

Unsure of the true cause, but enabling BypassFinals causes unrelated test to fail in our project #50

Open
sd-matt-b opened this issue Feb 5, 2024 · 4 comments

Comments

@sd-matt-b
Copy link

sd-matt-b commented Feb 5, 2024

The test uses SplFireObject to get a line count from a .tsv file.

    $fileInfo = new \SplFileObject($fileName);
    $fileInfo->seek(\PHP_INT_MAX);
    $lineCount = $fileInfo->key();

The file in question returns (for example) 100 when not using BypassFinals::enable(), but when used the test returns 99 when using. I've tested this and it appears that BypassFinals is somehow trimming a trailing new line in our .tsv which causes the test to fail. Using a strict whitelist does not seem to alleviate this issue.

What I can't determine is the root cause, I can't tell if this is a BypassFinals issue, or if there's something about this project's setup that merely gets triggered by BypassFinals. Either way, feels like I should leave this issue in case anyone else wants to look deeper or runs into a similar issue.

@dg
Copy link
Owner

dg commented Mar 14, 2024

I can confirm that this is happening, but I have no idea why.

@srgpsk
Copy link

srgpsk commented Sep 3, 2024

We have a very similar issue and it's also related to file system abstraction. Also adding denyPaths() for that part doesn't help.

@wikando-ck
Copy link

I have the same issue, it's present since v1.6

@dg
Copy link
Owner

dg commented Sep 11, 2024

@wikando-ck this problem has existed since the very first version

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

No branches or pull requests

4 participants