@TimWolla The irony of the PHP License being so bad, that it turns out to be too scary to fork, which turns out to be a really useful property of an open-source project, is beyond irony.
I want to revise that, but can't think of the right word right now. "don't be a jerk" is ambiguous in the sense of the person on the other end... and there are thresholds for different people/cultures... but like, if called out on being a jerk by an RO, an apology is a good idea, and not continuing the behavior that was called out is also a good idea
this is a big issue, especially as RC1 should have final API/ABI
and also would have be better to also break API, ex removing/renaming foo->std.handlers so it cannot be set, and thus break the build of ext not using the "new" way
@bwoebi Don't quote me on that but I think the assumption is that RC1 should be ABI stables so all extensions can make the necessary adjustments for GA
That change is specifically designed to not require a change to code - because yeah, otherwise, it'd really need fixes to all exts, which wouldn't be great
@cmb oh, this is ... ABI? I expected it by name to be something API related
@bwoebi It's actually both,, I think. An extension built against previous API_NO should not be loadable for newer API_NO. See also phpinternalsbook.com/php7/build_system/…
class Foo {
public function __construct(public int $bar, public string $foo) {}
}
$foo = new Foo(...['foo' => 'Fooo', 'bar' => 123]);
var_dump(
$foo,
new Foo(...(array)$foo),
new Foo(bar: 321, foo: 'fOOOO'),
);
This is simple example of intantiating a Foo class object using unpack arguments with their names
I can do that using array easily, but why do I need an object to cast to array before?
if my public property names match in my DTO's I could avoid repacking properties into arguments when their the only source of arguments, like create a command from all or just subset of event properties.
Does that make sense to simplify the instantiation of one based on second object?
I'm tring docker for the first time, php-fpm + nginx, But nginx complaint about "Connection refused while connecting to upstream, client, fastcgi://172.18.0.4:9000" (502 Bad Gataway)
can anyone give me hint ? ty!
Looks like this is php-fpm problem, But it listening in the app container rn, fpm is running, pid 118
@Danack I have nginx.conf file in ./docker/nginx/conf.d folder, I don't think this is a problem because the nginx accept new changes from this file i tested it
So, from 5pm (in 45 minutes) you will be able to walk along the Queen's coffin to pay your respects. As we all know the Brits like queuing, DCMS now has a YouTube stream with the queue length... and map: youtube.com/watch?v=9NpZuGxSgZY
@Shafizadeh Check the git reflog, then git reset --hard to the old state. Keep in mind that git reset --hard will remove all your local uncommited changes (and also all changes in commits you made after the commit you roll back to). If you are inexperienced with git, I recommend making a backup copy of the full directory (i.e. the entire working copy) in case something goes wrong.
@Mwthreex I'm reasonably sure the problem is that the default fastcgi_params file on that docker box doesn't appear to set fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
@Mwthreex so...I think it is due to the nginx + php boxes not agreeing on directory structure. You have your files mounted in /var/www/ on nginx and in /app on the PHP box.
btw, is this docker compose config from an example or you've written from scratch?
There's two things that seem a bit sub-optimal. First compiling pecl extensions from source is kind of slow. If you use Debian as the base box, you can install them as packages.
Also, you shouldn't need to copy the files in, so the lines:
COPY composer* .
COPY . .
may be redundant.....they also mean that Docker has to completely rebuild the images each time you do docker-compose up, as they can't be cached reliably. Either removing those lines, or at least moving them after all the extensions are installed should speed up the docker-compose time.
For the directory stuff, I'd pretty strongly recommend mounting the files in the same directory on all containers. Having to remember which container you are in to find stuff gets quite annoying.
The COPY composer* . you mentioned, I thought this is the right thing to do, It look into the composer.json if there was no change then it cache the layer right ?
I don't think it's smart enough to do that. I normally run docker-compose up --build and for me, if nothing has changed, that takes about 10 seconds as all the containers are cached. But your docker-compose config was recompiling extensions every time.
btw, putting all the container configs under a separate container directory e.g. is probably more sensible than having them distributed in different places in your project.
is there something i dont understand? it seems like the entire point of this comment is to basically criticize the contributors for occasionally having bugs in SPL?
Yes, and that nerging a bug fix in a patch release is bad
I'm really moving to the point of wanting to rewrite the whole IO layer of PHP just so I can get rid of this stupid piece of garbage which is called SPL]
Also "please write regression tests so the behaviour doesn't change"
Though I must admit that long-standing buggy behavior can be considered a "feature". It's similar to the ksort() bug that ultimately was reverted and the fix deferred to 8.2 (?).
@TimWolla I don't mind that it can be considered a feature. But if you are going to complain open a bug ticket ASAP instead of waiting for like 4 fucking months to whine about the behaviour
I get now why nobody likes touching SPL, the codebase is shit, and you try to fix it you get complaints that you fix the behaviour because it's been buggy for so long
Yeah, I totally get both sides here, because I've been on both sides myself. As a downstream consumer of PHP and as an upstream developer of an application where 3rd party developers rely on the API being stable.
The majority of users are likely using distro packaged PHP (which doesn't necessarily even get bug fixes at all) or something like deb.sury (which only packages the stable versions to my understanding). To even make use of the RCs you also would need to have the necessary automated testing infrastructure in place, which likely often isn't the case even if you use some testable framework.
So the devs who actually use the RCs are probably just going to fix their code to work around the behavior change and move on.
@Girgias This kind of communication will always exist, not just in development, but all facets of product development, policy changes, government, etc. I hate it myself sometimes when it comes up for other projects where there is an end-user. You have to chew up the meat and spit out the bones and get to whatever the focus is of the rant and decide whether it's important. Teaching people etiquette is a much more challenging problem. =P
But I get it... it doesn't make it any less aggravating.
@Girgias Well, you always have the choice: either fix the bug, so people can complain about the BC break; or don't fix the bug, so people can complain that the bug still has not been fixed. ;)
Re max_input_vars: did you know, that the limit is off by one? 1000 means that you get at most 1001 vars. See bugs.php.net/bug.php?id=60707. (maybe someone wants to fix that, causing a BC break)
i still need to reimplement my PR that has been in limbo for months
it seemed like the consensus was that i should make an RFC for it, but also that php-src has never required an RFC for this kind of thing before that only affects internals and extensions in a non-breaking way
so i was confused, and then i forgot about it because i was trying to figure out what to do for so long, lol
actually, if anyone could review the PR within the next few days, that would be excellent. I think it's been changed quite a bit from the last time anyone looked at it: github.com/php/php-src/pull/7973/files
the current PR doesn't cause any issues for existing extensions, so i think the 'Requires RFC' tag can be removed