« first day (3245 days earlier)      last day (1703 days later) » 

1:00 PM
LDAP query in cUrl not working – #78491
 
/me waves
 
1:16 PM
o/
 
\o
 
hi all
if I have 2 tables like this:
tableA
id data
1 foo
2 bar

tableB
tableA_id index data
1 0 null
1 1 baz
1 2 abc

I want to have something like this as result
1 0 foo <-----
1 1 baz
1 2 abc
I want to select from tableB and join tableA only on index 0 to replace that null data with the data provided in tableA. But I want the rest of rows to be retrieved untouched by join. crossjoin/left/rightjoin with where clause will override the rest of records
I use pdo with mysql
 
1:32 PM
join on tableB.tableA_id = tableA.id AND tableB.data IS NULL
 
somebody can help me on something?
it's not a php question but I think somebody may know a solution
my code works on jsfiddle jsfiddle.net/afd4Lz5j
but not when I save in html on desktop and open on browser
It's a ajax call
looks like browser it's blocking something
 
What does the console (F12) say?
I tested it locally and it works test.html:36 {Status: "SUCCESS"}
i guess
 
@OtávioBarreto Probably you are dealing with cors
 
1:48 PM
@JoeWatkins pong
 
@PeeHaa or maybe he's dealing with The Corrs, which is a far scarier prospect
 
@SebastianBergmann I just wanted to check that this is okay ?
 
@DaveRandom :p
 
I wasn't really sure what to do there, someone asked me to apply a license, I think that's okay but not sure ... would normally have just copied your license but the wording doesn't allow me to modify it and doesn't make sense without modification ...
 
Every time I see clobber I cannot help to think it is a name for some weird sexual act
sorry :-)
 
1:54 PM
@JoeWatkins You wrote that code which is part of php-code-coverage, did you not? Even if not, this would still be okay, I think.
 
yeah I did, but I'm not really sure how it works still, it seems to be under the php-code-coverage license, if it's okay with you then it's all good ...
 
As far as I am concerned: all good.
 
@PeeHaa apparently we have very different lives ... source
@SebastianBergmann cool ta
 
I hate hardware problems. Looks like my Amiga's USB controller died. And without USB sticks it is a PITA to transport files between a modern computer and my beloved Amiga :-/
 
TIL
Also make clobber
 
1:57 PM
@PeeHaa for once, Urban dictionary doesn't see clobber as a sexual act: urbandictionary.com/define.php?term=clobber
 
yet
 
there is #7 having a sexual reference though
 
reference, but not act
 
registers and stacks are what come to my mind ... not a sex act ... @PeeHaa you are strange ...
 
> registers and stacks
And I am the weird one...
 
2:02 PM
I'd like to register your stack
 
I would like to stack your registers
 
I hope you have an MMU and use memory protection.
 
@DaveRandom how to bypass this?
 
I'll clobber your stack of registers
6
 
@SebastianBergmann :P
 
2:03 PM
@OtávioBarreto The Corrs? Just don't buy the album I guess
 
if it's a CORS issue, there will be an error in the console
 
Can make anything into a sexual inuendo... I mean, rop chaining sounds pretty kinky
 
the server would need to set an Access-Control-Allow-Origin header
although I'm actually not sure how CORS interacts with local files
@MarkR "yeh, she was so aspect oriented, it was crazy"
soooo many cross-cutting concerns
proper fluent interface as well
 
@DaveRandom lolz
 
2:10 PM
it only sounds like sexual innuendo because you are at least somewhat cognizent of the meaning of those words ... if I say "I need to get my stack of registers clobbered" (which to you sounds like innuendo) to my wife, far from lining the floor with whatever she's wearing, I'll get "that sounds hard, would you like a cup of tea?"
 
@DaveRandom yeah my server have this Access-Control-Allow-Origin * on the header
 
@JoeWatkins Which could also, technically, be a response containing sexual innuendo
 
It's inuendos's all the way down... which itself is an inuendo
 
@OtávioBarreto I guess test.com is a replacement for your actual host? Is it possible that you dont use https ?
you cant do local ajax calls without https. It will always result in a cors error
 
@user3655829 got it
console .log Mixed Content: The page at 'https://jsfiddle.net/afd4Lz5j/' was loaded over HTTPS, but requested an insecure resource 'http://192.168.0.1/server/app/site/home.php'. This request has been blocked; the content must be served over HTTPS.
 
2:19 PM
You should open the dev tools more often. Like any time you got errors.
 
the site is on localhost that's why I added test.com
I solved with the following, I had to add tje jquery scipts on the header of the page, not worked when It was on the footer
 
oh
thats because the browsercache is not working in local mode?
 
you need a onload function wrap inside the scripttag with the ajax call. Online in jsfiddle your browser doesnt need to load jquery. Because of that it has already loaded $ . Local the whole file is not loaded when the browser wants to execute your ajax call.
 
2:35 PM
Comparing Value from equation to 100 – #78492
 
@NikiC another idea for the "package" concept: package-level use statements (importing a class into a namespace, for the entire namespace).
package Foo {
    declare(strict_types=1);
    use Bar\Baz;
}
namespace Foo {
    $a = new Baz; // instance of Bar\Baz
}
 
@ircmaxell nice! that could be used for legacy refactoring, sort like LD_PRELOAD ;-)
use function into the package would be even more useful in this regard
 
@beberlei yes!
 
I have to disagree, that level of disconnection from file level sounds like pain
 
have you worked with legacy code before?
:p
 
2:38 PM
@MarkR I think it would take a bit of getting used to, but it would prevent a lot of the pain that's currently felt in a lot of cases when two namespaces work closely together and result in use spam at the top of every file
 
I barely notice it tbh @ircmaxell. phpstorm just collapses it, and while I know not everyone uses an IDE, I'm wary of any such changes until I know that namespace declares will come with an explicit opt-in for every file
 
"explicit opt-in"?
 
As in declare(use_these_settings_from=/somepackage/etc)
 
Okay I'm still confused why I cannot pull git.php.net from my laptopt
 
honestly, I'd rather just use a package directive instead of a namespace directive in that case
 
2:42 PM
Does php.net not accept ed25519 keys ?
 
packages still have to be kept somewhere
 
and some way of declaring the "master" package which is autoloadable
 
@MarkR package "foo/bar"; and then also declare(use_this_settings=true);? the current package proposal from nikic have to be declared upfront as "declare_package("foo/bar", ["auto_use" => ["Foo\Bar"]]);" for example
 
I was under the impression the existing proposals were all global state, has that changed?
 
mixing two completly not finalized propsals here, i think this is explicitly optin, the package owner would say in my package i want to have these auto use statements in every file
 
2:44 PM
or
declare(package "nikic/php-parser" {
    declare(strict-types=1);
    use Foo\Bar;
});
 
/me dies
 
RIP
 
hehehe
 
@Kalle I already drafted that email, but never sent it. I'm quite perturbed by Nikita deciding things for the entire project. Like green-lighting the huge swathe of warnings to error changes with zero discussion, now changing the RFC process with zero discussion, what next? You're a core, and key, contributor sure but you're not playing ball with the rest of the project.
 
2:56 PM
@OtávioBarreto sure
 
Thanks
 
As one of the people that has been submitting PRs for the warnings to errors, the guidance I received was to only target warnings which related to parameter validation which was always-wrong, invalid enums etc
 
@ircmaxell I don't really want to play a guessing game what file a type comes from… hm.
currently we have a nice 1:1 mapping of file-scope (i.e. including file-local use) names to files via psr-4
 
@bwoebi Well, in this case, you'd have exactly 2 options...
but I'm thinking also in terms of typedefs and things like that.
 
3:17 PM
@ircmaxell I'm just saying that anything more than 1 is one too much, imo.
 
I like the idea of typedefs, I'm just not sure if a namespace declare is the right place to put them. I mean, let's say they're part of an external API, which isn't exactly unreasonable, the API consumer now has to either copy the typedefs into their own code, or opt in to use their entire package spec
It feels like it should be something that's an entity in itself, resolvable by the autoloader.
 
@MarkR I see there as 2 alternatives. Typedefs and use aliases. Typedefs are full public types (like classes) that are autoloadable, reflectable, etc. use aliases are local file only shorthand.
 
If this were C/++ we would just slap the typedef in an .h file and could include it wherever we wanted, effectively just making it part of the source file using the pre-processor, but being PHP that isn't an option
the alternative, and don't kill me just yet... would be to make them part of a class.
class Someclass {
typedef AllTheNumbers int|float|real|sqrt(-1);
}

function x(Someclass::AllTheNumbers $param) { ... }
That pretty much has the one benefit that you can include many of them in a file, rather than just 1 via autoloading.
 
@MarkR hmmm... naybe that's not a horrible idea. What if we provided the ability to declare(include="file"); which concats the file together
 
Well the problem is finding its location.
 
3:28 PM
path resolution is easy in these cases... always local to the file
 
For example, if I want to use some typedefs out of a third party project, I could, probably, create an absolute link to them somewhere in composer directory. That vendor then, for whatever reason, decides to put everything in a subdirectory and adds new autoloading rules. Functionally it's identical, but in terms of absolute paths it's just landed a wrecking shot on your code.
 
so composer adds a function "resolve file" declare(include=composer_resolve("foo/bar:filename.php"))
 
I <3 composer but I think making it a core dependency will get voted down by about 10 to 1
 
how is that a core dependency?
all the include takes is a string
in this case the function call returns the string
but it could be a normal path
 
oh I thought you meant composer_resolve as an inbuilt hook
Don't think it would work for (edit: preloading) and opcache - it would have to execute code
 
3:35 PM
what is bad about the idea niki proposed with the package_declare having to be executed before the first package "$name" statement gets executed? this would allow all kinds of systems to implement the means to "know the location" of the master file of the package, especially in composer this could be generated from composer.json if its declarative
 
Global state = Blurgh, IMO.
 
@beberlei I believe it should be a class (or a class-like symbol with similar functionality, just not instansiatable)
 
When increasing minimum PHP version, should that release be a minor release or a debug release? That is, should a 1.0.0 package become 1.1.0 or 1.0.1?
 
@salathe those changes were voted on weren't they ?
 
@Trowski I'd argue a major version
 
3:42 PM
@Trowski Pleeeease a major
 
@ircmaxell The only thing that changed was adding a void return on a final class implementing an interface from a dependency.
 
he announced the RFC on internals, there is also a pull request for it's discussion, I don't really see a problem ... he didn't prohibit the conversation going on via internals, just encouraged using github ...
 
There's not really a reason for it to be a major version.
 
@Trowski if I have a library based on your thing and I want to commit my lock file (because I very much want to lock my tested dependencies) it will fail on other versions
 
it looks like a reasonable way to test out a new thing (that we should have been doing for ages), now when we come to the RFC about whether we adopt this as an optional or the formal workflow, we'll actually know something about how it will work in practice, even if we only have a sample of 1 ...
the alternative would be to decide whether or not we want to do this without that sample, which doesn't make a lot of sense, right ?
 
3:45 PM
@PeeHaa Other PHP versions?
 
Also it sucks when running composer update on the same version and a working library/dependency suddenly breaks
 
@PeeHaa Why would it break though? There's no BC breaks.
Otherwise of course it would be a major.
 
There's 80+ comments on the git discussion now, at 80+ comments on internals, the place was practically on fire
 
@Trowski I am running a php version which does not support void. The lib is working. I run composer update and now it breaks @Trowski
 
@PeeHaa Composer shouldn't install the new version.
 
3:47 PM
Right I keep forgetting how to composer
...
 
It will use the most recent, compatible version.
 
But consider the composer.lock case. I am running an update on my project, commit the lock and it works for me. Now somebody with an older php version (which I support) suddenly cannot use it anymore
 
@PeeHaa They can still use your library, they just can't replicated running your tests exactly as you run them....but that's correct because they don't have your environment. If they aren't running your tests, but are just using your library as a library, nothing breaks for them...
 
You can ensure compatibility with "config": { "platform": { "php": "x.x" } }
 
@Danack The problem is I cannot even pin dependency versions
 
3:54 PM
You shouldn't be pinning versions in libraries.
 
I should
 
....that doesn't pin them for people using your library as library.
 
Sorry. s/libary/project
 
Sure, you can pin them in a project, but don't be surprised if they don't work in a different environment.
 
Do you want to say in detail what you want to do, and then what problem you think that might cause? I think I don't understand what you're saying.
 
3:56 PM
There is a big difference between at least having tested versions and just say screw it will be different env anyway
 
@Danack @PeeHaa Context of this discussion: github.com/amphp/log/commit/… That library is tagged as 1.0.0 right now. With that commit, I wanted to tag 1.1.0.
However the argument is that I should be tagging 2.0.0.
 
Tag as 2.0 if you've changed your API
 
Nothing in the API changed.
Monolog v2 added a void type on an implemented interface.
The class in that library is final, so no one could have extended it.
Consumer code does not need to change, so 1.1.0 should be fine.
 
Sup
 
> I want to commit my lock file (because I very much want to lock my tested dependencies) it will fail on other versions
 
3:59 PM
1.1 makes sense to me then
 
github.com/amphp/log/commit/… Method in question. (Extending abstract class, not interface, sorry).
 
Anyone know why the following is running out of memory for 23k or so keys? (Trying to use 4gb of RAM)
 
Lock files only work for the specific environment they were run in. I don't understand why PeeHaa wants or expects them to work in multiple environments.
 
$redis = new RedisCluster(NULL, ['yeet.cache.amazonaws.com:6379']);
$keys = $redis->keys('*');
 
@Danack Precisely.
 
4:01 PM
@Danack Because I want to lock my dependencies to a version
 
> I want to lock my dependencies to a version
6 mins ago, by Danack
Do you want to say in detail what you want to do, and then what problem you think that might cause? I think I don't understand what you're saying.
 
I just did?
That is in detail
I release a project. These are the versions it works on
As in: composer install
 
Yep got that. But I don't understand what the problem would be.
 
If a dependency that you pinned required PHP 7.2, then your project requires 7.2.
If you want to ensure dependencies work on 7.1, but you're installing on 7.2, you have to add that in config in composer.json.
 
But to be explicit, a lock file doesn't support multiple versions, it is for a very specific environment. You can help target updating the lock file, with "config": { "platform": { "php": "x.x" } } but that lock file will still target a specific version.
@BenFortune Are the values for your keys 200kb in size?
 
4:05 PM
@Danack Does that still enable one to run update and get later version if somebody wants?
 
@Danack Nah, they're about 2kb, all PHP sessions.
 
@PeeHaa yes, the lock file isn't used for updates. (well I mean if you update a single thing it will try to re-use the existing settings probably), but in general completely new lock file will be generated.
 
No but you pinned the php version in the json. Not in lock
 
You don't have to....that was us just not understanding what problem you were trying to solve and so saying something not needed.
 
I'm only returning the keys though
 
4:08 PM
It is needed though
 
If your library works for a set number of php versions, you can just add that info as a dependency in the composer.json, and then update will fail if people try to update it in a non-supported version of php.
 
But again you cannot commit a lock file...
 
@BenFortune Is each key wrapped in an object, or is it only an array of strings?
 
Meaning I cannot ship a lock file with tested versions of dependencies
 
@BenFortune 23k keys sounds like a lot anyway, breaking them up into chunks would be a saner way of processing them.
 
4:11 PM
@PeeHaa you can ship a lock file with tested versions of dependencies, that will run for the exact same environment that you generated the lock file in. But that is always true. If you want to ship a lockfiles for multiple environments (including different versions of PHP) you will need to ship a lock file for each one. That's always true, regardless of the current subject matter.
 
@PeeHaa You can. Just don't commit the composer.json with the "config" portion if you want people to be able to composer update and get dependencies requiring other PHP versions.
 
@Trowski yes exactly
@Danack The only thing that actually matters is php versions for me
In terms of environment
 
So either restrict the versions of php you support in your require list, and allow people to run composer update, or ship multiple lock files that were run against different versions of PHP.
 
@Danack How does that work?
The last thing
composer.lock.7.4?
And have people rename it?
 
Yes, or docker containers .....I like docker containers.
 
4:13 PM
I know you do :P
 
as I said....what you're describing is a problem anyway, regardless of the change being discussed. Also, Virgin media have said there is a fault with the hardware at my ISP exchange, which they're going to fix in .......October.
wrong image, but I'm on my phone...
so, laters.
 
My entire problem is the premise of the lock file is gone :)
 
/the lock file is a lie.
 
@Danack Just switch. Breach of contract from their side
 
what happened to tweet boxes ?
 
4:29 PM
Isn't that Reddit?
 
no tweets used to make a box in this chat, but it broke a while ago afaik ...
gists are also broken I think ...
 
So if I read your tweet right, what you're saying is, Nikic should be required to lift Mjolnir?
(I'm kidding. I fully agree with your sentiment)
 
@JoeWatkins It doesn't work anymore for a while
 
in all seriousness, it applies to Niki at the moment, but it applies to past contributors too ... you've been around for not very long, and I'm willing to wager you have heard reference to "the old guard" probably with those exact words ... there's a reason the guard gets to be old, it's so hard to accept new leadership, even when the old leadership is bad, or there is no apparent leadership (depending on your perspective) ...
Anthony also has skills we couldn't purchase if we were funded ... he's hired by fb and google and the like, the top of his game, just like Nikita is today, and he walked away from internals because in part we can't accept new leadership ...
 
I have lurked on externals for a couple of years now, and I occasionally post to reddit, although I prefer to keep those two identities separate. What I have seen in the past few months in particular is a rapid acceleration of ideas coming out, being pushed through, and receiving quite wide public support.
There's genuine excitement about 8.0 even though it's potentially years away
 
4:40 PM
that's almost entirely down to nikita and so jetbrains, the effect of having just one more truly dedicated person is quite remarkable ...
 
@salathe idk, i was confused about girgas and marks PRs at first as well, but as niki pointed out it is all covered by his RFC which was unamiously voted on. if we split each warning to exception decision up into individual votes that would lead to endless discussions.
 
other people might dedicate themselves, if we'd allow it ...
it's not even one more, it's really just one, dmitry never really works (or thinks) outside of /Zend or ext/opcache ...
 
is dmitry still employed by roguewave/perforce btw? i thought he quit with everyone else in july, but maybe i just understood this wrong
 
I've been working on docs.google.com/document/d/… for wider exceptions (based on Girgias' original post) but even once it's fleshed out, im not sure how well it'll go down. I suspect namespacing might need to be the outcome
 
@beberlei I'm not sure to be honest, I know he's still working (though maybe on holiday right now, or was recently) ...
 
4:56 PM
Sorry was eating @Trowski
 
... that could be interpreted in a number of ways
 
How are you going to handle security issues in the previous version of the package? Or is support (even security) now just cut off from the previous php version? @Trowski
@MarkR lol that took my some time :D
 
@MarkR have you lurked pre 7.0 on internals? Bceause it had the same vibe back then imho, a lot happened, everybody excited. I expect 8.0 to be released november 2020 to be honest, its the way 7.0 was released in relationship to 5.6
 
The 5.x stuff was a bit before my time, I think I started reading externals about 7.1ish. Maybe .2
 
@beberlei yeah, it was a ton of fun, but also a ton of drama. A lot of people quit due to how ng was handled. Microsoft basically pulled funding (they were funding 3 people part time, and after NG they pulled all 3)
 
5:03 PM
i didn't know that. does taht excemt anatol in a way or did he get reassigned to it later? i remember he worked on the tsrm refactoring for 7.0
and the size_t stuff also?
 
hi all
if I have 2 tables like this:
tableA
id data
1 foo
2 bar

tableB
tableA_id index data
1 0 null
1 1 baz
1 2 abc

I want to have something like this as result
1 0 foo <-----
1 1 baz
1 2 abc
I want to select from tableB and join tableA only on index 0 to replace that null data with the data provided in tableA. But I want the rest of rows to be retrieved untouched by join. crossjoin/left/rightjoin with where clause will override the rest of records
 
@BoteaFlorin i think anthony replied to your exact same question a few hours ago
maybe i am wrong, it looks so familiar :)
 
Well I hope the enthusiasm keeps up. Momentum will be essential to 8.0's success. By the time it drops there should be an overwhelming desire for most people to be on it
 
@beberlei didn't he back away after that though?
 
i am pretty sure he still works for microsoft
 
cmb
5:07 PM
yep, he does, but only partially on PHP.
 
He does, but he was more active leading into 7 than since, no?
@beberlei yup, I did
@JoeWatkins thank you for those kind words. And I am purchasable. I don't come cheap, but ;)
 
@beberlei no, you are right. I was on work then travelling home and I thought it wasn't because it was not a dirrect reply to notify me. Sorry. my shame 😃
 
cmb
He did quite a lot of Windows improvements "behind the scenes" even for PHP 7.4.
 
@PeeHaa It would have to be a major release if I wanted to support security for a previous PHP version. Not an issue here, but something to consider in more complex libraries. We were considering upgrading amphp/amp to 7.1, so that could be something to consider there.
That being said… if PHP 7.0 isn't getting security updates, do we care if we support security updates for that version with our library?
 
Nope
Probably not
/me looks at machine on 7.0
(in shame)
 
5:13 PM
@cmb fair enough, then I will retract my prior statenent
 
Is there a compelling reason to still run 7.0? I forget what broke in 7.1… not much I thought.
 
Does PHP have a self destruct built into it? In terms of versioning?
 
@Trowski No. There is not
 
or some kind of prodding function?
 
Unless laziness is compelling to you
 
5:17 PM
Laziness is more of a legitimate excuse than compelling reason :-D
 
:P
 
I don't know how well it would go down on a vote, but I'd personally be giving consideration to warnings being written to the error log once every <x> minutes that the version of PHP is out of date if the current time is beyond some hardcoded timestamp. Vendors doing security releases can change their own values.
 
ugh stupid me, i am at least 2 past working hours, now its raining heavily and getting dark. i still need to bike home.
 
@JoeWatkins No, not at all.
@beberlei it's not covered by that, at all.
 
cmb
6:07 PM
Re github RFC: I think this is an interesting experiment, and the final RFC document still can be moved to the Wiki before voting.
Re additional warnings to errors: I would have welcomed a thorough discussion,
but think it's okay this way. After all, if a func accepts an array or string, only
warn about passing a resource, for instance, would be inconsequent. And some
additional checks (like the form of an array argument) should IMHO be treated the
same.
 
6:29 PM
On that topic @cmb, could I ask you to commit github.com/php/php-src/pull/4629/files and then I can clear my entire list
 
untested function?
 
Seemed that way
 
@cmb The biggest problem I can see so far is taking up space to explain stuff to people who don't understand why the RFC would be wanted would be distracting. But there again, maybe they aren't the top priority to support.
 
6:45 PM
@Danack yeah, the barrier to entry for commenting is so simple that maybe on more controversial RFCs this would explode the comment count. the emoji support takes something away from this, so you only need to add one to show support/dislike of an opinion
 
Yeah, having close to a few hundred upvote-equivalents certainly helps
 
@beberlei I think that emoji point can't be understated. It can be useful to deflate the "loudest one in the thread"
 
oh i didnt think of that
it can also be quite the force though that might hit people too hard
 
Hopefully it doesn't get to a mob angry-face emoticon mentality. But a well written counter-point backed up by a few dozen upvotes certainly wouldn't hurt the objective of less spammy discussion
 
7:21 PM
My overall impression for now: Review comments on specific lines are mostly relevant and useful (and very lacking in current process). Top-level comments are mostly noise (like current process).
 
It would be nice if they were threaded and collapsible (the top-level comments)
 
There is the ability to mark things as off-topic (which imho the whole type alias discussion is), but I'm rather hesitant to use that.
 
@NikiC well it could be an indicator to keep the noise down, it just mutes the post if its of irrelevance
The view like you said is a bit annoying to read as its mixed PR comments with inline and such, but the individual discussions on the inline stuff seems interesting, even if I still prefer the ML over this personally
 
@NikiC maybe it is worth talking to someone at GH to add some of that functionality? They have seemed responsive to projects before...
 
@ircmaxell It kinda feels out-of-scope
While somewhat convenient for this purpose, this is not really what PRs are for, and I don't think that threaded discussion support would be something useful for the vast majority of PRs
What might be somewhat in-scope is to move comments into a separate issue for example. E.g. could create one for type aliases and move all related comments there...
 
7:32 PM
If you have the ability to move comments elsewhere that sounds ideal, just throw a comment in after whatever the top level one was giving the link, if it's not automated
 
Anyway, I think in terms of the RFC itself, the main point of feedback is that people want int|float|null rather than ?(int|float)
Wondering whether I should give in on that ...
 
Yes please :-)
 
Are there any contributors to PHP for whom github is blocked? aka anyone from China?
 
ah, I thought it was a more permanent restriction.
 
7:42 PM
I would assume so too if it was China, but hey
 
There would be an irony... you'd expect they'd be all for discussions on unifying things.
 
They probably made their own called Koihub, given how much they copy, but jokes aside
@Danack I think I remember an iranian or access from iran to php.net sometimes wasn't working, I guess it could be because of the sanctions or something, so we already have some sort of blockage
 
I see what you mean, that typedef stuff has gone off the rails and one individual seems to be making it personal.
 
8:16 PM
@MarkR Sounds just like the list!
@NikiC In case it was unclear, I think using null is better than ? here.
 
I dare say within a few months there will be a handful of people who find themselves banned from the php github org @LeviMorrison
If RFCs are to continue via that site, that is
 
@NikiC I've been laughing ever since I read the page. These kind of comments... ahahaha:
> I guess that if UnionTypes existed when Nullable had been implemented, that would have been the way to go
Ahahaha... how times change.
 
I saw that, it was pretty much a rephrasing of Nikic's comment in the RFC.
I noticed a distinct lack of comments going along the lines of "But ma dynamic language!!!" which is reassuring.
 
It's funny because go look at vote number two here: wiki.php.net/rfc/union_types#vote
Keep in mind at the time of vote, no version of PHP had nullable types; it had been accepted but not released, so no BC concerns.
Sometimes things just have to be proposed more than once.
 
Indeed, a certain element of needing the right opportunity.
4 and a half years ago, dayum
 
8:32 PM
Random question: why does ArgumentCountError extend TypeError?
 
Creating simple object with object() – #78494
 
I'm happy to see the warm reception of the RFC. I'll still temper my excitement though, because when I proposed union types the reception in the wider community was pretty good, just not popular with Internals. I wonder if the same will happen again.
 
I'd be lying if I hadn't considered that the amount of public support it had received would act to apply pressure on people who might vote, what with voting not being a confidential affair. If that's a morally good thing or not, I make no view.
I assume it's because not enough arguments is the same as having illegal undef's passed to the function (re: TypeError)
 
8:53 PM
@salathe I think because originally zpp always throw TypeError for everything (including arg count errors), and then someone wanted to make that more specific and had to subclass (not sure if this exists since 7.0 or 7.1?)
@LeviMorrison So I'd probably go with allowing |null but not allowing it as a singleton type (similar to false). Having both ?T and T|null I can live with, but having both : void and : null would be a disaster.
If |null is supported, wondering if ?(U|V) should be, or whether that would always have to be U|V|null
 
If I were a new person to PHP, one who had not been exposed to the RFC, I believe I would look at ?(U|V) and think U|V was some kind of special condition that was required. I don't think it would be obvious to me that null was just as valid as U or V
Mathematically, I'd think... factor it out and end up with ?U|?V ... but as a programmer I'd instinctively think something like... if not U or V, be null. (If i'd never been exposed to it).
 
9:09 PM
@MarkR null is quite often a rather distinct state from the other union members though
It really is "all that other stuff" or null
At least apart from the generate case of something like null|bool|int|float|string aka scalar, where it is just as good as any other type
 
@salathe What about just reusing the SPL exception: InvalidArgumentException instead of ValueError?
 
@Kalle that would very quickly get the PR declined :P
 
Indeed :P
 
@NikiC Oh, I realized I haven't said thank you yet. So thanks for revisiting this. I think this is a good direction for PHP.
 
@salathe I personally still think something in that way of naming is better, like InvalidValue etc, but thats just me
 
9:20 PM
ValueError is nicely symmetric with TypeError tho
 
^^
 
That is true
 
Also, I'm writing so much Python these days and I keep surprising myself that PHP doesn't have ValueError. :P
 
Silently admits that I have never written a single line of Python
 
@NikiC my only concern there is it starts losing the "one canonical source of Truth for the discussion" that the mailing list thread was, and that this RFC PR concept is. I would worry that the more places to look, the more things will get lost (or be harder to revisit in the future)
 
9:27 PM
/me cries in "I only just finished those PRs" @salathe :P
Soooo, on the topic of function parameters, there's no "use default" keyword in PHP is there?
 
@MarkR Not really, some internal functions may fallback to their default afair with null
 
I was just pondering the use of using nullable types defaulting to null to skip parameters
 
@salathe Quite like the ValueError :D
 
somefunc($required, $optional, null, null, $otheroptional)
 
I think we really need to "standardize" the error messages because there are a couple of variations
Also for the union type discussion about null I think that the idea that |null should only be possible for a union of types and not an individual one ^^
 
9:38 PM
Where would you ever want a null by itself? It's either null, or uninitialised.
I could see it potentially being used in gener... those things we aren't meant to talk about.
 
instead of void
you know people are going to use it that way
 
ah ok
 
I was also confused about the comment that type aliasing needs to be part of the proposal
Like, no? It's a completely different issue >-<
However wouldn't it be better to have a gitlab instance for the PHP.net project if we move forwards with the idea of RFC on GitHub or similar?
 
It would be an extra wall, would it be worth it? (I say knowing full well im a hypocrite from running my own dedicated gitlab instance so im not tied to github)
 
Pretty sure you can allow authentication via GitHub/GitLab.com/other
 
9:43 PM
Hmm, that would certainly change my opinion somewhat
 
I know the sysadmin of my programming group disabled outside authentication but I think it is possible
 
@Girgias It's a good idea. Historically the project has preferred to keep things "in house". However, from experience, no-one's going to look after it.
 
Erf, true
 
Re: the source of truth, perhaps it could be enough to scrape (or pull from an API) all the comments from each location, and push them all into a central DB?
 
If PHP ever gets funding, we sorely need someone to maintain infra >.<
It'd be a full time job for at least a few months, just doing infra maintenance and updates.
 
9:48 PM
I haden't even realised there was a separate git system for internals up until a couple of days ago, I had assumed it was all just github
 
Nah
There is also svn
Mostly for docs now and karma iirc ?
 
cmb
A lot of PECL exts are still on that SVN as well.
 
@LeviMorrison just making the list of what needs maintaining might take that long....
Also, I think people having a lot more experience of using types on parameters will produce quite a different result. Though there are still going to be a lot of people who don't see the need, and aren't persuaded by other people saying they really want union types.
 
I don't have a major use for it myself, but I can forsee some kind of [individual scalar] | [object with an interface to get that scalar]
 

« first day (3245 days earlier)      last day (1703 days later) »