« first day (3857 days earlier)      last day (1313 days later) » 
01:00 - 22:0022:00 - 00:00

01:37
@LeviMorrison By which you of course mean pemalloc(sz, 1)
02:24
@Sara What is the difference between emalloc and pemalloc?
02:50
@Sara No, because we theoretically handle malloc failure - we won't abort. Of course, something else probably will very soon.
I say theoretically, because I haven't plopped in an alternate malloc to test it ^_^
@Trowski second argument to pemalloc is "persistent", pemalloc(size_t, 1) == malloc(size_t), pemalloc(size_t, 0) == emalloc(size_t)
the reason to use pemalloc over malloc, is our allocators do not fail
(like emalloc, if it fails the allocation it does not return, which is why you don't see null checks after allocs in php-src)
It calls zend_bailout eventually, yes?
exit(1)
(just above)
Yeah, seems most error paths lead to heap.space/xref/PHP-7.4/Zend/….
For emalloc I meant.
oh yeah, for emallocs
03:04
pemalloc I guess doesn't use zend_bailout because it's skipping Zend MM.
right, pemalloc(..., 1)
persistent is an odd choice for the flag name.
it's persistent with regard to the request, where everything emalloc'd may have a request cycle ...
Ok, that makes much more sense then.
03:31
Unable to close NumberFormatter after failed parse() ・ Unknown/Other Function ・ #81019
03:46
I've spent so much time writing cli php that I forget sometimes there's this niche way of running it as a server module. Strange, I know…
even in the cli, there's a request ... which is a kinda a problem actually ...
it's difficult to be general purpose while bound by the rules of a request based model ...
we could do with another mode, but its so much work to review all of every extension ...
How would another mode differ from the single "request" of cli?
04:02
single request really means single thread, tsrm used to be absolutely necessary, but today, zend ops are re-entrant, code is immutable (ie. mapped pointers can do for threads what tsrm/zts used to do, for code), most if not all of the 3rd party functions we call use the re-entrant variant ... we're very close to having happenstance thread safety, I can't quantify exactly how close, but slowly the bits have come together ...
it's only the most important bits that are a problem :D
eg/cg ... if we could somehow make executor safe we could do away with request based model, you could enter zend_execute in any thread ...
it's very close ... but I dunno if it's on dmitry's mind, all of the things that got us closer weren't done for this reason ...
core could just use native tls ... that's probably the simplest thing to do, but it would cost obviously ...
similarly, we could do away with module globals, and extensions that need the same sort of model could use tls directly, those that don't can just use normal memory (and so operate in many threads on the same memory) ...
we'd loose share nothing, but we actually are not really share nothing any more anyway (all code is in shm with opcache, and stays there) ... we want share nothing in userland, it makes user code easy, but internally we need to share, and do already ...
it's mostly a pipe dream probably .. just the initial review of every call made by every extension, and the calls those calls make, represents a massive amount of work ... and that's where we'd have to start ...
04:24
Yeah, but look how far we've come between 5.6 and now.
That is an enormous undertaking though.
yeah, and we have sort of moved away from the ideal of being general purpose ... everything we're doing seems to be focusing the language more and more on the problems of the web ... so how much sense does it really make to even start
it's embedded in our thinking, when you hear people talk about the 90% use case, they very specifically mean the 90% use case when it comes to the web, they're not even thinking about being general purpose when considering use cases ...
like when I consider this accessors rfc, if we're really a general purpose language, then it's a no brainer, we should have that ... if we're talking about the things people are doing now, and the 90% use case today, our considerations totally change and we should do the simpler thing ...
a general purpose language has generally useful features, and that is without a doubt a generally useful feature ... a language focused on the web though just needs to deal with the problem people have right now and on the web ... doesn't need to care about the general case at all ...
I'm not sure I see the connection with accessors and being a web-focused language. Not that I don't otherwise agree with you – PHP's home is the web, though that's slowly changing I think. I hope to make cli more than a way to run your phpunit tests.
web focused equates to focusing on the problem people have today, on the web, and that problem is most elegantly solved by keywords, the complexity the accessors feature brings seems superflous because we're just wanting to solve the problem people have today ...
if we're really thinking about being general purpose, then the things people do on the web (or today, in other words) are less important, our considerations change - is this a useful feature generally becomes the question, not does this solve the one problem we have today ...
04:40
Now I see what you meant. I too think I'd prefer a public-read, private-write keyword based approach.
I haven't really decided and didn't finish reading, it was just an example to illustrate that the web use case is deeply ingrained in our thinking ... I'm not really sure how to think anymore, it's possible that thinking about the general use case is even harmful if what we're really doing is focusing on the web ...
I haven't read the entire RFC myself either.
So I too haven't really decided.
I got about halfway, then decided to read the patch, and was pleasantly surprised, and now it's been a couple of days and I'll have to start over reading the rfc ...
I don't think general-purpose features can be harmful so long as they don't make the language more difficult to use for the web.
I operate on the assumption that on average, features added will be used ... so come five years time, the average code you see is going to use the features we have, on average .... so it's not enough to say that new features can be ignored or not used if the average (new) programmer in 5 years time will see that feature being used ...
04:54
Group use declarations left the chat
if it exists, it makes the language more complex ... for whatever use, web or not ... it's just that on the web, I don't know that we need that complexity ... but if I'm reading a general purpose code base, I don't so much care about that complexity, it probably doesn't even rank as complex in the general purpose code base ...
the most complicated thing you are doing in a web app, is a web app ... the most complicated thing you are doing in general, is almost without limit ...
I hope PHP finds its way outside of a web server module more frequently in the near future. Frameworks like Amp will help bring it there. Amp is still web-focused, but at least it's a different model.
I should head to bed. Interesting thoughts @Joe. Night o/
 
2 hours later…
06:47
Incident with GitHub Packages
07:33
All issues have been resolved!
08:26
@cmb Looks like the firebird payload test results in a leak report: dev.azure.com/phpazuredevops/PHP/_build/…
dunno if that's a problem with firebird or on our side
@ramsey You've just made it your personal responsibility to add tests for uncovered parts of the Ristretto255 API. Preferably also check all error conditions.
Our spam problems are becoming really bad. Just deleted something like 20 comments :/
08:48
@NikiC is that on bugsnet, or on web ?
@JoeWatkins bugsnet
what did you think of running github issues and bugsnet in readonly on a trial basis ?
I think comments ought to be removed from php-web, now that docs are on github, if anyone has anything actually useful to say that people need to hear on that page, they can open a PR ... 14 year old comments about how things work are just not useful
09:10
@JoeWatkins I don't think we'd want to do anything on a trial basis. Either we switch or we don't...
One annoying thing is that github doesn't have security issues
So we'd probably have to keep bugsnet around just for that :/
yeah trial was not exactly the right word, what I really meant was, make the move without doing the initial import/migration of data ... then after X weeks/months we either have to be ready to do an import, or call it a trial that didn't really work ...
the sec thing is still a pain ...but maybe that could be replaced with a responsible disclosure form at some time in the future ?
 
1 hour later…
10:22
@NikiC does bugsnet integrate with a spam check api such as akismet already?
cmb
cmb
10:46
@NikiC I cannot reproduce locally; guess I need an ASAN build. I'll try that.
cmb
cmb
10:57
@beberlei that would be NIH ;)
I suspected this already last night but was too tired. the keys would never match so no changes detected.
11:23
morning o/
11:36
Morning
\o
12:11
Missing arginfo ・ imagick ・ #81020
Seg fault while calling closure from Reflection ・ Reflection related ・ #81021
13:02
@hakre grumble grumble ...
Guys I do not remember, what means the '@' before a function call, like this
>new \DateTime("@".time());
I think it signifies a unix timestamp
test
well that's lovely
// Using a UNIX timestamp.  Notice the result is in the UTC time zone.
$date = new DateTime('@946684800');
echo $date->format('Y-m-d H:i:sP') . "\n";
@Tiffany :+1
if I try using ctrl+k or fixed font, message appears like it will send, but nothing appears in chat
reload the page?
(hard reload)
messages are submitted via a basic ajax post, they aren't considered "sent" until they are received back from the server via websocket
but they should appear in the chat DOM as soon as you press enter, so if it's not working it sounds like a client-side error
13:15
Does anyone know if PDO_DBLIB is still used?
It seems to me like it should be unboundled.
isn't that how you access SQL server from... some platform or other I forget?
like I think it's the only binding on a certain platform that people do actually use, I think this has come up before, though I may be misremembering
cmb
cmb
there was a maintainer for pdo_dblib few years ago, but Adam is barely active currently
pdo_sqlsrv is available for Linux for years
I think it would make more sense to ask Microsoft to officially bundle pdo_sqlsrv
We could switch one for the other
Especially, now that MS doesn't officially support PHP
13:23
last time I looked it was several point releases behind in terms of compat
like 7.2 or something
(sqlsrv I mean)
5.9 seems to support PHP 8
yeah, was just about to link that
ah sweet
those drivers were created when the old mssql ones were dropped from 7.0
yeh, I have actually never used it either so I don't really have any valid opinions about it
13:29
my day job involves PHP + SQL Server
switching out our ancient integration with ext/mssql was a big blocker for running on PHP 7
I would like to remove native_type from getColumnMeta and it seems sqlsrv has it implemented as always "string"
why do you want to remove it?
It's a mess
It doesn't seem to be useful in any driver
as in, just incorrectly implemented?
pretty much
there never was any func. spec. so people implemented it however they wanted
now users complain about incorrect values
we can't fix any bugs until we are clear what this function should return
pdo_sqlsrv seems to be written in C++ so we can't bundle it
13:37
on the face of it, native_type seems like it should be really straight-forward
why?
just return string all the time?
well, no, return whatever type of zval you're creating
but you don't know that in meta data
why not? I'm pretty sure the postgres driver returns native booleans for a boolean column, for instance
until you fetch the data you don't have any ZVALs
13:38
until you fetch something, you don't have any metadata
you have the meta data as soon as you execute the query
right, at which point you know what conversions you're going to apply when you read it
besides, the type of ZVAL does not represent the type of the column
so you can't get native_type from ZVAL
it's just not possible, believe me I tried it
I guess that's the nuance I'm missing: are drivers picking different types for different values in the same column or something?
yes
nullable columns for example
if someone needs it, they can always use gettype in PHP
it makes more sense then doing this in getColumnMeta
13:43
I don't get it
sure, 'int' would technically mean int|null
but if the SQL result column is of type Int, you can know that in the metadata
you don't need to examine zvals
database INT does not match PHP int
signed/unsigned
it's not about what "matches", it's about what the driver is going to return
if the driver is going to return PHP integers, it can say so, surely?
unless, as I say, it will dynamically return different types for different values, beyond having nulls in a nullable column
It will dynamically decide the type based on the values
you can't say beforehand if the values in the column will always be of specific type
so, if you're running on a 32-bit PHP, a column with a native_type of 'int' might have some string values in due to overflow
that feels like a pretty rare edge case to scrap the feature over
when would that feature ever be useful?
bare in mind, so far only pdo_sqlite has it implemented, and still not 100% correct
cmb
cmb
13:57
sqlite3 doesn't have column types (only type affinity)
and yet the code Dharman just linked switches on sqlite3_column_type
so the type of PHP variable returned does in fact depend on column metadata
sqlite has column type, but it's not strict
except for the 32-bit overflow edge case
as described in the manual, 'native_type' seems a reasonable feature: "The PHP native type used to represent the column value."; but if it's not actually implemented that way, then sure, maybe no-one will miss it
is 'pdo_type' implemented any more consistently?
that one actually feels less useful to me, since it maps to neither PHP types nor SQL native types
Yeah, pdo_type is implemented much better
I also feel similarly about pdo_type but since it is not that messy lets leave it
decl_type is implemented however you want it to...
but apparently some people find it useful
yeah, that one I've actually used
14:06
out of curiosity, for what exactly?
handling "Money" columns
one sec, let me find the code
			// Values of type Money are always returned as string (to avoid loss of precision)
			//  but the previous driver we used returned them as float, leading to migration problems
			if ($this->convertMoneyToFloat && ($columnInfo['sqlsrv:decl_type'] ?? 'unknown') === 'money') {
				$transforms[$columnInfo['name']] = fn($value) => is_null($value) ? null : (float)$value;
			}
uhmm, money as float?
doesn't this defeat the purpose?
as the comment says, that's what the old code is expecting
legacy code is my life
@Dharman We can, INTL is also C++
ok, wow
14:10
also, money as string is pretty useless if you're doing any maths
so if it was a shiny new code base, and you wanted to have some kind of fixed-precision maths, you'd need basically the same code anyway
you could do the same thing to get DateTimeImmutable objects for relevant column types, for instance
What happened to PHP 8.0.4?
Did we tag it wrong or was something else going on?
is that the one that got skipped because of the security issues?
^That
Ah
I can imagine using native_type (if it was reliable) to dynamically declare property types or something
I can't actually think of how pdo_type would be useful
for cases like 64-bit in on 32-bit PHP, you could maybe return 'int|string'
14:25
gmp?
for Money? yeah, that would be an option
well for anything that doesn't fit platform native precision
insert mom joke
capital
oh, I see; yeah, but drivers aren't going to rely on that being available
14:28
hows gmp support on windows?
if PDO were made a bit richer / more opinionated, it could be a generic option, but in practice it would be a per-driver option, or a per-driver user transform based on decl_type like the one I pasted above
I'm thinking maybe it could be an always enabled extension, it may be generally useful to be able to rely on it ... not sure how it works on windows ... decimal is nice, but I haven't seen rudi around for ages ...
@JoeWatkins complete, I beleive
@Ekin gmp is already bundled tho
"bundled" means very little
14:31
not when talking about coupling bits of other "bundled" things
though yes it means very little in practice
I'm not sure quite what it would look like, but I think it would be more useful to users if there was a "baseline package" of extensions that pretty much everyone used
What's happening here? I'd expect the $amount to also be required, because the "= null" is before other required parameters, traditionally making it required as well. 3v4l.org/MOecm
I get the same result even without the promoted properties.
@IMSoP and/or a way to sanely distribute them via composer would (imho) also be acceptable
2 days ago, by Girgias
@Ekin I think it's because a null default marks the parameter as nullable, thus bypasses the optional deprecation warning
cmb
cmb
@JoeWatkins we can't make GMP mandatory, because it needs an external lib; BCMath would be possible, but it's rather limited and bad performance wise. See also wiki.php.net/rfc/bigint
14:35
ah yeh ofc it will be GPL
@DaveRandom BTW it's Pieter here as I had to give up my laptop. But I proper package system for extensions would be sweet (and I think hard)
@DaveRandom well, that's the other half of the equation; I was thinking of being able to say "apt install php-baseline" and just get all the obvious bits
ah right I see yeh that would be good
so rather than the slightly vague concept of "bundled", have a list of extensions which you can disable, but probably shouldn't
@OndřejMirtes It's a bug in named params implementation
or in function compilation, depending on your perspective
14:43
a composer or composer-like installation would be great for some extensions; but OS package managers are always going to have a broader set, because they can configure all the run-time dependencies
I'm a bit afraid of fixing it, as I think some people decided that it's a feature
e.g. the sqlsrv extension is useless without ODBC
the old mssql extension was similarly useless without FreeTDS
@NikiC it's surprising, I think fix it and see if people complain ...
changing amount to non null raises (the correct?) deprecation notices
not sure why null is a special case?
@IMSoP relying on stuff in an extension that isn't in core is problematic, load order becomes a problem ... stuff that we want (even optional) core extensions to rely on really has to be always enabled (static) ...
15:03
@JoeWatkins yeah, I think a meaningful split would be "always enabled" (can reference each other at the C level), "common baseline" (userland projects can generally rely on them being there), and "everything else on the internet"
at the moment, the only thing "bundled" really means is "will compile and pass tests against new tags"
well yeah, but we can't control that, we can only decide to always link something ... I think composer installing extensions is a kind of pipe dream, it's not really going to happen - it's been years and years in the making and stalled just after it got started ...
Ok, here is what I propose github.com/php/php-src/pull/6930
pecl will have to eventually die a fiery death ... I actually think we might be able to bundle an extension builder/installer into cli ... that's one of the things the command line interface of php should be capable of ...
was about to say the same: have a standard tool for building an extension from source, but don't worry about fetching, versioning, dependency resolution, etc
do you think people would be more accepting of installing extensions if it was done by cli, didn't rely on pear/pecl, and didn't require anything additional to be installed (other than the toolchain you obviously need) ?
15:11
yes
I cant' really tell, I don't know why people are scared of extensions in the first place
I still have no idea how to use PECL extensions on Windows
@JoeWatkins probably scared of having to install and keep it up to date - and especially with the disconnect there sometimes is between sysadmins and devs
@Dharman Just download the dll?
15:13
@NikiC What are the conditions of this bug? I need to interpret it in PHPStan same way PHP interprets it.
anyone scared to install from source will probably look for a .deb or .rpm (or, rather, a PPA or whatever-centos-calls-them)
@bwoebi updates are a good point, if we distributed some init dot/system d scripts we could maybe manage that ...
@JoeWatkins I gave you my reasons a while back
@Ekin I forgot them
if something goes wrong you are screwed (no easy way to debug) and you just have to hope it will stay maintained
It's PeeHaa btw :)
15:16
isn't that true of php itself ?
Yes but it is worst for extensions
it looks exactly the same
Mostly talking about non core or certain less maintained extensions
the main reason I would avoid using PECL is to reduce the number of different package managers trying to manage things
less than perfectly maintained code in a language you're not able to debug is a problem whatever ... I don't know how to solve that ... some things have to be an extension, and no matter how fast php gets that will always be true ... it's incapable of doing the kind of state management that so very many libraries we want to interact with require ...
not to mention the only way we have to interact with those libraries is absolutely terrible ...
15:20
if I update PHP with apt/yum, I want it to update extensions - or refuse to update until they're available; if I can't do that, downloading off github and running a build script is just as easy as "pecl install" anyway
I do see why don't get me wrong. But I also see the issues frm the other side
I find it hard to accept that you are PeeHaa ...
imagine the words are slurred
curl https://github.com/whatever/whatever.zip; unzip whatever.zip; php-ext-build -i whatever/
@JoeWatkins :P
15:22
which is basically what apxs offers for apache modules
@IMSoP I dunno how we do that
which bit? the apt/yum bit is already done, mostly by Ondrej and Remi, otherwise by the authors of extensions
I don't think I've ever seen a custom PECL repo (is that even a thing?) but plenty of "add this to your apt sources.list to download our Ubuntu binaries"
I got lost because PeeHaa who is actually @Ekin is fucking with me too much ...
:)
okay, how is something like apxs2 different from pecl, and how are both of those things different from cli doing the install ... in other words, what is the advantage you see of an apxs2 like tool, or cli having support for doing something like that ?
15:34
apxs doesn't do any package management; it's basically a custom "make" command
people that want binaries will already be using a third-party tool like apt, or yum, or some Windows LAMP stack; people that are willing to compile from source won't blink at downloading a tar.gz file
so cli having support, is only useful to you in the case that we manage updates ?
I think what you're calling "cli having support" is the same as what I'm calling "something like apxs"
and I think that would be useful
no I'm trying to determine what level of support we actually need, is the feature only useful if we manage updates ?
I don't think so, no; handling updates implies a whole bunch of network, and signing, and dependency resolution
which apt/yum do just fine
the build tool would be for the cases where there isn't a nice way to do all that
sorry, not sure that made it any clearer
ah now I see, you're suggesting that the thing doesn't take care of downloading anything, it just builds the source you point it at ...
15:40
precisely
I guess like the old days when people would put a .rpm file online, and you'd just run "rpm install foo.rpm"
maybe other people wouldn't agree, but for me PECL exists in this awkward in-between space, where it acts like a package manager, but doesn't know about 99% of the packages on my system
I was thinking something a little more feature-full, I was thinking we allow you to point it at a uri (git/pecl [until death]), and we provide some way of updating, pointing it at local source would also work ... I mean we're still in PHP while all this is going on, so it's not like networking and verifying signatures is a problem (haven't actually done signature verification, but sure it's not a problem) ...
it's the server end that's tricky; what does "update" mean if you're just pointing at a git repo?
additionally we could distribute systemd/init.d stuff that executes php -m --update or whatever to update everything that it built, if they're available ...
@IMSoP fetching the latest sources, building, and determining if the version number is different to the thing you have installed ... alternatively to building we could scan for a version ... extensions are versioned ...
ah
this can't really work can it ...
what's "latest"? default branch? semver tag? where do you record the compatible PHP versions? when do external dependencies get checked? etc
I mean if you use git://thing/thing/tags/vX.X.X you don't get updated source, if you use master, you get a broken install maybe
yeah I just saw it
@IMSoP I mean if we can build an extension, we can look at the extension struct to determine deps, and if we can build it, we know it's compatible with the current version ...
it's going to break many things whatever ...
15:52
@OndřejMirtes PHP should be treating optional-before-required parameters exactly the same as required parameters
@JoeWatkins sure, but maybe there's a different branch that is compatible, you just don't know to look for it; that's where pecl.php.net and packagist.org come in, aggregating the metadata
which is why the dream was to have pickle integrate into composer, because then you piggy-back off packagist.org for that side of things
but if you're looking for an MVP, just installing from a local tar ball is probably it
yeah but it stalled, and pecl is becoming more and more stale, we need to switch it off and we have no alternatives at all ...
right; so let's get that MVP sorted
you can do that in a few lines of bash though ...
then bundle those few lines of bash :P
15:59
@DaveRandom feel like I'm making good progress on github.com/labrador-kennel/async-unit. It has something resembling documentation docs.labrador-kennel.io/asyncunit and most of the core functionality is there. Probably have the stuff marked for 0.4 release finished tonight or tomorrow
I guess the question is: who is the target audience?
As the producer of at least two pecl extensions in the top ten, with download stats of more than half a million downloads per month, I will be quite displeased if that "experience" gets degraded in any sort of form.
@NikiC I don't get what I'm doing wrong for what it seems some completely irrelated tests to hang: github.com/php/php-src/pull/5829 any idea?
@Derick are there any kind of stats of what platforms those are on? I'm curious of when users would choose PECL over other packaging systems
@Derick sure ... but we can't ignore the fact that the floor is falling away from pecl, it's not sustainable and hasn't been for a long time ...
16:10
@IMSoP No idea, but literally all OSX users need to use "pecl install xdebug" now, and I bet a load of these are all built into CI systems too.
@JoeWatkins [citation required]
we deprecated pear, do I remember wrong ?
Yes, and I also think that was a dick move.
but we did though ... and it follows that it eventually has to die ...
pecl is the only tool to download and install php extensions, and unless there is a (better) alternative, it should stay as it is.
Since the help script was taken out of docker, I clone them from git
16:12
@Derick my suggestion was just that we provide another way, built into cli (maybe) ... but we do seem to need another way
@NikiC Should I open a bug about this so that it's tracked?
pear was deprecated because of the libraries, which are most definitely old. PHP extensions are not. I'd go as far to say that they are extremely important for the PHP ecosystem.
PECL also builds the Windows DLL automatically
@Derick ah, yes, I don't know much about the MacOS world
yeah of course, I'm not saying we do away with anything, just move what we had in pecl into a thing people can use
16:13
@JoeWatkins By all means I'm for a better way, and it being in CLI makes sense, perhaps.
@Girgias Yes, but I don't think these are really used as much. I should check the download stats for the ones I distribute for WIndows.
nobody has the build env on windows, I think it's mostly binary installs there ...
almost exclusively the binary installs
Maybe, at least for CSV it's the only way to get the Windows version :D
Yes, but my pondering is whether people download these from pecl.php.net or xdebug.org/download
@MarkR How do you handle download the latest stable with just "git clone"?
there's also a lot of third-party "WAMP stack" tools, not sure if those rely on the PECL binaries or just build and distribute their own
16:16
@MarkR Any success with the packagist people and the autoload classmap yet btw?
I don't know how windows is really used, when I've suggested that nobody really deploys using windows in the past, people snap at me ... but I've not seen a windows deployment since maybe php4 ..
@Derick I pull by tag usually, and no, I need to try and drag through the swamp of comment spam in the ML first
@JoeWatkins Considering that I see a lot more people asking about PHP/Xdbeug on Windows than on OSX/Linux, I'm pretty sure there is a large group of people that use it; at least for development
@JoeWatkins Until 18 months ago I ran almost exclusively on Windows
@MarkR So if you pull by tag, you won't get the latest stable that has bugs fixed..
16:17
oh yeah, I accept that ... begrudgingly ...
@Derick Hence the tags needing updating, this is really no different than say composer
now, if pecl was built into the cli, then "php pecl install x" - could quite as well work on windows, where it downloads the right binary. I don't think pecl handles that now on windows at all.
@MarkR On composer you can set version ranges.. xdebug:^3.0 etc...
@Derick Yes but the lock file pins it to a particular version, you have to manually trigger an update to get the latest ones.
(you can't do that with currentl pecl either, of course, it always picks the latest if it doesn't match the php version requirements)
sudo apt install php-xdebug - I bet there are orders of magnitude more people running that than PECL
16:19
If someone wanted to publish a file that included a git path to the latest version of every package, i'd use it.
@IMSoP For sure, I'd be shocked if OS package manager's didn't have a 100 : 1 install advantage, maybe even 250 : 1
@Derick without wanting to cast aspersions on windows users, that might have something to do with the fact your average nix/osx user is ... better ...
@MarkR Sadly they lack behind. Very few package managers have Xdebug 3 :-/
@MarkR That "file with links" is pretty much the only useful thing that pecl.php.net does
I suppose there's not a great deal of difference between pulling down the latest tarball vs cloning it... just the extra unpack step
@Derick most official distros don't ship the latest PHP anyway, but anyone wanting to be up to date can use Ondrej and Remi's repos, which I believe both have XDebug 3
wanting a super-stable PHP but a compiled-from-source extension seems an edge case, on those platforms at least
I suspect the main target audience for PECL these days is platforms without that availability of native packages - Windows and Mac, maybe some less popular Linux distros
since we were talking about it earlier, the Microsoft sqlsrv extension has official binary repositories for Windows, Ubuntu, Centos, and SUSE; and I think that's a fairly common way to distribute things these days
16:47
@IMSoP a combined download of 800 000 a month of PECL and timezonedb disagrees with you
cmb
cmb
@JoeWatkins you can just download a zip with the binaries, unzip and run
XAMPP and others use these binaries
I guess PECL is really several things: a build script for building extensions from source; a metadata service for fetching package updates; and a build service for Windows binaries
17:06
@Derick Download stats are confused A.F. in recent years thanks to CI/CD.
 
1 hour later…
18:12
@CharlesSprayberry ooh shiny
18:23
This is also funny - xml_set_element_handler() says it accepts callables but it also accepts strings that aren't callables when xml_set_object() is called beforehand - the passed strings can be method objects, although normally callable strings can be global functions only.
@DaveRandom Yea, I've been pretty excited about the progress I've been able to make. Still have quite a ways to go but at this point it feels more like polishing stuff or adding "bells and whistles"... though some of the bells or whistles are just expected from a testing framework (like expecting an exception to happen)
Have an idea for you being able to do something like #[Mock] private MockableType $mock; and the testing framework will inject a mock object with your mocking library of choice
Still have to work out the details though
18:41
Smithgtw ・ *General Issues ・ #81022
So I have a class that abstracts API calls to an external REST endpoint. I want to make sure it works with the API, so I have mocked the response from the API and wrote the tests. However, I also want to verify that the actual API (which is running in a sandboxed qa environment) works with the code. Should I be writing a separate set of tests for it?
@twodee I guess that depends on how much coverage you want and if you think the mocked response is going to deviate from the real response. If the API is pretty stable and you don't expect to change that should be fine.
If the API is still changing a lot your mocked response may become outdated
@CharlesSprayberry Right, that's what I am worried about. Even though my tests will keep passing, I wouldn't actually know something has broken until it actual breaks :/
To deal with this problem in the past I used a library that would cache the first response received from the external API and then reuse that for subsequent tests.
Ultimately you still have the same problem but it is a little easier to handle... if you wanna test against the real service just destroy the saved response
However, this is a tricky problem.
You might like https://github.com/php-http/vcr-plugin
That way, mocks are saved automatically and you can test the actual API by removing the recordings.
18:46
^ this
If you just tested against the service directly for every single test you're likely to see your tests randomly failing when the third party dependency is suffering outages or is down for some reason.
Tests that fail randomly or on some environments but not others are especially hard to track down and probably indicative of some other problem within the tests, the code it is testing, or both.
The caching library seems like a good approach to start with. That would save me the trouble of writing two sets of tests.
Yea, from what I've seen testing this kind of thing it seems to be the "best practice"
Or at least the one with the least amount of friction
It would be interesting if there were a way to safely and securely allow dl() and then use Composer to require extensions that are compiled when the post-package-install and post-package-update events fire and included in the autoloader with dl().
19:04
@NikiC I guess I did the wrong thing by putting this into PHP-8.0? github.com/php/php-src/commit/…
Is it an ABI break because of the changes to php_globals.h?
@CharlesSprayberry so about the vcr library, does it automatically invalidate the cache or do I have to manually do that every once in a while?
I would expect you to have to manually do it but I suppose that depends on the library you use
19:38
@VeeWee thanks for the reminder on php-http.
 
1 hour later…
cmb
cmb
21:00
@ramsey yes (changes struct member offsets)
@cmb Makes sense. But we should be able to apply all the other changes, though, right?
cmb
cmb
In theory, but why bother?
to remove it from the tests and ini files
cmb
cmb
@ramsey ah, that looks reasonable
The revert gets rid of all the changes, including the NEWS and UPGRADING changes. Should I reapply all the changes, except those made to php_globals.h, or is the goal of the revert to kick it all out and not apply any of it?
cmb
cmb
21:23
@ramsey maybe do a PR?
It was a PR :P
cmb
cmb
@OndřejMirtes not really funny; actuakky embarrassing that we still have that API
Anyway, it's reverted now, so I'll leave it reverted.
cmb
cmb
@ramsey I know; I meant to make another PR for PHP 8 :)
I was just trying to understand what I did wrong so I could avoid that next time. :-)
cmb
cmb
21:34
The .h change was an ABI break; the .c change won't work without it. Removing the setting from PHPTs is fine, but at least one PHPT has another change. The changes to UPGRADING and the ini files would not be correct (setting is not removed, but rather doesn't have any effect).
Gotcha. Thanks!
+ missing upwards merge, though that's unrelated
01:00 - 22:0022:00 - 00:00

« first day (3857 days earlier)      last day (1313 days later) »