kboyd boosted

Lots of talk about the plan to deprecate dynamic properties in PHP 8.2 and remove them (by default) in PHP 9.0, except when allowed by a special attribute.

It does seem burdensome to project maintainers. And if they are unable to muster the effort to upgrade their packages, it could hinder adoption of PHP 9. It could also harm community relations, with so many maintainers suffering from change fatigue.

But will it?

Ooh, this looks handy: A guide for reconfiguring a Synology NAS to act as a remote Docker host qmacro.org/2021/06/12/remote-a

kboyd boosted

Hot tip 🔥

If you're passing a lot of arguments to a constructor or method, try to see if you can group them and create a new class/object with the arguments as properties. It'll better describe the domain and provide additional documentation🙂

P.S. these are called DTOs (Data Transfer Objects) or Value Objects

My list:

* read only properties
* enums
* first-class callables

But since I'm also not on PHP 8.0 yet, I can also look forward to:

* named parameters
* attributes
* constructor properties
* nullsafe chaining operator
* match expressions
* static return type
* making the @ suppression operator no longer silence fatals

... and much, much more.

Show thread
kboyd boosted

RT @mhdksafa
What we learned in 2020? That oil is worthless in a society without consumption. That healthcare has to be public because health is public. That 50% of jobs can be done from home while the other 50% deserve more than they’re being paid. That we live in a society, not an economy.

So, what are people most excited for in PHP 8.1?

(I really need to get more of my hobby servers upgraded ...)

What's the most concise PHP syntax for "if not null, cast to int, otherwise use null"?

What I've got so far:

$var = (null !== $var) ? (int)$var : null;


if (null !== $var) { $var = (int)$var; }

Points to spatie/icalendar-generator. That was a totally painless integration experience for generating .ics files.

Been hemming and hawing over a hobby project idea since April, and finally made some progress on it today thanks to Miro (mapping out my ideas) and Auth0 (handling signup and login). One detail I need to fill in is how to create a local database record for users that sign up via auth0, so I guess that's my next avenue of inquisition. And then I can get started on the visual design.

@Crell Hey, quick thought on your data provider blog post (which was a great summation of my favourite parts of data providers): a fifth advantage of `yield` over `array` is that if you accidentally give two data provider entries the same name, a `yield` will result in both being tested, but an `array` will result in the second occurrence clobbering the first. It's silly, but for large providers, it could conceivably one day save someone's butt.

Set up Pi-Hole running in a Docker instance on my Synology NAS. Now I just need to set it as the default DNS for the DHCP server on the RT-AX88U and then I can sit back and wait for any one of those things to fail inexplicably.

... what to do, what to do. So many things I'd like to do, but absolutely don't have the energy to do them myself. If only I could hire a team to do it for me.

Paying people to code on my own hobby projects. Hmm. That seems even sillier when I type it out.

"PHP 8 has two release maintainers. Sara is one, who is the other?"

"Is the other maintainer also Sara?"


Reading GitHub comments on one coworker's PR, another coworker compliments his coding style and advocates for that method of avoiding nested if statements. And I'm like "Yeah. Preach it."

And then I lurch forward, remembering that I wrote one earlier today & have suddenly realized a way to refactor it to remove the nesting.

Do I code now, or do I wait until tomorrow?


Mark it down: 9:55am. That's when I hit a coding catch-22 that will frustrate me for the next (checks Apple schedule) two hours.

Installing PHP 8 on Raspbian is a lot easier when you have a decent guide for it. Found this one tonight: lindevs.com/install-php-8-0-on

I finally got my underwater drone back in the water after a long winter hiatus, and I found something neat! youtu.be/KT-g50Rq-2o

Show older
PHP Community on Mastodon

Open source. Open community. We are dedicated to building and enriching the PHP community.