That's "useful" to transform entities to model, handle some multi heritance before the traits or to call a private method for a similar object in a dependency.
@SuitedUpDev at least a method_exists() ... But this was rushed code for sure. Maybe even some fire and forget mentally of a freelancer on fixed budget. Trying to be smart and cutting some corners...
But that always will cost more in the end.
@gmazzap Ilija and I want to work on it and have a decent amount of design already done for it. No promise on timeline, but the rfc text for it and for pattern matching (which will be required) are already written. (The former needs some updates, of course.)
A friend was telling me about guidelines for developing and deploying new services in their company, and one of the guidelines is “new services must not use #PHP.”
I’m not making this up, and this isn’t hyperbole. They actually have this listed on their company documentation.
@ramsey Yeah 😞 Companies do one thing, very poorly, in a language early on and then decide to throw out the entire stack instead of addressing the elephant in the room.
It's like the only way they can justify putting effort into something is if they can make the case it's not worth the effort necessary to fix it incrementally.
This is why I decided to learn go last year. Not because I enjoy learning new programming languages (I do, it's just not the reason), but because I can make more with a year or two of go than nearly twenty years of PHP.
From my PoV (person that reads internals, follows/votes on RFCs, etc.), there are almost zero feature additions that make newer PHP versions interesting.
@SenseException I blame popular libraries and frameworks that are still array-based. (#Laravel and AWS-SDK at the top of that list. #Drupal, less than it used to be but still.) And people who cut their teeth on CodeIgnighter et al and never grew past that.
👋 We're hiring a Senior Software Engineer in Berlin or remote! 💻 Build high-quality supply chain tools for thousands of devs in the PHP ecosystem 🐘 with the makers of Composer.
We're a small experienced remote team, deeply caring about our customers and the quality of our product. 🧑🤝🧑 Help us maintain and improve key infrastructure for hundreds of businesses! 🎉
@MarkBaker@Skoop@packagist We already have someone working with us in the UK, and had someone in the Netherlands, I imagine in principle there'd be a way to still make this work via e.g. an EOR company in the respective location, so that shouldn't stop you!
Yesterday @jrf_nl gives a great talk about PHP_CodeSniffer ( @phpcs ) at #010php
She told us the importance of funding opensource projects and there is is not enough spoken about this. It was a critical warning that there are just a few people in the community where the hole #PHP community is depending on.
So lets talk more about how to support these great opensource projects.
PS 1Gotta admit that the point about the object systems in R is somewhat spot on
PS 2 #php gets a dishonorable mention
PS3 I will continue to find ways to continue using all 4 of the aforementioned languages, as they are all performant and deliver in complementary ways.
Do people want to know something particular about #php?
Be that internals, documentation, whatever insanity or pet peeve that goes through my mind (although that feels more like a regular podcast segment).
But I frankly wonder why I bother trying to improve the semantics of #PHP when it seems people don't give a fuck and just want crap not actually implemented in any sensible way, just so they can feel like they are working with a "real" programming.
It honestly tilts me that people want to make the language more inconsistent and shit just for some minor DX that one could achieve by building tooling in PHP.
But as always: Very vocal groups of people do not necessarily make up the majority. But the shit piled up by them makes one reconsider whether it's worth the sleepless nights.
I'd rather you could sleep at night! And I do value what you do for PHP! And that you try to make it a better language - at least for my definition of "better"
I have no idea what has been said or written nor where...
but in the end that is not important
Your work, and of all the #PHP core devs, is much appreciated, valued and respected by all the #PHP devs I know
Maybe part of the problem is that we don't show enough how thankful we are...
If we did, maybe you would feel less frustrated by some of the BS you're pointing at
The more I'm thinking about it, the more I consider it.
I want to add a map for my bicycle rides, but I can't find any good PHP maps. The PHP versions of Leaflet on GitHub are no good. They don't work at all. They just gives you errors like "can't load class" or something like that.
So even if I am against it only to challenge myself, I consider using Leaflet in JS for airikr.me/biking.
Or do you have any solution in PHP that works out of the box?
I'm getting #PHP process killed by #OOM killer lately and am not able to debug what and why is causing it, only thing i know at this moment is, that it seems to be related to #Friendica worker (no other webpages are running at my VPS.
Errors in friendica.log and httpd.log are repeated over and over again, I have tons of these.
httpd error log```
[Sun Jan 14 13:10:37.773690 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 506
[Sun Jan 14 13:10:37.773743 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 521
[Sun Jan 14 13:10:37.773791 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 539
[Sun Jan 14 13:10:37.773874 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 554
[Sun Jan 14 13:10:37.773940 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 798
[Sun Jan 14 13:10:37.773990 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 1103
[Sun Jan 14 13:10:37.774111 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 506
[Sun Jan 14 13:10:37.774182 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 521
[Sun Jan 14 13:10:37.774240 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 539
[Sun Jan 14 13:10:37.774291 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 554
[Sun Jan 14 13:10:37.774364 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 798
[Sun Jan 14 13:10:37.774418 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 1103
[Sun Jan 14 13:10:37.774531 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 506
[Sun Jan 14 13:10:37.774590 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 521
[Sun Jan 14 13:10:37.774642 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 539
[Sun Jan 14 13:10:37.774698 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 554
[Sun Jan 14 13:10:37.774762 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 798
[Sun Jan 14 13:10:37.774816 2024] [php:warn] [pid 511968] [client 54.36.148.124:44223] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 1103
[Sun Jan 14 13:12:50.905457 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.910537 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.912046 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.913249 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.913974 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.914188 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.914399 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.915173 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.915418 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:12:50.915886 2024] [php:warn] [pid 521020] [client 212.79.110.127:34280] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46, referer: https://schmaker.eu/network
[Sun Jan 14 13:13:05.621887 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/d0/de/3f/d0de3f3fd98d576056fb02f629b93c7eb0442beb_2.file.threaded_conversation.tpl.php on line 46
[Sun Jan 14 13:13:05.625511 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 506
[Sun Jan 14 13:13:05.625602 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 521
[Sun Jan 14 13:13:05.625659 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 539
[Sun Jan 14 13:13:05.625710 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 554
[Sun Jan 14 13:13:05.625798 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 798
[Sun Jan 14 13:13:05.625882 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 1103
[Sun Jan 14 13:13:05.626226 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 506
[Sun Jan 14 13:13:05.626284 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 521
[Sun Jan 14 13:13:05.626352 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 539
[Sun Jan 14 13:13:05.626403 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on null in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 554
[Sun Jan 14 13:13:05.626497 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 798
[Sun Jan 14 13:13:05.626575 2024] [php:warn] [pid 524293] [client 54.36.148.234:24797] PHP Warning: Trying to access array offset on false in /srv/http/schmaker.eu/view/smarty3/compiled/6b/a2/b2/6ba2b21ba8bb187d1debfb1cf902b2aee0e56569_2.file.wall_thread.tpl.php on line 1103
@roland So, just to close this case somehow - it seems like problem disappeared for now. Heaviest workers are sitting with max. 1-1,5GB RAM - I consider that normal when requests are limited to 1GB.
If it shows up again, I'll open bug report as that may be something harder to troubleshoot.
I'm pretty sure I've had this thought before, but in #PHP, is there no efficient native way to find the first element in an array for which a callback returns true?
array_filter() and array_reduce() both iterate over all elements instead of stopping at the first match. The only alternative I've found is to use a foreach loop that returns the first match it finds. I'd think this would be a common enough need to warrant a core function, though, no?
@wyri Thanks for putting that together, @lcobucci! This is pretty much exactly what I meant when I wrote “…when I've needed a spy I usually end up implementing it directly in the code.”
For all intents and purposes, I’d call this a spy. It’s sole purpose is to fulfill a contract and record how it’s called. I’ve occasionally shipped spy implementations alongside contracts to facilitate testing, but they usually end up in a Testing\ sub-namespace.
@beausimensen@lcobucci Yup that's exactly what I needed in this situation, a spy, a way to look into it to know if expected calls were made and not care about the rest.
Thinking back, over the years, I probably need a spy most of the time and ended up adding mock calls that I didn't needed/cared for.