Skip to content

Conversation

nacc
Copy link

@nacc nacc commented May 26, 2017

PHP7.1 changed the behavior of tempnam() to report a notice when it
falls back to the system temp directory:
https://bugs.php.net/bug.php?id=69489. Silence the notice, as otherwise
a testcase failure occurs with PHP7.1+. This was seen while updating
Symfony on Ubuntu 17.04 (with PHP 7.1.5).

Signed-off-by: Nishanth Aravamudan nish.aravamudan@canonical.com

Q A
Branch? 2.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

I am updating Symfony to match Debian (2.8.7) in Ubuntu 17.10. This mostly worked, with some additional backports, as we only support PHP7.1 in 17.10. However, it seems that PHP has changed tempnam() to emit a notice when it falls back, which leads to a testcase failure.

PHP7.1 changed the behavior of tempnam() to report a notice when it
falls back to the system temp directory:
https://bugs.php.net/bug.php?id=69489. Silence the notice, as otherwise
a testcase failure occurs with PHP7.1+. This was seen while updating
Symfony on Ubuntu 17.10 (with PHP 7.1.5).

Signed-off-by: Nishanth Aravamudan <nish.aravamudan@canonical.com>
@nacc nacc force-pushed the fix_filesytem_test branch from 852e9b9 to 17b2a35 Compare May 26, 2017 21:32
@nicolas-grekas
Copy link
Member

nicolas-grekas commented May 28, 2017

Since v2.8.9, the call to tempnam() is already silenced, see

$tmpFile = @tempnam($hierarchy, $prefix);

@nicolas-grekas nicolas-grekas added this to the 2.8 milestone May 28, 2017
@xabbuh xabbuh closed this May 29, 2017
@nacc
Copy link
Author

nacc commented May 29, 2017 via email

@wesleylancel
Copy link
Contributor

@nicolas-grekas It seems there's another tempnam here: https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php#L283

Should that be silenced too? If so, I can create a PR.

@nicolas-grekas
Copy link
Member

You can.
But: you should not be using the component at all in the first place - it's deprecated now :)

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