PHPnews.io

Overview for 'stitcher-io'

Dealing with deprecations

Written by Stitcher.io / Original link on May. 18, 2022

You've probably dealt with them at one point your programming career: Deprecated: Creation of dynamic property Post::$name is deprecated in /in/4IreV on line 10 Deprecation notices 🤢 Despite them being annoying and frustrating to many developers, they actually serve a purpose. I would even say you…


Dynamic Strategies

Written by Stitcher.io / Original link on Apr. 6, 2022

Just a note up front: I wrote this post as a thought exercise, not as an absolute source of truth. I'd love to hear people disagree and tell me why, so don't hesitate to reply wherever you want. You've probably used the strategy pattern before: a behavioral pattern that enables selecting an algorit…


Goodbye

Written by Stitcher.io / Original link on Mar. 25, 2022

I've got some important news: today marked my last day working at Spatie and I will start working at JetBrains in the PhpStorm team on Monday. I want to talk about that. You might be wondering what happened. I actually didn't plan on leaving Spatie originally; I wasn't looking for a new job. It was…


The case for PHP generics

Written by Stitcher.io / Original link on Mar. 25, 2022

I started this series by saying it’s not just about teaching you, it’s also about making my case for what I think is the most viable and the most logical path to adding generics in PHP. It’s up to you to decide after this video whether you agree or not. So, your honor, I’d like to start my closing…


Why we can't have generics in PHP

Written by Stitcher.io / Original link on Mar. 24, 2022

We’re going to take a deep dive in what’s going on behind the scenes when it comes to generics and PHP. It’s super interesting, and very important to understand why generics aren’t supported yet as first-class citizens in PHP. Let’s get started. You can watch the video instead of reading a blog pos…


Generics in depth

Written by Stitcher.io / Original link on Mar. 23, 2022

I showed a very boring example of generics in the previous post, we’re going to do better in this one. $users = new Collection<User>(); $slugs = new Collection<string>(); Collections; they are probably the easiest way to explain what generics are about, but they also are the example tha…