![](https://media.phpc.social/accounts/avatars/000/000/948/original/b2c0fbf19043d758.jpg)
2024-04-24 22:37:45
Ha! I forgot, I did once do an article version of my #PHP arrays talk for php[architect].
https://www.phparch.com/article/never-use-arrays/
Subscribers can get it from the…
Ha! I forgot, I did once do an article version of my #PHP arrays talk for php[architect].
https://www.phparch.com/article/never-use-arrays/
Subscribers can get it from the…
Hey #PHP. When you use union and intersection types, do you include spaces?
(RT for reach, etc. This is survey data for @…. If you know of any official policies by major projects already, please note/link in the replies.)
"PHP has thrived in anarchy for 25 years" - @… #phptek
"My name is Elizabeth Smith. I've been programming in PHP since *mumble*"
- @… starting off her Modern SQL #phptek talk
"My name is Elizabeth Smith. I've been programming in PHP since *mumble*"
- @… starting off her Modern SQL #phptek talk
Been having problems with 2 local #PHP projects on my Mac closing the connection when using PHP-FPM. Finally after almost 1 year (since Sonoma apparently) I found the solution:
https://<…
Advanced PHPUnit Data Provider shenanigans. #PHP
Part 1: https://peakd.com/hive-168588/@crell/fun-with-phpunit-data-providers
Part 2:
Classes are not a tool for code organization.
They're a tool for problem/business definition.
Using them as an organization tool is how you get 10,000 line trainwrecks.
#PHP #Programming
Updating (#PHP) packages to @… Promise v3, and test your types with @…:
Does anyone have a trick to getting the #PHP oci8 plugin working on an m1 machine? I spent hours yesterday trying to get the damn thing working.
Speaking of cutovers, planning on merging the PHP 8.2 upgrade PR for Joind.in's API over lunch today. That PR also includes a *lot* of type enforcement that wasn't there before, so I expect stuff to break. Plan is to have things fixed by the time folks want to throw #phptek feedback in for the last session of the day.
Want to help triage/clean up? Find me at the conference, or hop in Sl…
Now @… talks about PHP types, all the way down to its implementation in the PHP engine.
#neoscon24 #php
Why on earth do we still have to deal with nonsense error codes like 500 if it comes to php? in all other scripting languages i get strack traces, error messages and what not. not so in #php you got sh*t. Happily searching hours if it is the #webserver the fpm, the application or sth else nobo…
Preparing a talk „from url in browser to first byte“ in context of #php.
What little, not obvious things, do you think are a good addition?
Like: a correct time is important for proper encryption
I do have trouble with modern language, so many things have changed. For example, when I was a young man, a "minor number release N" meant "no breaking changes for minor-versions less than N" (I'm looking at you #PHP! Oh, yes, #Java and #Ruby too, though I'm sure you're nothing special among your peers)
A #PHP filter to prepend `Hello world!` to `/etc/passwd`, source https://www.ambionics.io/blog/iconv-cve-2024-2961-p1
Using #PHP arrays as pseudo-objects is almost never the right answer. They're less self-documenting, slower, worse on memory, and more bug prone.
https://peakd.com/php/@crell/php-use-a
Reimagining how to deploy my #PHP applications to #Kubernetes. Turn between #Helm sub chart and Operator style. Requirements:
* A way to pick up configuration from the code (cronjo…
I have a #PHP cli script which looks like this:
->run($argv[1], $argv[2]);
the 2nd parameter is optional and has a default value. Is there a way to not pass $argv[2] if it is not present to not run into
run(): Argument #2 ($path) must be of type string, null given
Or do I need to test this and have two different calls?
Bypassing #PHP visibility controls. Please don't do this often.
https://peakd.com/hive-168588/@crell/php-tricks-access-control-bypass
Best addition to any #Node package.json, #PHP composer.json or other dependency managers file would be a mandatory „why“ field for each single dependency which requires a minimum number of sensible words.
Could make devs think twice before adding and help (me) when upgrading projects after some time.
<…
I have a #PHP cli script which looks like this:
->run($argv[1], $argv[2]);
the 2nd parameter is optional and has a default value. Is there a way to not pass $argv[2] if it is not present to not run into
run(): Argument #2 ($path) must be of type string, null given
Or do I need to test this and have two different calls?
This 247 line #PHP file runs perfectly fine without all the code style fixes. It looks like shit, it is a hot mess to read and understand. But it works perfectly fine, and it wasn't weird considering how old and niche it is:
P.S. This isn't the updated file I found while googling the function name 😉
I have a #PHP cli script which looks like this:
->run($argv[1], $argv[2]);
the 2nd parameter is optional and has a default value. Is there a way to not pass $argv[2] if it is not present to not run into
run(): Argument #2 ($path) must be of type string, null given
Or do I need to test this and have two different calls?
Generate Code Coverage in #PHP #Laravel With PCOV
https://laravel-news.com/generate-code
The interview I did on Crell/#Serde is now available in German!
#PHP
Doing some #PHP package maintenance tonight, this dev dependency bump kinda stood out 😅 . Mainly I make sure my packages work on the latest #PHP versions, either through support requests or when I run into issues myself. Most of my packages are designed with the future in mind.
The long-term plan is to get reusable workflows for every package and #Renovate to open PR's more aggressively than #dDpendabot to uncover potential future issues. Currently rolling that out with every package I
Disabling Composer's default timeout inside of scripts
https://ryangjchandler.co.uk/posts/disabling-composers-default-timeout-inside-of-scripts
On the 27th of June, we will be hosting our June meetup.
If you would like to attend, please sign up using the following link: https://www.meetup.com/phpug-rhein-neckar/events/298184732/
jolicode/automapper: :rocket: Very FAST #PHP AutoMapper with on the fly code generation
The AutoMapper solves a simple problem: removing all the code you need to map one object to another.
https://github.com/jolicode/automapp…
On the 27th of June, we will be hosting our June meetup.
If you would like to attend, please sign up using the following link: https://www.meetup.com/phpug-rhein-neckar/events/298184732/
Access and modify JSON-based data objects while enforcing JSON Schema
#php
Kinda forgot how much fun it was to write code stitching map tiles together, and also how easy it was. Currently at 82 lines of #PHP. Once finished it will be a new package, as the #golang has some massive glaring bug in it that took me 6 years to find. Sprinkling some threads and #AMQP over this once it's done. The home clusters fans will sing once more
I ended up with this adding some #PHP to the one liner:
If you use #Tukio in your #PHP application for #PSR14 #EventDispatcher support, version 2 is nearly ready! It should be…
The things I write in my (#PHP) package documentation: And, well, not ship a package without being fully functional 😅.
Heading back ORD-AUS soon. Thanks to everyone who organized, sponsored, spoke at, or attended #phptek! It's great to see the in-person community growing again, including a bunch of new faces to the PHP conference scene, plus another bunch of folks who I haven't seen in awhile.
Let's do this again soon!
Ryan and Leanna are the kind of wonderful people we all aspire to be. If there was ever someone who didn't deserve this, it's them.
Please help if you can, #PHP.
https://gofund.me/c283d28a
…
And yet again, using Docker (via Lando) plus XDebug PHPStorm = things just don't bloody work, despite all the settings being correct.
I really wish this were not such a regular occurrence. I don't even know which tool to blame.
#PHP
Using #PSR-3 placeholders properly in #PHP (and other awesome alliterations).
https://peakd.com/hive-168588/@…
This is a legit clever way to test a zillion closely-related test cases. And not just for regexes as shown here.
#PHP
Had fun this weekend working on a performance focussed proof of concept using Bunny in the #PHP #queue interop contracts. The first metrics are in using the #RabbitMQ cluster on my #Raspberrypi #Kubernetes home cluster. (Which isn't meant for high performance. Still pleased by these numbers.)
This app is written in a language with a very strong and powerful type system, and is going out of its way to not use it. *cries*
#Kotlin #PHP #ProbablyOtherLanguagesToo
#PHP from 2014 to 2024:
This language is pretty sweet, NGL.
https://www.youtube.com/watch?v=p_6ewdiwnRo
Null is problematic, but why? Let's see why, and let that guide us to new alternatives. #PHP
https://peakd.com/hive-168588/@crell/much-ado-about-null
How adding Type Declarations makes Your Code Dangerous
#php
ICYMI, I spoke with Brent Roose about the new property hooks feature coming to #PHP 8.4, the RFC process, and how we can make it better.
https://www.youtube.com/live/ULUrhIrjyAg
Only use inheritance when you want *both* hierarchical code reuse *and* subtype polymorphism.
#PHP article from a decade ago: