Re: [PHP-DEV] RFC: Support Read-Only opcache.file_cache for use with Docker

2024-10-25 Thread Marco Pivetta
ough that's obviously very extreme :-) ) Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] Lazy Objects

2024-08-06 Thread Marco Pivetta
evel, and can only ever work with concrete classes. IMO, proxies can operate also at interface level (probably future scope), and could be expanded to not need a concrete implementation until the initialization callback is reached. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] Add Directive to Make All Namespaced Function Calls Global

2024-08-04 Thread Marco Pivetta
ue, but it is a valid and relied-upon use-case nonetheless. Better ways forward: * endorse userland to use a CS tool * namespace performance-sensitive PHP functions, so we can exclude the entire problem, by having people use the namespaced variant :P Marco Pivetta https://mastodo

Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API

2024-06-28 Thread Marco Pivetta
Hey Máté, On Fri, 28 Jun 2024, 22:06 Máté Kocsis, wrote: > Hi Everyone, > > I've been working on a new RFC for a while now, and time has come to > present it to a wider audience. > > Last year, I learnt that PHP doesn't have built-in support for parsing > URLs according to any well established s

Re: [PHP-DEV] [RFC] Lazy Objects

2024-06-27 Thread Marco Pivetta
pass a vote (I hope it does, but I want to be optimistic): is this something that could be implemented in an extension, or is it only feasible in core? Greets, Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] Add $this return type

2024-06-25 Thread Marco Pivetta
uld never use it, since I design immutable APIs, when possible :D Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] Add bcdivmod() to BCMath

2024-06-25 Thread Marco Pivetta
f an array vs an object allocation makes a difference here, or if the amount of `bcdivmod()` execution dwarfs this sort of concern? Thinking: ```php $result = \bcdivmod('123', '2'); echo $result->quotient; // '61' echo $result->remainder; // '1'

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4

2024-06-25 Thread Marco Pivetta
On Tue, 25 Jun 2024 at 17:27, Marco Pivetta wrote: > * `uniqid()`, in my case (XKCD 1172) is largely used for quickly > generating a semi-random string for test purposes: a suitable replacement > PRNG implementation would be welcome. Even refactoring with tools like > Rector will l

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4

2024-06-25 Thread Marco Pivetta
use-cases, they are part of the domain of many tools, including GIT itself. I can Rector my way out of it, just not sure these should be hidden into `hash(...)` That said, welcome changes :-) Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ On Tue, 25 Jun 2024 at 16:

Re: [PHP-DEV] [RFC] Lazy Objects

2024-06-23 Thread Marco Pivetta
ided factory * one question arises here: can this RFC create proxies of **interfaces** at all? * if not, does it throw appropriate exceptions? * the reason this question comes up is that, especially in the context of DICs, factories are for interfaces * concrete classes are implemen

Re: [PHP-DEV] [RFC] Lazy Objects

2024-06-20 Thread Marco Pivetta
should, given the previous experience here. I'd only be able to do so this weekend, though. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] [Vote] #[\Deprecated] attribute

2024-05-22 Thread Marco Pivetta
effects (`E_DEPRECATED` / `E_USER_DEPRECATED`) to signal deprecations. Insert "PTSD Chihuaua" meme here regarding PHP and library upgrades I had to work on over the last decade. No: don't want. Don't add side-effects to otherwise functionally pure code. Marco Pivetta htt

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Marco Pivetta
ly on (when I have a clear idea/opinion formed on a topic upfront) or at the end, when the RFC has gone through the ironing out a lot: the in-between is a brawl for which 24h/day aren't sufficient. The nature of email threads in a mailing list makes RFCs extremely hard to appr

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Marco Pivetta
a mistake, regardless of how much detail was added in handling all the weird edge cases of the language: in fact, going as far as exploring by-ref semantics (instead of just saying "no" to them) is also a big problem. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] Consider removing autogenerated files from tarballs

2024-03-30 Thread Marco Pivetta
On Sat, 30 Mar 2024, 05:19 Ben Ramsey, wrote: > On Mar 29, 2024, at 20:20, Bob Weinand wrote: > >  > On 29.3.2024 23:31:26, Daniil Gentili wrote: > > In light of the recent supply chain attack in xz/lzma, leading to a > backdoor in openSSH ( > https://www.openwall.com/lists/oss-security/2024/03

Re: [PHP-DEV] Proposal: AS assertions

2024-03-19 Thread Marco Pivetta
On Tue, 19 Mar 2024 at 17:46, Deleu wrote: > On Tue, Mar 19, 2024 at 1:42 PM Marco Pivetta wrote: > >> One note: if what you are going for is what `azjezz/psl`, be aware that >> exception / error tracing design needs special attention here: it's not as >> simple

Re: [PHP-DEV] Proposal: AS assertions

2024-03-19 Thread Marco Pivetta
e that `azjezz/psl` provides a very complete toolkit around this kind of tooling: https://github.com/azjezz/psl/tree/5f0aeacb708a33d5b2d53a832736c7767a99b215/src/Psl/Type One note: if what you are going for is what `azjezz/psl`, be aware that exception / error tracing design needs special attention here: it's not as simple as it looks! Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] BLAKE3 hash

2024-01-24 Thread Marco Pivetta
On Thu, 25 Jan 2024, 06:22 Hans Henrik Bergan, wrote: > On Wed, 24 Jan 2024 at 17:59, Marco Pivetta wrote: > > > > Depends on the actual numbers: is there any way to make a comparison that > > is relatively stable across architectures? > > > > Would it be fea

Re: [PHP-DEV] BLAKE3 hash

2024-01-24 Thread Marco Pivetta
be feasible to start with the cross-platform-let-the-compiler-do-its-job version (that somebody may actually be capable of auditing), and then introduce other versions when the jump is significant enough? Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] RFC - foreach

2024-01-24 Thread Marco Pivetta
97% Yes > Seen this? https://github.com/php/php-src/pull/1034#issuecomment-74066967 Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] Are warnings guaranteed?

2023-12-14 Thread Marco Pivetta
the php-src provided legacy functions (which will likely keep emitting warnings for a while, due to BC concerns). Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] What is the prevailing sentiment about extract() and compact() ?

2023-12-01 Thread Marco Pivetta
? There's a section describing this in HHVM, which is the kind of problem-space I was thinking of: https://hhvm.com/blog/713/hhvm-optimization-tips Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Marco Pivetta
You'd then get > both a reproducible build AND know when/what it was generated from. > Also, refs have a timestamp :-) Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] Reproducible Builds

2023-11-28 Thread Marco Pivetta
would certainly help people while jumping across branches, when trying out new RFCs, and it should be stable. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] Introducing 2 new modes to round function

2023-07-21 Thread Marco Pivetta
On Fri, 21 Jul 2023, 22:05 Dusk, wrote: > On Jul 21, 2023, at 12:38, Marco Pivetta wrote: > > Hey Jorg, > > > > What is the reason for using this over these? > > > > * https://www.php.net/manual/en/function.ceil.php > > * https://www.php.net/manual/en/

Re: [PHP-DEV] Introducing 2 new modes to round function

2023-07-21 Thread Marco Pivetta
Hey Jorg, What is the reason for using this over these? * https://www.php.net/manual/en/function.ceil.php * https://www.php.net/manual/en/function.floor.php On Fri, 21 Jul 2023, 21:26 Jorg Sowa, wrote: > Hello internals! > > I would like to propose introducing two new modes to the function

Re: [PHP-DEV] SomeClass::class error???

2023-07-05 Thread Marco Pivetta
; ECHO 'foo' 3 1 > RETURN 1 This is by design, since otherwise each `::class` lookup would result in autoloading, which would be disastrous for large maps of classes (like in service containers). Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] [Vote] Deprecate functions with overloaded signatures

2023-06-26 Thread Marco Pivetta
Hey Máté, Only voted "NO" for `ReflectionProperty#setValue()`, mostly because any kind of pre-existing subtype will be kinda broken, but it isn't a major issue. It's fine if libraries drop support for PHP 8.2 before PHP 9.0 is out. Marco Pivetta https://mastodon.soc

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-22 Thread Marco Pivetta
Amazing wording Dan: great way to drive people away. YIKES. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ On Mon, 22 May 2023 at 13:49, Dan Ackroyd wrote: > On Thu, 18 May 2023 at 09:12, Marco Pivetta wrote: > > > > I am not sure this RFC is

Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override])

2023-05-18 Thread Marco Pivetta
Hey Tim, On Thu, 11 May 2023, 18:37 Tim Düsterhus, wrote: > Hi > > I'm now opening discussion for the RFC "Marking overridden methods > (#[\Override])": > > > > RFC: Marking overridden methods (#[\Override]) > https://wiki.php.net/rfc/marking_overriden_methods > > Proof of concept implement

Re: [PHP-DEV] Moving PHP internals to GitHub

2023-04-12 Thread Marco Pivetta
FYI: https://externals.io/message/87501#87501 Also: wow, that was 7 years ago?! :O Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ On Wed, 12 Apr 2023 at 15:53, Alex Wells wrote: > Hey. > > PHP currently uses internals@lists.php.net for communicat

Re: [PHP-DEV] Future stability of PHP?

2023-04-11 Thread Marco Pivetta
I'm also curious to hear whether any participants in this thread do/did support the PHP foundation in any tangible way :D If you treat it like an LTS provider, perhaps it's time to pay up the LTS support fees? Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io

Re: [PHP-DEV] [IDEA] allow extending enum

2023-03-29 Thread Marco Pivetta
ed to consider that `final` as the implicit default is an existing contract that really enables ENUM usage. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ On Wed, 29 Mar 2023 at 11:05, Rokas Šleinius wrote: > > to restrict options within a certain range. >

Re: [PHP-DEV] [IDEA] allow extending enum

2023-03-29 Thread Marco Pivetta
not even be under your control. Greets, Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ On Wed, 29 Mar 2023 at 10:31, Rokas Šleinius wrote: > Enums were a very useful addition to PHP, however one aspect of them is > neither > explicitly documented - or

Re: [PHP-DEV] RFC proposal: function array_filter_list() to avoid subtle bugs/workarounds

2023-02-01 Thread Marco Pivetta
t; > I just registered a wiki account "sshymko" with the intention of > submitting the RFC. > Could someone please approve the account and give it some karma? > > Looking forward to collaborating with the internals team! 🙂 > > I don't want to shoot this down too early, but: 1. why in the language, when a simple userland function suffices? 2. what's wrong with writing `array_values(array_filter(...))`? Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] Pass Scope to Magic Accessors

2023-01-19 Thread Marco Pivetta
Hey Ilija! On Thu, 19 Jan 2023, 20:26 Ilija Tovilo, wrote: > However, as demonstrated by the 3v4l, it's not > exactly trivial. It also requires the full stack trace, as well as all > frame objects and arguments. That's not going to be great for > performance. So saying debug_backtrace() exists f

Re: [PHP-DEV] [RFC] Pass Scope to Magic Accessors

2023-01-19 Thread Marco Pivetta
Not just that, but `debug_backtrace()` already exists for that purpose. On Thu, 19 Jan 2023, 19:23 Aleksander Machniak, wrote: > On 19.01.2023 17:23, Nicolas Grekas wrote: > > Hi internals, > > > > Ilija and I would like to start a discussion about the following RFC: > > https://wiki.php.net/rfc

Re: [PHP-DEV] [Vote] More Appropriate Date/Time Exceptions

2022-12-15 Thread Marco Pivetta
he stub system be capable of documenting exception types? Greets, Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] Please allow an out of readonly properties

2022-12-03 Thread Marco Pivetta
can't help it and given the history of private usage and the > refusal on relaxing them I do not see this improving with the readonly. At > all. > > On Sat, Dec 3, 2022 at 2:42 PM Marco Pivetta wrote: > >> Terrible idea: reflection is mostly introspection tooling, and doesn&#

Re: [PHP-DEV] Please allow an out of readonly properties

2022-12-03 Thread Marco Pivetta
fit your system instead. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/ On Sat, 3 Dec 2022 at 23:39, Karoly Negyesi wrote: > Hello, > > If push comes to shove, private properties can be changed with reflection. > > Readonly properties can't. > > P

Re: [PHP-DEV] [RFC] [Discussion] Readonly class amendments

2022-11-26 Thread Marco Pivetta
On Sat, 26 Nov 2022, 23:56 G. P. B., wrote: > > As all the invariants will be maintained in the child classes > > The invariant here is the immutability from a behavioural PoV. LSP has 100% been broken in that example. > >

Re: [PHP-DEV] [RFC] [Discussion] Readonly class amendments

2022-11-26 Thread Marco Pivetta
On Sat, 26 Nov 2022, 20:45 Máté Kocsis, wrote: > We proposed this change because it wouldn't break anything that's already > not "broken". > That's quite a terrible rationale, TBH 😬 >

Re: [PHP-DEV] [RFC] [Discussion] Readonly class amendments

2022-11-17 Thread Marco Pivetta
int(1) [1]=> int(2) [2]=> int(2) } ``` I took a simplified example on purpose, just to demonstrate the problem with `readonly` disappearing in child classes. That's really really confusing, buggy, and, from a consumer PoV, broken (LSP violation too, transitively). That said, allowing mutation in `__clone()` is fine. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC][Dynamic class constant fetch]

2022-11-04 Thread Marco Pivetta
On Fri, 4 Nov 2022 at 15:40, Larry Garfield wrote: > On Fri, Nov 4, 2022, at 9:31 AM, Marco Pivetta wrote: > > Heyo, > > > > On Fri, 4 Nov 2022 at 15:26, Ilija Tovilo > wrote: > > > >> Hi everyone > >> > >> I'd like to propose a s

Re: [PHP-DEV] [RFC][Dynamic class constant fetch]

2022-11-04 Thread Marco Pivetta
t; arbitrary limitation. > > https://wiki.php.net/rfc/dynamic_class_constant_fetch > > Please let me know if you have any thoughts. > What's the problem with using `constant()` for this? Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC][Discussion] Objects can be declared falsifiable

2022-11-02 Thread Marco Pivetta
> > For better or for worse (IMHO, for worse), `SimpleXMLElement` instances > representing attributeless empty elements are already falsy, so yes, it is > absolutely feasible. > > —Claude This is absolutely terrifying. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC][Discussion] Objects can be declared falsifiable

2022-10-31 Thread Marco Pivetta
Since this topic fits like a glove, just dropping the "why I don't use `__toString()`" argument here: https://github.com/ShittySoft/symfony-live-berlin-2018-doctrine-tutorial/pull/3#issuecomment-460085493 A falsifiable object is worse than `__toString()` in this context, IMO.

Re: [PHP-DEV] Compact can't resolve outer scoped variables using short closures

2022-10-19 Thread Marco Pivetta
On Wed, 19 Oct 2022, 19:04 David Rodrigues, wrote: > Hello! > > I'm converting my code to use short closures where possible, and I ran into > a problem using compact(). > > Basically, the names used in compact() cannot be accessed due to a bug, > reported in 2019 still in PHP 7.4 (ID 78970). > >

Re: [PHP-DEV] [VOTE] Improve unserialize() error handling

2022-10-15 Thread Marco Pivetta
Tbh, this affects a new minor and a new major, and only in an unhappy path scenario, where the current PHP API is bad. PHP 9 will introduce a hard crash: good. It's a BC break: yes, native de-serialization is one of the most unsafe parts of the language, and it requires hardening. The fact that S

Re: [PHP-DEV] Union type casts

2022-10-05 Thread Marco Pivetta
ut); ``` This will also throw an exception (**GOOD**) if the cast is not safe to perform. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] Re: Issues with readonly classes

2022-09-21 Thread Marco Pivetta
osed, unless someone can > > come up with an ultimate counter-argument. > > > > What's your take about 8.2? As I demonstrated, readonly classes are broken > because of this propagation to child classes. > s/broken/working as expected Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] Issues with readonly classes

2022-09-04 Thread Marco Pivetta
It doesn't break anything: we have a new limitation, we observe if it is problematic, we remove that limitation if that is the case. That already happened for PHP 8.1, although I can't remember the exact feature. Let the side wheels attached for now 👍 On Sun, 4 Sep 2022, 12:46 Nicolas Grekas, w

Re: [PHP-DEV] Issues with readonly classes

2022-09-02 Thread Marco Pivetta
IMO good as-is: can be relaxed later (8.3 or later), if anybody believes it's a show-stopper. Readonly classes don't really need to be lazy. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/ On Fri, 2 Sept 2022 at 19:31, Nicolas Grekas wrote: > Hello every

Re: [PHP-DEV] Nullsafe array access can still emit a warning

2022-08-24 Thread Marco Pivetta
; This seems expected behavior to me: it's "nullsafe", not "undefinedsafe". If it operated like `??`, then `$undefined?->bar()` would be valid too, which seems wrong, IMO. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] Asymmetric visibility

2022-08-08 Thread Marco Pivetta
ow I currently do it, perhaps once every 2 months :D Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] Asymmetric visibility

2022-08-08 Thread Marco Pivetta
ary. Another puzzling area in this RFC is reference support: let's take the occasion to disallow references completely on asymmetric access, perhaps? It would be nice to see references gone for good. No need to pollute the engine for the edge case of `ArrayAccess` and similar APIs :P Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] [VOTE] Constants in traits

2022-07-06 Thread Marco Pivetta
a blogpost that puts measurable value on traits. I measured negative value over here, over years. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] [VOTE] Constants in traits

2022-07-06 Thread Marco Pivetta
On Wed, 6 Jul 2022 at 16:17, Larry Garfield wrote: > On Wed, Jul 6, 2022, at 4:45 AM, Marco Pivetta wrote: > > Hey Shinji, > > > > On Tue, 5 Jul 2022 at 23:39, shinji igarashi wrote: > > > >> Hello internals, > >> > >> I've s

Re: [PHP-DEV] [RFC] [VOTE] Constants in traits

2022-07-06 Thread Marco Pivetta
tten and implemented: it just solves a problem that doesn't/shouldn't need solving. Greets, Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC] Add json_encode indent parameter

2022-07-05 Thread Marco Pivetta
rare enough to make the relevance of this parameter almost null 2. complicates an API signature for a very tiny detail 3. if the problem is linting/preferences, have your favorite linter process the file in the way you deem most appropriate Doesn't need to live in php-src. Greets, Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] [RFC][Vote] Auto-capture closures

2022-07-05 Thread Marco Pivetta
On Mon, 4 Jul 2022, 19:15 Arnaud Le Blanc, wrote: > > Important to note how `Zend/zend_compile.c` now depends on `Optimizer/`, > > which is a potential design issue. > > The Optimizer was moved to `Zend/Optimizer` earlier so that in the long > term > it could be used by the compiler pipeline dire

Re: [PHP-DEV] [RFC][Vote] New Curl URL API

2022-07-05 Thread Marco Pivetta
Clear "no" from me on this: this is something similar to a PSR-7 URI object, but with a clunky and mutable API. Something like this would/should go to packagist first, to assess adoption there, but I would certainly not use it. On Tue, 5 Jul 2022, 01:34 Pierrick Charron, wrote: > Hi internals,

Re: [PHP-DEV] [RFC][Vote] Auto-capture closures

2022-07-04 Thread Marco Pivetta
just worded in a confusing way. Important to note how `Zend/zend_compile.c` now depends on `Optimizer/`, which is a potential design issue. Greets, Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/ On Fri, 1 Jul 2022 at 16:05, Larry Garfield wrote: > Greetings, In

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-09 Thread Marco Pivetta
Hey Nikita, On Thu, 9 Jun 2022 at 21:35, Nikita Popov wrote: > On Thu, Jun 9, 2022 at 9:29 PM Marco Pivetta wrote: > >> >> On Thu, 9 Jun 2022 at 21:27, Nikita Popov wrote: >> >>> On Thu, Jun 9, 2022 at 8:15 PM Arnaud Le Blanc >>> wrote: >>>

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-09 Thread Marco Pivetta
On Thu, 9 Jun 2022 at 21:27, Nikita Popov wrote: > On Thu, Jun 9, 2022 at 8:15 PM Arnaud Le Blanc > wrote: > >> Hi, >> >> On jeudi 9 juin 2022 18:46:53 CEST Marco Pivetta wrote: >> > ## nesting these functions within each other >> > >> > W

Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3

2022-06-09 Thread Marco Pivetta
ure, causing hidden memory leaks. Assuming following: * these new closures could capture `$this` automatically, once detected * these new closures can optimize away unnecessary variables that aren't captured Would that allow us to get rid of `static fn () {` declarations, when creating one

Re: [PHP-DEV] Adding new closing tag =?> for keeping trailing newline

2022-06-08 Thread Marco Pivetta
On Wed, 8 Jun 2022, 08:15 CHU Zhaowei, wrote: > > > declare(ignore_newline_after_close_tag=false); // defaults to true, i.e > > existing behavior > > > This would avoid any new syntax rules, but still provide the ability for > > php-as-template-engine to behave in the user's preferred mode. > >

Re: [PHP-DEV] NULL Coercion Consistency

2022-05-07 Thread Marco Pivetta
Hey Craig On Sat, 7 May 2022, 10:39 Craig Francis, wrote: > Not what I'm going for... but anyway, to get an idea of your position, do > you think the string '15' should be coerced to a number, or should it fatal > error as well? e.g. > > $my_number = round($request->get('my_number')); > Passing

Re: [PHP-DEV] Discussion before submission of array_transpose() RFC

2022-04-24 Thread Marco Pivetta
t rejected. Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread Marco Pivetta
Hey George, How would the engine behave (with this RFC included) with an inheritance check? Specifically: interface A { function foo(interable $param): iterable; } interface B { function foo(array|\Trabersable $param): array|\Traversable: } Would they be compatible with each other, if p

Re: [PHP-DEV] [RFC] Undefined Property Error Promotion

2022-04-06 Thread Marco Pivetta
about > potentially using AllowDynamicProperties to pull double duty, allowing > reads without an error as well, but I do not believe that would be in > the best interests of the language, and so removed it. > > Mark Randall > Perhaps worth mentioning that magic methods keep working? Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/

Re: [PHP-DEV] Reflection changes due to allow null + false as standalone types RFC

2022-04-05 Thread Marco Pivetta
be a BC break for later on :-) Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/ On Tue, 5 Apr 2022 at 13:58, G. P. B. wrote: > Hello internals, > > During the review of the implementation of the RFC which introduces null > and false as standalone types th

Re: [PHP-DEV] [RFC][Under discussion] Arbitrary string interpolation

2022-03-17 Thread Marco Pivetta
Hey Ilija, Overall not a fan: want more `sprintf()` and less interpolation, where possible 😬 Couldn't we let the construct slowly decay into nothingness, perhaps? On Thu, 17 Mar 2022, 23:27 Ilija Tovilo, wrote: > Hi everyone > > I'd like to start discussion on a new RFC for arbitrary string >

Re: [PHP-DEV] PHP Community to support Ukraine and help to stop Russian agression

2022-03-05 Thread Marco Pivetta
On Sat, 5 Mar 2022, 04:31 Kris Craig, wrote: > > > On Wed, Mar 2, 2022 at 4:51 AM Marco Pivetta wrote: > >> Hey Christian, >> >> On Wed, Mar 2, 2022 at 1:41 PM wrote: >> >> > this is exactly the problem. Russia did not just invaded Ukrainia out of

Re: [PHP-DEV] PHP Community to support Ukraine and help to stop Russian agression

2022-03-02 Thread Marco Pivetta
sewhere. We do not need to do that on php.net. > Please GTFO: we don't need more of Putin's propaganda over here, as they're busy enough with butchering civilians over there. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.io/

Re: [PHP-DEV] [RFC] Undefined Variable Error Promotion

2022-02-23 Thread Marco Pivetta
Nicolas Grekas wrote: > > > > > Le mar. 22 févr. 2022 à 14:56, Marco Pivetta a > > écrit : > > > > > >> On Tue, Feb 22, 2022 at 2:53 PM Nicolas Grekas < > > >> nicolas.grekas+...@gmail.com> wrote: > > >> > > >>>

Re: [PHP-DEV] [RFC] Undefined Variable Error Promotion

2022-02-22 Thread Marco Pivetta
s in `vendor/` code for 8.0->8.1 stuff, and it doesn't bring anything but frustration: this stuff is statically introspectible, and even more side-effects are just more trouble. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.io/

Re: [PHP-DEV] RFC proposal to deprecate crypt()

2022-02-21 Thread Marco Pivetta
On Mon, Feb 21, 2022 at 12:39 PM Tim Düsterhus wrote: > Hi > > On 2/21/22 12:12, Marco Pivetta wrote: > >>>> If it's not going to be removed, what's the point of annoying people > >>>> with deprecation warnings (that they would patch out/silence a

Re: [PHP-DEV] RFC proposal to deprecate crypt()

2022-02-21 Thread Marco Pivetta
On Mon, Feb 21, 2022 at 11:10 AM Tim Düsterhus wrote: > Hi Marco > > On 2/21/22 10:15, Marco Pivetta wrote: > >> If it's not going to be removed, what's the point of annoying people > >> with deprecation warnings (that they would patch out/silence anyway)? &

Re: [PHP-DEV] RFC proposal to deprecate crypt()

2022-02-21 Thread Marco Pivetta
Probably to be removed in `9.0` or `10.0`? Yes, it should be removed at some point. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.io/

Re: [PHP-DEV] RFC proposal to deprecate crypt()

2022-02-20 Thread Marco Pivetta
On Sun, 20 Feb 2022, 14:17 Tim Düsterhus, wrote: > Hi Steve, > > On 2/20/22 12:44, st...@tobtu.com wrote: > > > > If that's the case, you may not know that password_verify() can verify > all password hashes created by crypt(). The whole point of deprecating and > finally removing crypt() is that

Re: [PHP-DEV] Github issues

2022-02-13 Thread Marco Pivetta
1. You need to be part of https://github.com/orgs/php/people 2. Your group must have issue triage rights On Mon, 14 Feb 2022, 05:34 Pierre Joye, wrote: > Hi, > > What has to be done that the github issues can be handled by the same > developers than in bugs.php.net? > > It is a bit weird that I

Re: [PHP-DEV] Pre RFC - __debugType() magic method

2022-02-09 Thread Marco Pivetta
es are complex, annoying, necessary (with measure), but debugging them shouldn't be harder than it already is. I wouldn't implement `__debugInfo()` nor `__debugType()` on them, ever. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.io/

Re: [PHP-DEV] Long-Term Planning for PHP 9.0 Error Promotion

2022-01-26 Thread Marco Pivetta
problem, as they will need to upgrade to ~7.0.0 first anyway. Also, my customers are gently asked to sign a piece of paper in which I'm not responsible for their bad security awareness. For those projects, should it be needed, Zend provides commercial support as a "OMG WE DON'T ACTUAL

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-04 Thread Marco Pivetta
On Wed, Jan 5, 2022 at 3:19 AM Jordan LeDoux wrote: > > On Tue, Jan 4, 2022 at 1:27 AM Marco Pivetta wrote: > > Can I expect this for other math related RFCs, or is this dogmatic about > operator overload specifically? I have no clue, and at the very least, I > would like to l

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-04 Thread Marco Pivetta
27;s work, which is stellar (and frankly, I told him multiple times that he should just get paid for it, since spreadsheets run the frikken world), but to show that this is indeed a niche use-case. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-03 Thread Marco Pivetta
Haskell, which many like, and many loathe, but is still useful for type-safe operations with a different language than the "main" one: https://wiki.haskell.org/A_practical_Template_Haskell_Tutorial#Shakespearean_Templates In addition to all the above, I just noticed that the entire reflection AP

Re: [PHP-DEV] [VOTE] User Defined Operator Overloads

2022-01-02 Thread Marco Pivetta
Hey Jordan, I've voted "no" on this one: infix functions may have been interesting, but adding a whole new type system around operators is really not worth it, given: * Added AST nodes * Added method definitions for niche use-cases * Complexity in support for static analysis tools I personall

Re: [PHP-DEV] RFC [Discussion] array_column results grouping

2021-12-04 Thread Marco Pivetta
Gonna vote `no` on this: please design new/dedicated functions, rather than expanding optional parameters. On Sat, 4 Dec 2021, 10:57 Hassan Ahmed, <7sno...@gmail.com> wrote: > Hello, this is a proposal to upgrade the functionality of > `array_column` to return an indexed array for all of the matc

Re: [PHP-DEV] Is there an RFC/discussion for ::class being a specific type?

2021-11-16 Thread Marco Pivetta
o` (by design), and therefore a custom runtime type would be a bit too "optimistic" about its values, as it would not verify anything. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] [RFC] Migrating to GitHub issues

2021-11-15 Thread Marco Pivetta
ite", adopt and plan for disaster, should it become an Evil Corp seeding ground: what is there to be lost, and how hard would it be to recover? Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] [RFC] Migrating to GitHub issues

2021-11-15 Thread Marco Pivetta
ntending to > vote no on this. > > cheers, > Derick > Remember that all information on public repos is also available on http://www.gharchive.org/ If data retention is the problem, mirroring that could be an effective solution. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Automatic performance benchmarking: PHP 8.1 is ~30% faster than PHP 7.4

2021-11-13 Thread Marco Pivetta
ly improved. > > Regards: > Máté > Nice results, and nice project! Overall against having it on the ML: I set up a filter to ignore those pesky emails by Intel. As much as I appreciate their effort, they were really noisy, and not really useful to the larger group. If your tool

Re: [PHP-DEV] Allowing `(object)['key' => 'value']` in initializers?

2021-09-25 Thread Marco Pivetta
Hey Tyson, On Sat, 25 Sep 2021, 18:00 tyson andre, wrote: > My original message had a section with reasons why an end user might want > that. > Yeh, it sounds like stuff we wanna get away from 😬 > Not a push for getting rid of stdClass. Way too many things use stdClass > to get rid of stdClas

Re: [PHP-DEV] Allowing `(object)['key' => 'value']` in initializers?

2021-09-25 Thread Marco Pivetta
Hey Tyson, On Sat, 25 Sep 2021, 17:45 tyson andre, wrote: > What are your thoughts on allowing the `(object)` cast in initializer > types where `new` was already allowed, but only when followed by an array > literal node. (e.g. continue to forbid `(object)SOME_CONSTANT`) (see > https://wiki.php.

Re: [PHP-DEV] Proposal: Adding an ARRAY_FILTER_REINDEX flag to array_values

2021-09-20 Thread Marco Pivetta
` See https://psalm.dev/r/f9c51f72c2 Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-16 Thread Marco Pivetta
Hey Tyson, Would it perhaps make sense to drag in php-ds, which has matured quite a bit over the years? I'm referring to: https://www.php.net/manual/en/class.ds-sequence.php Is what you are suggesting with `Vector` different from it? Note: For some reason, I can't quote your post and then reply,

Re: [PHP-DEV] Class static initialization block

2021-09-11 Thread Marco Pivetta
Hey David, On Sun, 12 Sep 2021, 01:28 David Rodrigues, wrote: > Hello! > > I would like to suggest a feature I saw being implemented in the V8 9.4 > engine called "*class static initialization block*". > > https://v8.dev/blog/v8-release-94 > > In short, it is a method that is executed once when

Re: [PHP-DEV] Option for array_column() to preserve keys.

2021-09-08 Thread Marco Pivetta
Heyo, On Wed, 8 Sep 2021, 02:19 Andreas Hennings, wrote: > Hello internals, > > The function array_column() would be much more useful if there was an > option to preserve the original array keys. > I can create an RFC, but I think it is better to first discuss the options. > New function, pleas

Re: [PHP-DEV] Guidelines for RFC post feature-freeze

2021-08-25 Thread Marco Pivetta
Hey Nicolas, On Wed, Aug 25, 2021 at 7:30 PM Nicolas Grekas wrote: > I would welcome a new RFC to clarify what is allowed during the feature > freeze. > See https://en.wikipedia.org/wiki/Freeze_(software_engineering) Greets, Marco Pivetta http://twitter.com/Ocram

  1   2   3   4   5   6   7   >