Re: [PHP-DEV] Inconsistencies between parameter number and index when reflecting a method/function

2024-05-03 Thread Ollie Read
On Fri, May 3, 2024, at 1:45 AM, Gina P. Banyard wrote: > On Thursday, 2 May 2024 at 21:33, Derick Rethans wrote: > > > On 2 May 2024 13:48:36 BST, Ollie Read php@ollie.codes wrote: > > > > > These methods accept an integer to retrieve a parameter by its position, &g

[PHP-DEV] Inconsistencies between parameter number and index when reflecting a method/function

2024-05-02 Thread Ollie Read
they be 0 indexed to remain consistent with the existing API. Girgias has asked that I pause the PR until we can have a discussion on this mailing list about how to approach it, so I'm looking for feedback on this. --- Best Regards, *Ollie Read*

Re: [PHP-DEV] New reflection methods for working with attributes

2023-08-07 Thread Ollie Read
r hasAttribute method. --- Best Regards, *Ollie Read*

Re: [PHP-DEV] New reflection methods for working with attributes

2023-08-03 Thread Ollie Read
t Regards, *Ollie Read*

Re: [PHP-DEV] New reflection methods for working with attributes

2023-07-25 Thread Ollie Read
bring more > arguments in favor of that RFC which I’m willing to submit asap as well. Is it just the hasAttribute() method you're working on? I'm happy to help out if you need/want it. I was moments away from opening a PR. --- Best Regards, *Ollie Read*

[PHP-DEV] New reflection methods for working with attributes

2023-07-25 Thread Ollie Read
a PR, which I will start shortly, should there be no objections. --- Best Regards, *Ollie Read*

Re: [PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically

2023-01-24 Thread Ollie Read
at I'm looking for. --- Best Regards, *Ollie Read*

Re: [PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically

2023-01-23 Thread Ollie Read
, but for methods. On Mon, Jan 23, 2023, at 4:50 PM, Deleu wrote: > > > On Mon, Jan 23, 2023, 1:16 PM Ollie Read wrote: >> Oh, I didn't mean to suggest that it automatically binds. >> >> My second suggestion for how to achieve this does require some sort of &

Re: [PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically

2023-01-23 Thread Ollie Read
method. --- Best Regards, *Ollie Read*

Re: [PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically

2023-01-23 Thread Ollie Read
Jan 22, 2023, at 11:45 AM, Ollie Read wrote: > > Hello all, > > > > I've created a feature request issue on GitHub (here: > > https://github.com/php/php-src/issues/10414), but I have been advised > > that it's best to post here. > > > > What I would like to int

[PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically

2023-01-22 Thread Ollie Read
er a closure was created using first-class-callable syntax. I'm interested in feedback on this, and if anyone could point me towards the correct part of the codebase that handles this, I can investigate further. I am happy to create an RFC if others think this viable. --- Best Regards, *Ollie Read*

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

2022-08-08 Thread Ollie Read
te. While isGetProtected() is technically false for "public int $number", if it's not inferred, it's semantically incorrect. A good example of this is ReflectionMethod::getPrototype, which throws an exception if there's no prototype. Although this is somewhat bizarre, it is at least a thing we do. --- Best Regards, *Ollie Read*

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

2022-08-07 Thread Ollie Read
of providing them as a comma-separated list. // Public for get and set public int $number // Public get, private set public, private int $number If a single visibility is provided, same old same old, but if two are provided, they are in the order of get, followed by set. While not being as verbose as providing (set) or other markings to differentiate them, it feels more natural, and it doesn't overcomplicate it. --- Best Regards, *Ollie Read*

Re: [PHP-DEV] RFC Idea: Introducing a ReflectionWithAttributes interface - Looking for feedback

2022-08-07 Thread Ollie Read
ReflectionClass::hasMethod. The idea behind these two is to provide a nice API with sensible actions, while trying to maintain consistency, something we sorely need in the core. I think the cost of having these methods is nothing compared to the nicer interface and API provided by having them as part of an interface. --- Best Regards, *Ollie Read*

Re: [PHP-DEV] Re: RFC Idea - is_json - looking for feedback

2022-08-07 Thread Ollie Read
if it comes across that way, I'm just not sure of a way to do it where the benefit outweighs the cons, but then again, there are people a lot smarter than me on this list. --- Best Regards, *Ollie Read*

[PHP-DEV] RFC Idea: Introducing a ReflectionWithAttributes interface - Looking for feedback

2022-08-07 Thread Ollie Read
is, rather than expect someone else to do it. If you're interested, the brain dump gist is here: https://gist.github.com/ollieread/34c878bf120ee70f9d2a869cb7a242d1#attributes --- Best Regards, *Ollie Read*

Re: [PHP-DEV] Possible improvements to the Reflection functionality

2022-05-07 Thread Ollie Read
d probably just make the reflection classes use that. I'd also like to see the Reflection prefix dropped and proper namespacing introduced, but I also know that's not going to go down well with a lot of people. Am happy to hear any suggestions or input, especially how people feel about the whole RFC side of things. --- Best Regards, *Ollie Read*

[PHP-DEV] Possible improvements to the Reflection functionality

2022-05-05 Thread Ollie Read
, this is my first interaction with this mailing list, so I am also happy to receive any feedback about the best approaches and ways to handle things, if necessary. --- Best Regards, *Ollie Read*