Brent Profile Banner
Brent Profile
Brent

@brendt_gd

20,517
Followers
76
Following
1,149
Media
8,646
Statuses

📓Upcoming book: ✍️ 📽 📨 ⌨️ dev adv @phpstorm Christian

Belgium
Joined April 2012
Don't wanna be here? Send us removal request.
Pinned Tweet
@brendt_gd
Brent
9 months
Don't you just love how PHP has evolved over the years? 😍
Tweet media one
Tweet media two
Tweet media three
Tweet media four
42
155
1K
@brendt_gd
Brent
2 years
The evolution of a PHP object from PHP 5.6 to PHP 8.2: quite the difference! 🤩
Tweet media one
25
257
979
@brendt_gd
Brent
4 years
FYI, the `match` expression is accepted for PHP 8:
Tweet media one
28
190
793
@brendt_gd
Brent
3 years
What's new in PHP 8.1 - enums - fibers - array unpacking with string keys - `new` in initializers - readonly properties - first-class callables - the `never` type - `array_is_list` - and more, so exciting!
17
277
789
@brendt_gd
Brent
9 months
This is one of those PHP feature I just can't live without anymore: match = 🤩
Tweet media one
Tweet media two
20
83
703
@brendt_gd
Brent
4 years
This is the impact #PHP8 will have on my code. Before (PHP 7.4) / After (PHP 8)
Tweet media one
Tweet media two
21
113
669
@brendt_gd
Brent
2 years
PHP 8.3 will have a new json_validate function that basically does what its name says. Previously we had to combine `json_decode` with `try/catch` to make sure a JSON string was valid. This function also requires less memory than the old workaround.
Tweet media one
10
103
658
@brendt_gd
Brent
1 year
What's new in PHP 8.2, you ask? Well, here's a thread:
18
215
628
@brendt_gd
Brent
3 years
The evolution of my DTOs throughout PHP history: 7.3 - 7.4 - 8.0 - 8.1 👌
Tweet media one
Tweet media two
Tweet media three
Tweet media four
18
127
621
@brendt_gd
Brent
2 years
"Is this Python?" "No, it's a Boa constructor"
Tweet media one
26
97
587
@brendt_gd
Brent
2 years
PHP is NOT becoming java. PHP is so much more than its syntax. It’s an ecosystem, a mindset, a community. Besides that, the language itself is still very different. PHP is as close to Java as it is to C++, C#, Ruby and Python.
25
78
512
@brendt_gd
Brent
2 years
Some important news: today marked my last day @spatie_be , and I’ll start my job as dev advocate/content manager @phpstorm next Monday! I’m gonna miss my awesome colleagues, but I’m also very excited!
56
12
495
@brendt_gd
Brent
2 years
New in PHP 8.2: readonly classes 🤩 Before and after:
Tweet media one
Tweet media two
6
76
460
@brendt_gd
Brent
3 years
So my wife and I are working on a new side project, we're having a deadline for May, 2021. To be honest, she's doing most of the hard work at the moment 😌
Tweet media one
45
0
416
@brendt_gd
Brent
4 years
In other RFC news, this one goes to vote tomorrow 😱
Tweet media one
36
60
404
@brendt_gd
Brent
2 years
New in PHP 8.2: deprecated dynamic properties! 🚨 DO NOT PANICK, it'll be ok! 🚨 Keep on reading…
Tweet media one
13
73
395
@brendt_gd
Brent
2 years
New in PHP 8.2: redacted parameters 🤩 You can mark parameters that potentially contain sensitive information with the #[SensitiveParameter] attribute in order to prevent their data from ending up in stack traces:
Tweet media one
Tweet media two
6
80
397
@brendt_gd
Brent
4 years
I wish PHP objects were constructed via ::new(), allows for much easier method chaining. I often find adding that little `new` method on many of my classes, just because it's so useful. Rust, for example, uses the `::new()` approach, much better.
Tweet media one
Tweet media two
35
34
394
@brendt_gd
Brent
4 years
Did you know that the null coalescing assignment operator in #PHP 7.4 can be used to make memoizing stuff a little more clean?
Tweet media one
Tweet media two
7
75
385
@brendt_gd
Brent
3 years
The DRY principle is one of the most abused ones in software development. By all means, DO repeat yourself until you're sure that the abstractions you're thinking about are the right ones.
21
82
371
@brendt_gd
Brent
2 years
Readonly classes in PHP? Yes please!
Tweet media one
Tweet media two
17
46
364
@brendt_gd
Brent
2 years
My clean PhpStorm setup in 9 steps 👇
7
57
360
@brendt_gd
Brent
9 days
✋ I'll admit it. I've been writing PHP for more than a decade now, and I still mix up needle and haystack.
54
19
402
@brendt_gd
Brent
2 years
Can I say something 🌶 ? (gonna do it anyway). I've used both Smarty, Twig and Blade in my decade of development, and I've used them more than "let's play with it for 10 minutes" Blade is BY FAR the best template engine to work with in PHP. That's it.
36
27
324
@brendt_gd
Brent
5 years
Another #PHP RFC passed! $otherArray = [3, 4]; $array = [1, 2, ...$otherArray];
18
107
317
@brendt_gd
Brent
2 years
This is how I wrote a basic data transfer object back in PHP 5.6. Quite a lot has changed since then, keep on reading…
Tweet media one
7
110
315
@brendt_gd
Brent
2 years
The dynamic properties deprecation RFC has passed. Let me say something that I know is controversial here on Twitter: I think this is a good thing. PHP is evolving towards a stricter and more mature language. In 10 years, we'll be happy we did this.
18
25
299
@brendt_gd
Brent
8 months
I actually like how the $ adds a visual distinction between variables and functions, constants, etc. Am I the weird one? 🫣
60
9
296
@brendt_gd
Brent
5 years
The amount of new features being added to #PHP 7.4 is astonishing. Here's yet another RFC that's likely to pass: spread operators in array expressions. $others = ['b', 'c']; $arr = ['a', ...$others, 'z'];
10
78
286
@brendt_gd
Brent
5 years
The first two chapters are live: Laravel beyond CRUD!
28
42
253
@brendt_gd
Brent
5 months
Debugging some PHP code I wrote over a decade ago, and I'm questioning my sanity…
Tweet media one
26
6
251
@brendt_gd
Brent
4 years
Someone asked me how I configure @phpstorm 's file view to have different colours, here's how:
Tweet media one
7
52
246
@brendt_gd
Brent
2 years
As of tomorrow, we'll be able to use ENUMS in PHP 8.1 🤩 Let me tell you a couple of interesting things about them, keep on reading…
Tweet media one
4
56
241
@brendt_gd
Brent
2 years
New in PHP 8.2: constants in traits!
Tweet media one
4
28
237
@brendt_gd
Brent
2 years
Can you believe it? PHP 7.4 support will completely end by November 28. That's in less than two months! 7.4 was one of my favourite releases, but it's good that support ends after three years, and that the language moves on.
15
42
228
@brendt_gd
Brent
2 years
The RFC got accepted!
@brendt_gd
Brent
2 years
Readonly classes in PHP? Yes please!
Tweet media one
Tweet media two
17
46
364
7
41
225
@brendt_gd
Brent
10 months
This is what CRUD operations in Tempest could look like. WDYT? 🌊
Tweet media one
36
14
220
@brendt_gd
Brent
1 year
Friday last week, our baby girl was born: Alina Lore Roose. It was a complicated pregnancy but she’s doing amazingly well! I’ll be AFK for a couple of weeks :)
42
0
219
@brendt_gd
Brent
4 years
I've spent four days thinking about a programming problem and how to solve it. Yesterday evening it finally clicked and I've managed to fix it this morning 😁 Feels great! Does anybody else sometimes "code mentally" trying to solve something or is that just me? 😅
51
7
223
@brendt_gd
Brent
3 years
Enums are coming!! #PHP81
10
28
218
@brendt_gd
Brent
10 months
Now, I don't mean to alarm anyone; but… I'm building a framework.
47
1
216
@brendt_gd
Brent
5 years
I'm seriously thinking about how I would give shape to a book about designing Laravel applications beyond basic CRUD. I'm working on a draft and hope to gather people's feedback soon(ish).
Tweet media one
15
17
214
@brendt_gd
Brent
2 years
One of the more useful composer scripts I copy into every Laravel project 🤗
Tweet media one
6
29
213
@brendt_gd
Brent
3 years
I just realised… PHP 8.1 will be here in less than two months! #PHP #PHP81
Tweet media one
Tweet media two
Tweet media three
Tweet media four
3
41
211
@brendt_gd
Brent
1 year
No cheating. What's going to be the output here?
Tweet media one
49
18
210
@brendt_gd
Brent
4 years
#PHP8 before and after: the impact PHP 8 will have on my code
4
75
208
@brendt_gd
Brent
5 years
PHP 7.4 is still a long way away, though people are already working hard on it. If all goes to plan, this might be one of the best #PHP updates in a long long time.
16
92
204
@brendt_gd
Brent
5 years
Who here is able to define a HasManyThrough relation without looking up the docs? How did you learn it?
Tweet media one
23
31
197
@brendt_gd
Brent
9 months
Remember when we wrote enums like this in PHP? 😂
Tweet media one
Tweet media two
Tweet media three
8
17
199
@brendt_gd
Brent
2 years
Can we just say: we ❤️ PHP ?
@brendt_gd
Brent
2 years
The evolution of a PHP object from PHP 5.6 to PHP 8.2: quite the difference! 🤩
Tweet media one
25
257
979
12
13
197
@brendt_gd
Brent
26 days
Voting on property hooks have started! Currently 12 yes and 0 no. Let's hope that trend continues :D
21
33
190
@brendt_gd
Brent
9 months
I have to admit something… I cannot imagine writing any kind of simple webapp without @LaravelLivewire anymore. Feels so weird having to do a full page refresh for every form, every button press, every pagination request, … We’re spoiled 🤗
15
9
187
@brendt_gd
Brent
1 year
Can you believe it? PHP 7.4 is no longer supported as of today!
14
43
180
@brendt_gd
Brent
3 years
Fibers are coming to PHP 8.1 !
6
38
183
@brendt_gd
Brent
4 years
Here's a little tip: you can use `yield` in phpunit data providers to make them a little more readable
Tweet media one
Tweet media two
7
35
174
@brendt_gd
Brent
2 years
New in PHP 8.2: a reworked randomizer engine that is more secure and easier to use 🎉
Tweet media one
6
27
174
@brendt_gd
Brent
1 year
I made something 😱 Remember that sparkline SVG generator I was talking about? It's a package now:
Tweet media one
Tweet media two
Tweet media three
13
21
172
@brendt_gd
Brent
5 years
In case you missed it: #PHP isn't the same language it was ten years ago.
1
68
167
@brendt_gd
Brent
4 years
Looks like `str_contains` will be coming to PHP! That took a while 😅
6
42
166
@brendt_gd
Brent
4 years
A good addition to our guidelines! Never use the string notation for validation rules.
Tweet media one
18
16
164
@brendt_gd
Brent
10 months
Ok, everyone stay calm, but you can now color generic types separately in @phpstorm nightly 😱 💯
Tweet media one
8
11
162
@brendt_gd
Brent
2 years
I'm giving away five elephpants (in case you didn't know that yet). Do you wanna get one? I'll pick two random followers who retweeted this tweet next week. Simple 👍
Tweet media one
13
306
151
@brendt_gd
Brent
2 years
The new PhpStorm layout looks really nice 🤩 you can try it out in the latest EAP: Settings | Appearance & Behavior | New UI Preview 👍
Tweet media one
12
13
160
@brendt_gd
Brent
4 years
The Laravel Beyond CRUD book is taking its final form. This is the ToC, it could still change a little bit!
Tweet media one
9
18
160
@brendt_gd
Brent
5 years
Don't forget that since #PHP 7.1 you can destruct arrays with non-numerical keys: - You can cherry-pick elements - You can pick elements out of order
Tweet media one
Tweet media two
5
37
156
@brendt_gd
Brent
4 months
What's that one app that blows your mind? For me, it's BetterDisplay
Tweet media one
10
14
158
@brendt_gd
Brent
1 year
It's that time again: starting my What's new in PHP 8.3 post 🐘 🎉
3
29
155
@brendt_gd
Brent
2 years
Just realised: PHP 8.2 will be here in exactly 2 months!
6
13
157
@brendt_gd
Brent
3 years
I've been thinking a lot about request validation lately. In our projects, we map raw, incoming data to DTOs in order to use type information in complex processes. That comes with a bunch of overhead. Why not skip that overhead? before / after (poll at the end of the thread)
Tweet media one
Tweet media two
33
17
154
@brendt_gd
Brent
2 months
Now, I don't mean to alarm anyone, but I've been tinkering with writing a code highlighter in PHP, and it actually might be something useful… - Extensible - Super fast - Server side - Language injection support - Modern PHP support Anyone interested?
Tweet media one
Tweet media two
21
8
153
@brendt_gd
Brent
1 year
What's you favourite PHP function? Mine's called "levenshtein"
86
7
150
@brendt_gd
Brent
3 years
. @phpstorm this is driving me nuts 🤪 what do I need to do to get project files on top of the file search?
Tweet media one
24
4
149
@brendt_gd
Brent
11 months
4 things I'd like to see in a future version of PHP
13
10
147
@brendt_gd
Brent
4 years
Why I think named arguments would be a good addition to #PHP , and why people should vote YES:
7
40
146
@brendt_gd
Brent
5 years
Made some minor improvements to the way @laravelphp migrates databases in tests. I'll blog about it later
Tweet media one
Tweet media two
14
21
147
@brendt_gd
Brent
9 months
Ok. Why PHP?
195
6
146
@brendt_gd
Brent
4 years
Tagging the Laravel 8 release seems to be running a bit … L8 🥁
5
6
145
@brendt_gd
Brent
3 years
Happy to share the great news that our second son was born last week. I’m amazed by this young and beautiful new life, as well as the strength of my wife during delivery. There’ll be some more time off the next weeks btw, we’re thoroughly enjoying our family time!
14
0
144
@brendt_gd
Brent
4 years
Thos who are working from home, what does your home desk look like? This is mine
Tweet media one
136
5
145