Re: [PHP-DEV] [VOTE] Support optional suffix parameter in tempnam

2023-08-29 Thread Larry Garfield
On Tue, Aug 29, 2023, at 1:57 AM, Levi Morrison via internals wrote:
> On Sun, Aug 27, 2023 at 4:20 AM Tim Düsterhus  wrote:
>>
>> Hi Athos
>>
>> On 8/27/23 04:02, Athos Ribeiro wrote:
>> > I am moving this RFC [1] to the voting phase.  Voting will be open for the
>> > next 2 weeks, until September 10th, as per https://wiki.php.net/rfc.
>> >
>> > [1] https://wiki.php.net/rfc/tempnam-suffix-v2
>> >
>>
>> I find this a useful feature in general, but I believe it not working on
>> Windows completely nullifies the "could even provide more context for
>> software processing such files" argument in favor of this feature. It
>> will be unexpected for users if their code completely fails to work on
>> Windows, because the suffix is ignored.
>>
>> For that reason I voted "no".
>>
>> Best regards
>> Tim Düsterhus
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: https://www.php.net/unsub.php
>
>
> I have voted no for a similar reason. It would be nice if there were
> os-specific packages in core that handled these kinds of things,
> because the functionality is definitely useful. But if you call an API
> like `FileSystem\Os\Unix\tempnam` then at least the platform specific
> behavior is obvious and understood.

I did as well.  I am in favor of the functionality, but having it silently 
not-work on Windows is not a good approach.  That may mean a larger refactoring 
of tempnam is a good next step, to fix the issues noted in the RFC and then 
support Windows consistently.  I would support that, and including a suffix 
either with that or as a follow-up.

(Side note: If messing about there, making prefix optional would also be wise 
so that it can be skipped via named args.)

--Larry Garfield

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



Re: [PHP-DEV] [VOTE] Support optional suffix parameter in tempnam

2023-08-28 Thread Levi Morrison via internals
On Sun, Aug 27, 2023 at 4:20 AM Tim Düsterhus  wrote:
>
> Hi Athos
>
> On 8/27/23 04:02, Athos Ribeiro wrote:
> > I am moving this RFC [1] to the voting phase.  Voting will be open for the
> > next 2 weeks, until September 10th, as per https://wiki.php.net/rfc.
> >
> > [1] https://wiki.php.net/rfc/tempnam-suffix-v2
> >
>
> I find this a useful feature in general, but I believe it not working on
> Windows completely nullifies the "could even provide more context for
> software processing such files" argument in favor of this feature. It
> will be unexpected for users if their code completely fails to work on
> Windows, because the suffix is ignored.
>
> For that reason I voted "no".
>
> Best regards
> Tim Düsterhus
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php


I have voted no for a similar reason. It would be nice if there were
os-specific packages in core that handled these kinds of things,
because the functionality is definitely useful. But if you call an API
like `FileSystem\Os\Unix\tempnam` then at least the platform specific
behavior is obvious and understood.

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



Re: [PHP-DEV] [VOTE] Support optional suffix parameter in tempnam

2023-08-27 Thread Tim Düsterhus

Hi Athos

On 8/27/23 04:02, Athos Ribeiro wrote:

I am moving this RFC [1] to the voting phase.  Voting will be open for the
next 2 weeks, until September 10th, as per https://wiki.php.net/rfc.

[1] https://wiki.php.net/rfc/tempnam-suffix-v2



I find this a useful feature in general, but I believe it not working on 
Windows completely nullifies the "could even provide more context for 
software processing such files" argument in favor of this feature. It 
will be unexpected for users if their code completely fails to work on 
Windows, because the suffix is ignored.


For that reason I voted "no".

Best regards
Tim Düsterhus

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



[PHP-DEV] [VOTE] Support optional suffix parameter in tempnam

2023-08-26 Thread Athos Ribeiro

Hi,

I am moving this RFC [1] to the voting phase.  Voting will be open for the
next 2 weeks, until September 10th, as per https://wiki.php.net/rfc.

[1] https://wiki.php.net/rfc/tempnam-suffix-v2

--
Athos Ribeiro

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