On Sat, Apr 12, 2014 at 06:33:40AM +0000, Ferenc Kovacs wrote:
On Sat, Apr 12, 2014 at 12:24 AM, Stefan Neufeind <neufe...@php.net> wrote:

Hi,

I'd like to pick up the original discussion about this patch here again.
There have some updates on the github-pull. Maybe somebody could have a
look into this, please?

https://github.com/php/php-src/pull/575


Kind regards,
 Stefan


Just to make it clear:
To make it into 5.6.0 the RFC should have been voted and accepted, and the
patch finished and merged before the release of the first beta.
None of that happened in time, so now there is no chance to be in 5.6.0.

Hi,

sorry for reviving this old thread.

Is there still interest in pushing the related RFC [1] forward?

This thead started few years ago at [2] and has not seen much activity
since the proposed change [3] stalled due to issues with test failures.

I also found a couple old bugs [4,5] which also requested adding the
related feature but they also have not seen any activity since then.

I have a first implementation of the feature at [6], but it does have a
few points which would need discussion (most likely should go in the
RFC). Namely,

- the new suffix arg mimics the prefix arg when path separators are
  present in the string (goes through basename, using only the last part
  of the provided path);

- the suffix gets truncated if its length is longer than 64 characters
  (also matching the prefix behavior); and

- the current proposed patch does not include a windows implementation.

I could not find the historical reasons behind the prefix behavior
described in the first two points. Then, I was unsure if they should be
kept for the suffix. I then took a conservative approach and kept them
just to match the prefix arg behavior here.

As for not including windows support, the reason lies in the underlying
function (and API) used to generate temporary files, which do not
provide means to set a suffix and also include a .TMP extension to the
files, which AFAICT, does matter in windows systems. I also found a
related discussion in an old bug at [7].

I am Ccing the original author here to make sure they get this message
so I can understand if they are willing to move forward with the RFC or
if I should file a new one (as per the first note in [8]).

Finally, as per past discussions on this thread, I understand it is too
late to include this change in 8.3, and given the api change, this
should be deferred to 8.4 in case an RFC is accepted.

[1] https://wiki.php.net/rfc/tempnam-suffix
[2] https://marc.info/?l=php-internals&m=138946779304541
[3] https://github.com/php/php-src/pull/575
[4] https://bugs.php.net/bug.php?id=37613
[5] https://bugs.php.net/bug.php?id=43898
[6] https://github.com/php/php-src/pull/11685
[7] https://bugs.php.net/bug.php?id=44222
[8] https://wiki.php.net/rfc/howto

--
Athos Ribeiro

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to