Skip to content

[PHPUnitBridge] Fixed crash on Windows with PHP 8 #38921

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

Merged
merged 1 commit into from
Nov 2, 2020
Merged

[PHPUnitBridge] Fixed crash on Windows with PHP 8 #38921

merged 1 commit into from
Nov 2, 2020

Conversation

villfa
Copy link
Contributor

@villfa villfa commented Oct 31, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets no
License MIT
Doc PR no

The install command crashed with the message "The filename, directory name, or volume label syntax is incorrect.".
It happens only on Windows with PHP 8.

Probably due to https://github.com/php/php-src/blob/PHP-8.0/UPGRADING#L1121-L1123

I have a small repo to show the problem and how it is fixed: https://github.com/villfa/test-phpunit-bridge

The install command crashed with the message
"The filename, directory name, or volume label syntax is incorrect.".
It happens only on Windows with PHP 8.

Probably due to https://github.com/php/php-src/blob/PHP-8.0/UPGRADING#L1121-L1123
@carsonbot carsonbot added this to the 4.4 milestone Oct 31, 2020
@villfa villfa marked this pull request as ready for review October 31, 2020 14:00
@Nyholm
Copy link
Member

Nyholm commented Oct 31, 2020

Great. Thank you.

Your reproducer repo is helpful indeed. Could we do a test here on this repo too? Just to make sure this never breaks again?

@villfa
Copy link
Contributor Author

villfa commented Oct 31, 2020

Do you have an idea how to test it?

AppVeyor runs the tests only with PHP 7.2.5.
Travis cannot run the tests on Windows.
GH actions fail with this message: Error: Container operations are only supported on Linux runners (see https://github.com/villfa/symfony/runs/1336114965)

@Nyholm
Copy link
Member

Nyholm commented Oct 31, 2020

Hm. I’m not sure. @derrabus maybe have some input?

Maybe start by adding the same github action test as in your test repo?

@derrabus
Copy link
Member

@Nyholm PHP 8 on Windows does not happen on our CI yet. If someone with a Windows machine could confirm the bug and the solution, I think we can merge this without a test.

@nicolas-grekas
Copy link
Member

Thank you @villfa.

@nicolas-grekas nicolas-grekas merged commit ca9ef82 into symfony:4.4 Nov 2, 2020
@villfa villfa deleted the fix/windows-php8 branch November 2, 2020 15:08
@dbrumann
Copy link
Contributor

dbrumann commented Nov 2, 2020

I just tried it on the 4.4 branch. I can both confirm the reported bug and that the fix solves it for me (Windows 10 with PHP 8 Beta 3) 👍

@fabpot fabpot mentioned this pull request Nov 10, 2020
This was referenced Nov 29, 2020
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.

6 participants