Re: [PHP-DEV] Proposal: Binary type for PDO

2023-07-09 Thread Dan Ackroyd
y to find out which option is more real, is to write the code + testswhich would need to be done anyway, even assuming the best case scenario. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Request karma privileges to vote on PHP RFCs

2023-07-04 Thread Dan Ackroyd
users for a while now. I'll try and finish that email, but I think setting up something like that, would be a better path than the one we're currently on. To note, it will probably take some time to figure this out. I'm reasonably sure people will have opinions. Possibly quite a few.

[PHP-DEV] [VOTE] PDO subclasses

2023-07-03 Thread Dan Ackroyd
Hello internals, I'm opening the vote for the 'PDO driver specific sub-classes' RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses It will last for two weeks and end on 2023-07-17T17:00:00Z cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To uns

Re: [PHP-DEV] PDO Subclasses coming to vote soon.

2023-06-29 Thread Dan Ackroyd
so have Sorry, I am in too much pain to look at those before the deadline. There is always 8.4 https://www.youtube.com/watch?v=wccRif2DaGs . cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] PDO Subclasses coming to vote soon.

2023-06-27 Thread Dan Ackroyd
omeone does [`new PDO(...)`], will they now get back `PdoPgsql`, No. New`ing one object, and getting a different object back would be far too surprising to even be contemplated. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] PDO Subclasses coming to vote soon.

2023-06-27 Thread Dan Ackroyd
hrough the C api. As that means that SQLite extensions can only be loaded through C code (not through SQL), and if someone can upload and execute code to your server, your server is compromised anyway, having to edit ini files to enable extension loading, seems like a bad tradeoff. Thoughts

[PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-03 Thread Dan Ackroyd
Hi internals, I'm now opening the discussion for the Closure self-reference RFC: https://wiki.php.net/rfc/closure_self_reference This was previously discussed as a draft here: https://externals.io/message/112216#112216 Thank-you to KapitanOczywisty for the implementation. cheers Da

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

2023-05-27 Thread Dan Ackroyd
27;positive sum' proposal. Or as Ilija Tovilo wrote: > > The benefits seem worth the maintenance cost, even if small for the > average user. cheers Dan Ack * At least in this case, because having to deal with code that uses inheritance is already punishment enough. -- PHP Interna

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

2023-05-22 Thread Dan Ackroyd
prevent people wondering why their code is behaving surprisingly before it is static analysed. Also, not everyone uses static analysis tools. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2023-05-22 Thread Dan Ackroyd
emselves, and hope that other people don't spend too much time arguing with someone who has a pattern of being unreasonable. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] rounding integers

2023-05-21 Thread Dan Ackroyd
On Sun, 21 May 2023 at 06:16, Marc wrote: > > Do you think this could be an acceptable BC-break No. Suggesting changing a 30 year old maths operations is a huge BC break. > or should this be a different function? Just make your own that does precisely what you want... cheers Dan Ack

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

2023-05-16 Thread Dan Ackroyd
7;good' or 'bad' ? I hope I am at least consistent with my concerns about annotations. Danack wrote in https://externals.io/message/114116#114196 > > I think I disagree with this very strongly, and plan* to vote against > any RFC that embeds another language in annotations.**

[PHP-DEV] Planning ahead, will 8.5 exist and major version decisions (was: Deprecate functions with overloaded signatures)

2023-05-16 Thread Dan Ackroyd
expect PHP 8.4 to be the last release of the PHP 8.x branch? * Is there, or could there be, a process for planning when the next major release is going to happen? Or would requiring volunteers to plan their volunteering multiple years in advance be too much of a burden? cheers Dan Ack [1]

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

2023-05-16 Thread Dan Ackroyd
n. Having one version where both the old version of the function, and the new version work is the minimum (imo) as it allows people to run the same code on both. But anything more than that is a nicety, not a requirement. Also, in my opinion. cheers Dan Ack -- PHP Internals - PHP Runtime Devel

Re: [PHP-DEV] Please remove the Sicherheitsüberprüfung Security captcha from php.net

2023-05-14 Thread Dan Ackroyd
and systems@, so hopefully something will be adjusted. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [Discussion] nameof

2023-05-13 Thread Dan Ackroyd
gh. And yeahthis is one of the reason doing RFCs is annoying. People are often persnickety over details. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2023-05-11 Thread Dan Ackroyd
ject to that are people who would vote yes to "deprecate and remove" but only if it matches their preferred timescale, and would otherwise vote no. Which probably isn't a thing. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2023-05-11 Thread Dan Ackroyd
; deprecation in 8.3 + removal when it's ready seems to be okay. I think I don't understand your concern. If a problem is discovered with a planned removal of something, people on this project are mostly reasonable*, and a small RFC to adjust to the new circumstances would be very likely

Re: [PHP-DEV] Moving a tmpfile()?

2023-05-06 Thread Dan Liebner
> Why move the temporary file when it is already a temporary file, right? If you don't want to have to write the file again with a copy? On Sat, May 6, 2023 at 1:56 PM Hans Krentel wrote: > > > > On Saturday 29 April 2023 09:32:42 (+02:00), Dan Liebner wrote: > >

Re: [PHP-DEV] DB specific PDO subclasses questions.

2023-05-05 Thread Dan Ackroyd
On Tue, 7 Jun 2022 at 15:25, Philip Hofstetter wrote: > > On 6 Jun 2022 at 21:15:12, Dan Ackroyd wrote: >> >> 2. Other than the SQLite blobOpen functionality, does anyone know of >> any other functionality that is exposed by SQLite or Postgres that >> isn't

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

2023-05-02 Thread Dan Ackroyd
while code which invokes > get_parent_class() without parameters should be modified to use > get_parent_class($this) instead. What would the equivalent code get_parent_class() for static methods? e.g. class A {} class B extends A { public static function foo() { echo get_parent_c

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

2023-05-02 Thread Dan Ackroyd
2000 most popular PHP packages rely on calling > session_set_save_handler() with 6 or more arguments. I doubt analysing github is going to give a useful measure of the impact of this RFC. Functions like session_set_save_handler are going to be used in custom code written for a company th

Re: [PHP-DEV] Current RFC process and project decisions

2023-05-01 Thread Dan Ackroyd
ar as as I'm aware, there hasn't been a problem with an RFC passing and the core contributors refusing to accept it. So please can we discuss the exact problem you want to solve, so that we can agree it's the right problem to solve, before suggesting solutions? If nothing else, some pro

[PHP-DEV] Moving a tmpfile()?

2023-04-29 Thread Dan Liebner
Are there any inherent problems with moving a file created with tmpfile()? In practice, it seems that it can be done and the file will not be deleted after being moved and the file handle closed. Thanks, Dan

Re: [PHP-DEV] [Discussion] Callable types via Interfaces

2023-04-20 Thread Dan Ackroyd
to see typed callables, and other forms of type aliasing, as they would be huge improvements in being able to write code that is easy to reason about and maintain, I don't want to seem them as soon as possible, having taken short-cuts against good language design. "No is temporary, yes

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-16 Thread Dan Ackroyd
at of being clear... particularly when I've gotten the wrong end of the stick. Yeah, that would be a BC break. For now, I'll update the RFC words to say that, but that means we need to go and do some thinking, to figure out how to proceed. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-16 Thread Dan Ackroyd
up the technical discussion with people's aesthetic beliefs. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] An invitation to chat and some useful links about PHP internals and extensions development

2023-04-14 Thread Dan Ackroyd
(https://github.com/ThomasWeinert/php-extension-sample) of how to implement features in PHP internals, where each branch implements a single feature. The way to use this set of examples is to find the branch that contains what you want to implement, check it out, and then look at the commits in that bra

Re: [PHP-DEV] First class callable syntax for instance methods

2023-04-13 Thread Dan Ackroyd
t aesthetics. Notes here: https://phpopendocs.com/rfc_codex/class_method_callable cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-12 Thread Dan Ackroyd
On Wed, 12 Apr 2023 at 17:32, Claude Pache wrote: > > The proposed modification of `function_exists()` will break existing code: Please can you submit a failing test to https://github.com/Girgias/php-src/tree/zend_autoloader that shows a BC break. cheers Dan Ack -- PHP Internals - PHP R

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-12 Thread Dan Ackroyd
ig_Template_Loader to Twig\Template\Loader migration. I'll add it to my list at https://phpopendocs.com/rfc_codex It would seem a good "my first RFC" for someone. Though, function migration could also be solved in a far more powerful way. Check my forthcoming reply to Rowan..

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-12 Thread Dan Ackroyd
There is this one thing that I noticed recently and that concerns me: PHP devs don’t use functions." - Nikita Popov https://www.npopov.com/2012/08/10/Are-PHP-developers-functophobic.html Nicolas Grekas wrote: > It doesn't enable anything that a script generating a list of include stateme

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-11 Thread Dan Ackroyd
utoloading would need to stay as part of PHP core itself. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading

2023-04-11 Thread Dan Ackroyd
things are possible, but I'd strongly prefer to have that be a separate discussion, which it's listed as a future scope: https://wiki.php.net/rfc/core-autoloading#higher_performance_through_maps If nothing else, it's going to take people time to figure out how they are going to or

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

2023-04-10 Thread Dan Liebner
> > The change in null handling. We have a codebase that dates to 1998. It's > fairly well written. Upgrading to 8 was a major effort (4 devs, 2 QA) that > took almost a year due to the change in null handling. We have 40 XML and > JSON APIs with various banks. Elements may or may not exist. The da

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

2023-04-08 Thread Dan Liebner
PHP is the foundation for many legacy codebases, and breaking old projects isn't really a great selling point of new PHP versions. Hopefully this scenario will affect enough people that 7.4 will continue to be maintained by some group of people into the foreseeable future. Best, Dan On Sat, A

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

2023-03-30 Thread Dan Ackroyd
iously better, and not just replacing one set of problems with another, the discussions might move. > I am really impressed how elegant and actually genius the enum > implementation is. So well rounded, minimal, yet creates so much > value! And it only took the PHP project about 20 yea

Re: [PHP-DEV] First-class callable partial application

2023-03-15 Thread Dan Ackroyd
ctions in a data-driven way. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] PHP code refactoring (was: include cleanup)

2023-02-28 Thread Dan Liebner
Which commit? On Tue, Feb 28, 2023, 3:17 PM Dmitry Stogov wrote: > Hi @internals, > > I have to say that we came to a serious conflict. > > Recently we voted for inluce cleanup RFC > https://wiki.php.net/rfc/include_cleanup and it was declined. > Despite that a series of code refactoring commits

Re: [PHP-DEV] [RFC] [Discussion] Typed class constants

2023-02-04 Thread Dan Ackroyd
er than RFC authors having to take time and energy to justify why they are reverting unapproved edits to their RFC. But yep, if you want to do it as part of a separate RFC, go for it. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2023-01-24 Thread Dan Ackroyd
function, that returns a more usable set of data than debug_backtrace does. This does sound like useful functionality in other cases than __get. If the amount of data returned by including all the backtrace is a concern, that sounds to me like including an max number of frames would solve that?

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

2023-01-24 Thread Dan Ackroyd
problem they are trying to solve first, before suggesting solutions. > I'd probably push for something more compact as a syntax Quite. Indeed. Yes. Danack wrote: > > Well, other than to use a different syntax. > > https://news-web.php.net/php.internals/114542 $(Zoq, Pik); cheers

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

2023-01-23 Thread Dan Ackroyd
On Mon, 23 Jan 2023 at 20:51, Larry Garfield wrote: > > On Mon, Jan 23, 2023, at 12:32 PM, Dan Ackroyd wrote: > > > > > $fnConstructor = Closure::fromClassConstructor(Zoq::class); > > // signature of $fnConstructor is the same as `function(Fot $fot): Zoq` > &

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

2023-01-23 Thread Dan Ackroyd
h isn't shorter, but at least allows passing the callables around with the type inspectable. Though it might be nicer if PHP had the ability to definte function signatures types. That sort of solution obviously doesn't address the problem of having to refer to the class method as a string, b

Re: [PHP-DEV] Loading SQLite extensions on PDO

2023-01-20 Thread Dan Ackroyd
ome historical driver-specific methods). I'm planning on submitting https://wiki.php.net/rfc/pdo_driver_specific_subclasses in a few weeks*, which will allow per-driver specific methods in a 'proper' way. cheers Dan Ack Well in time for inclusion in PHP 8.3 at least. -- PHP

Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly

2023-01-05 Thread Dan Ackroyd
On Fri, 25 Nov 2022 at 00:07, Larry Garfield wrote: > > On Sun, Nov 20, 2022, at 7:20 AM, Dan Ackroyd wrote: > > Hi Larry, > > > > Regarding the syntax, up until now PHP has only supported the letters > > a-z and underscore in keywords. > > > > I realis

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

2022-12-19 Thread Dan Ackroyd
zation failures, Good point. I'll raise it again when there is another discussion about an UnserializeException. Although it would probably be safe to expose invalid data that was meant to be turned into a DateTime object, it's not obvious that it would be safe to increase the exposure

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

2022-12-19 Thread Dan Ackroyd
mfmt_get_error_code() etc., rather than have to worry about exceptions. Changing the procedural functions to use exceptions would be a bigger and more controversial change than the one proposed in this RFC. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubs

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-13 Thread Dan Liebner
> Can you expand a bit on how you think distinguishing "undefined" from "null" would help? First off, I would be perfectly happy if undefined array/object index accesses went back to raising E_NOTICE. Undefined variables already resolve to NULL so in that sense NULL is already the "undefined" prim

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-13 Thread Dan Liebner
on : null` that's still way more concise than `$varExpression ?? null` that's baked into the language. On Tue, Dec 13, 2022 at 7:53 AM Dan Liebner wrote: > > No, code doesn't break. It now shows a warning instead of an error. > There is no behavioural change. > It

Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-13 Thread Dan Liebner
thout having to rely on configuration settings. > just fix your code. Practically speaking, I'd much more likely stay on 7.4 or migrate to Node. On Mon, Dec 12, 2022 at 5:52 PM Derick Rethans wrote: > On 12 December 2022 22:20:27 GMT, Dan Liebner wrote: > > >It has been prop

[PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index

2022-12-12 Thread Dan Liebner
First off, hello everyone, I'm Dan. I love PHP and I've been a PHP developer for over 20 years. The recent change to elevating "Undefined index" from E_NOTICE to E_WARNING set forth and passed by https://wiki.php.net/rfc/engine_warnings to me seems antithetical to what PHP h

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

2022-12-09 Thread Dan Ackroyd
le to see the data that you attempted to unserialize. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2022-12-08 Thread Dan Ackroyd
x27;getBadData' could make it easier to fix those issues. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly

2022-11-20 Thread Dan Ackroyd
being combined is probably the best choice. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Adding the OpenSSF Scorecards GitHub Action

2022-10-24 Thread Dan Ackroyd
the OpenSSF (and it's backers) and how they differ from contributors to open source projects. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Adding the OpenSSF Scorecards GitHub Action

2022-10-21 Thread Dan Ackroyd
ed to Open Source for years have quite strong feeling about events that have occurred, and manipulation by large companies. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2022-10-20 Thread Dan Ackroyd
affecting end-users. > This would just result in an uncaught Exception which should > be very visible in your error tracking service. My impression is that most web-servers running PHP don't have those. For people who run most sites, the first they would know about it is when end-users st

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

2022-10-18 Thread Dan Ackroyd
nion on the change. I personally think any project that doesn't convert any unsilenced warning to an exception is just asking for trouble. cheers Dan Ack * I wouldn't want to see a 'standard' library for PHP split across 80,000 repositories, but I think that the one (1) standa

Re: [PHP-DEV] RFC [Discussion]: Randomizer Additions

2022-10-16 Thread Dan Ackroyd
;t know of an environment where it can be tested. cheers Dan Ack * For those who get a mangled version, the "characters" there are 'a' 'b' 'c' 'smily-face' 'man + zerowidth joiner + woman + zerowidth joiner + child'. The last is a chara

Re: [PHP-DEV] Casting array to any class

2022-10-15 Thread Dan Ackroyd
ay, But in general, you'd really need to make a strong argument for why it should be in core, not just why anyone would be against it. cheers Dan Ack trait FromArray { /** * @param array $data * @return static * @throws \ReflectionException */ public static functi

Re: [PHP-DEV] RFC: StreamWrapper Support for glob()

2022-09-16 Thread Dan Ackroyd
why something that sounds like it would be a leaky abstraction should be in core (and so generating more support requests) rather than people using the already existing userland package (https://packagist.org/packages/webmozart/glob) which currently has over 10million installs. cheers Dan A

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

2022-09-12 Thread Dan Ackroyd
he next version of PHP by adding that to the options array, but everyone who is unaware of the option gets the more sensible behaviour by default. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2022-09-12 Thread Dan Ackroyd
could be annoying to people who are regularly contributing week-in, week-out. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2022-07-01 Thread Dan Ackroyd
> > $foo = $foo; > > Or create an empty function: > > function ensure_variables_stays_alive(mixed $variable) > { >/* function is intentionally blank */ > } > > and call that function with the variable you want to stay alive inside the > closure. But again, this is "n

Re: [PHP-DEV] [RFC] Exception type hint

2022-06-30 Thread Dan Ackroyd
how it could be better. It'd be a huge piece of work, but a better way of handling errors would be a significant improvement for PHP. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2022-06-30 Thread Dan Ackroyd
it captured." than trying to explain "yes, the variable is referenced inside the closure, but it's not captured because you aren't reading from it". cheers Dan Ack For this code, comment the var_dump in/out to affect the lifetime of the object. class Res

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

2022-06-29 Thread Dan Ackroyd
ave sanely. Memory itself is cheap. Although not having that optimization might mean that some variables last longer than they should, that is at least explainable*. Having variables not last as long as they should (because of an optimization) is harder to explain, and harder to explain how to work aro

Re: [PHP-DEV] [RFC] [Under Discussion] Auto-implement Stringable for string backed enums

2022-06-25 Thread Dan Ackroyd
setting. Which is a problem that keeps rearing it's head. Maybe someone sponsoring some blue-sky research on how feasible a module/package system could be, would make addressing problems similar to the one here be easier to work on. cheers Dan Ack enum Suit: string { case Hearts = 

Re: [PHP-DEV] Re: [RFC] [Under Discussion] PDO driver specific sub-classes

2022-06-24 Thread Dan Ackroyd
at have no specialised method: if ($pdo instanceof PDOMysql) { // What would be of utility here? } cheers Dan Ack * How to value being consistent is an aesthetic choice that many other programmers disagree with me on; "The fundamental guiding force to bear in mind is whether someth

Re: [PHP-DEV] [RFC] [Under Discussion] PDO driver specific sub-classes

2022-06-24 Thread Dan Ackroyd
e should either > implement quoteIdentifier only on PDOPostgres I'll expose it as a method on the PDOPostgres class. Having a quote identifier function on the PDO class itself that does the appropriate thing for all of the databases will be for another RFC, so that is also added to future

Re: [PHP-DEV] [RFC] [Under Discussion] PDO driver specific sub-classes

2022-06-24 Thread Dan Ackroyd
s, which is more "I'm not dealing with that here, talk about that > later." If so, that could be clarified. Yes, I've hopefully made the words clearer. Other points answered in subsequent emails. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] [RFC] [Under Discussion] PDO driver specific sub-classes

2022-06-20 Thread Dan Ackroyd
Hi, Following previous discussions, here is an RFC to have DB specific classes for PDO. https://wiki.php.net/rfc/pdo_driver_specific_subclasses cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [PHP 8.2] 30 days before feature freeze

2022-06-20 Thread Dan Ackroyd
ounced as under discussion? cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2022-06-13 Thread Dan Ackroyd
iables that represent services, but sometimes those things are needed. When you are capturing objects that can have side effects, making that capture be explicit is quite nice (imo). I think the different emphasis on capturing scalar values or objects might come down to a difference in style of

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

2022-06-13 Thread Dan Ackroyd
on't want implicit capture would be able tell their code quality analysis tools to warn on any use of short closures (or possibly better, warn when a variable has been captured). People who do want implicit capture can use the short closures which always have implicit capture. cheers Dan Ack

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

2022-06-12 Thread Dan Ackroyd
cheap. Having different (though similar) RFCs under the same URL makes is confusing when trying to understand what happened to particular RFCs. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] DB specific PDO subclasses questions.

2022-06-06 Thread Dan Ackroyd
ed at being added. > [2014-09-17 14:55 UTC] benjamin dot morel at gmail dot com > +1 > Definitely a show-stopper! btw, I admire your patience. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] DB specific PDO subclasses questions.

2022-06-06 Thread Dan Ackroyd
tionality, does anyone know of any other functionality that is exposed by SQLite or Postgres that isn't currently exposed through the magic PDO methods? cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [Discussion] Expand deprecation notice scope for partially supported callables

2022-05-29 Thread Dan Ackroyd
On Sun, 29 May 2022 at 16:34, Dan Ackroyd wrote: > > *an incorrect name* Apologies for writing your name incorrectly. That should of course have been addressed to Juliette. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.p

Re: [PHP-DEV] [Discussion] Expand deprecation notice scope for partially supported callables

2022-05-29 Thread Dan Ackroyd
rare edge-cases where someone has a callable that is only called in emergencies (like a disk running out of space) and so might not have that happen for months. Having the deprecation on is_callable would help those edge-cases a little. cheers Dan Ack * Is "syntax based callable" the right name? Better suggestions welcome. ** compared to some stuff I've seen/written. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Re: ***SPAM*** [PHP-DEV] [Discussion] Expand deprecation notice scope for partially supported callables

2022-05-26 Thread Dan Ackroyd
able, as that is typically only done once per callable, but callable type checks are done continuously. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions

2022-05-24 Thread Dan Ackroyd
pplications out there aren't being constantly developed. Instead they are in maintenance mode, where there isn't a programmer dedicated to constantly work on it. There would be lots of function calls to check, and some of them would need code to be modified to maintain the existing behav

Re: [PHP-DEV] [RFC] Body-less methods

2022-05-24 Thread Dan Ackroyd
er than assuming people will agree with that, would probably give the RFC the best chance of succeeding. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

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

2022-03-02 Thread Dan Ackroyd
to either stay apolitical or to have a strong executive team that can make decisions on behalf of the project. I do urge everyone to take effective action that they can personally do themselves, but the suggestion is not likely to help, and is likely to turn a shouting match very quickly. cheers D

Re: [PHP-DEV] SensitiveParameterValue serialization behavior

2022-02-26 Thread Dan Ackroyd
eral, I think we should only add surprising and awkward apis when there is a really strong reason for doing so, not because there might be a problem. If it's left as unserializable for now, people would have the opportunity for saying why it needs to be relaxed later, aka "no is temporary

Re: [PHP-DEV] RFC [Discussion]: Redacting parameters in back traces

2022-02-07 Thread Dan Ackroyd
proposed to be added to PHP core, needs to have the reasons why it's the right thing to do listed. If nothing else, it will help to reject attributes in the future if they don't have the same strong justifications. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] RFC [Discussion]: Redacting parameters in back traces

2022-01-10 Thread Dan Ackroyd
maintained. Yeah shared hosts might have a DB they can connect to, but those credentials should only be usuable from the shared host to the DB. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-20 Thread Dan Ackroyd
https://github.com/Danack/GuidelinesForOperatorOverloads/blob/main/guidelines.md) - if anyone has horrorible examples they'd like to add, PR's are welcome. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-16 Thread Dan Ackroyd
e damage has been done. But to repeat, I don't think the names of magic methods are a problem. Documenting that 'the name refers to the operator sigil, not to what the function does', avoids it being a problem to be solved. cheers Dan Ack -- PHP Internals - PHP Runtime Developme

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-16 Thread Dan Ackroyd
nd method overloading are really separate features. > we cannot have the conditional type hints. btw you can just say 'types'. Unlike some lesser languages, in PHP parameter types are enforced at run-time; they aren't hints. I believe all references to hints (in relation to ty

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-12 Thread Dan Ackroyd
ymbols are cool, and you're reasoning about how the RFC should operate from decision. I'm not sure I can make a reasonable argument against it that you would find persuasive, but to me it's adding a non-trivial amount of complexity, which tips the RFC from being acceptable, to not. chee

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-12 Thread Dan Ackroyd
t the operation actually means for the object. btw, I don't really care about this naming problem. My concern is that it's being used as a reason for introducing a special new type function, when it's really not a big enough problem to deserve making the language have special new sy

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-12 Thread Dan Ackroyd
a list of bad examples to the RFC, so people can refer to how not to use it, rather than each programming team having to make the same mistakes. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6)

2021-12-11 Thread Dan Ackroyd
ervice would need to call the operations dynamically from user provided data. I also have an aesthetic preference when writing tests to be explicit as possible, rather than concise as possible e.g. $foo->__add(5, OperandPosition::LeftSide); $foo->__add(5, OperandPosition::RightSide); ins

Re: [PHP-DEV] Automatic implementation of Stringable may conflict with old, untyped arginfo declarations

2021-12-09 Thread Dan Ackroyd
for Imagick from PHP 5.4 to 8.1, across lots of versions of ImagickMagick. I'm finding managing function signatures in a PHP file, in standard PHP format, is a lot nicer than maintaing that info in C files. cheers Dan Ack * Though, tbh, I wished I'd known about /** @generate-legacy-arg

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-09 Thread Dan Ackroyd
On Thu, 9 Dec 2021 at 19:28, Dan Ackroyd wrote: > > Is this intentional? If so, could someone explain the purpose of the > > change? > > Probably to make the build process less flaky, by explicitly checking > dependencies, so that there are fewer instances of "stuffs

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-09 Thread Dan Ackroyd
Probably to make the build process less flaky, by explicitly checking dependencies, so that there are fewer instances of "stuffs not working.I guess I'll do a make clean and see if that helps". cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Re: [VOTE] Deprecate dynamic properties

2021-11-25 Thread Dan Ackroyd
nger being updated, Having companies sponsor open source projects makes it less likely they will be abandoned. cheers Dan Ack * https://www.theregister.com/2021/04/26/report_developers_slashdata/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Re: [RFC] Deprecate dynamic properties

2021-11-25 Thread Dan Ackroyd
so often try to guilt maintainers into doing work for free. If anyone would like me to help explain to users "your company needs to start sponsoring this project before this project will acknowledge this issue", in any of their projects repos, please ping me on twitter https://twitter.com/MrDanack cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

  1   2   3   4   5   6   7   8   >