@OndrejMirtes@phpc.social avatar

OndrejMirtes

@OndrejMirtes@phpc.social

Creating https://phpc.social/@phpstan by day and night. 👨🏻‍💻👨‍👩‍👦‍👦🎮🚴‍♂️

This profile is from a federated server and may be incomplete. Browse more on the original instance.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

In Berlin 🇩🇪 this week to see pandas, drink excellent coffee, and give two talks at @phpconference 😊

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

When I find an easy fix for a bug I thought was unfixable for 3 years… #phpstan

Vibing White Cat GIF

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Enjoy many bugfixes in PHPStan 1.11.1: https://github.com/phpstan/phpstan/releases/tag/1.11.1

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

PHPStan 1.11 With Error Identifiers, PHPStan Pro Reboot and Much More https://phpstan.org/blog/phpstan-1-11-errors-identifiers-phpstan-pro-reboot

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Starting on Monday PHPStan Pro will offer a wizard 🧙 for transforming @​phpstan-ignore-(next-)line into new identifier-specific @​phpstan-ignore for your whole codebase.

This does not swallow future errors you might not even know about.

What other wizards would you like to see?

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Some crazy new syntax coming to PHPStan 1.11 thanks to @ruud_ and @rvanvelzen that allows to basically create an object from a specific class-string... in PHPDoc.

Yeah, it's called new<...>.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

We have a date! PHPStan 1.11 with error identifiers, PHPStan Pro reboot, checking truthiness of @​phpstan-pure, and new callable-related PHPDoc tags, is almost finished & is going to be released one week from now 🙌
https://phpc.social/@OndrejMirtes/112279892917977486

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Footer on PHPStan's website just gained a fourth icon 👀

Yes, PHPStan now has a YouTube channel. Not much is on it right now, just a few of my talk recordings linked from other places, but I have plans and I plan to see them through.

Here's the link: https://youtube.com/@phpstan

Like, subscribe and hit the bell button, or whatever the kids say these days.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

@jrf_nl Are you kidding me!? I thought I'd finally be able to attend your talk but it's in the same slot again! 😭

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

PHPStan Pro will now play nicely even if you run it inside Docker, and will open files on your actual filesystem.

I thought this was a niche request, but when a half of workshop participants at DutchPHP couldn't use PHPStan Pro for this reason, I realized I have to do it ASAP.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

The list of PHPStan sponsors steadily grows, and I'm so grateful for that. Thanks to these companies I'm able to do what I love as my full-time job.

The rule of thumb should be: If you're boasting about using open-source software in your job listing, you should sponsor it.

You can find all the ways to sponsor PHPStan on the website: https://phpstan.org/sponsor

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Sometimes I like to write silly commit messages. #phpstan

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

PHPStan "The Road to @dpcon Edition" 1.10.61 is out: You can now put conditional types into @​param-out PHPDoc tags!

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

PHPStan HQ 🚌🚇 Prague 🚊 Berlin 🚆 Amsterdam @dpcon

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

PHPStan users will soon be able to enjoy generic magic @​method tags! (Yeah, people ask for stuff like this.)

It might not be obvious but the new part in the code below is <T>. Which is the same as declaring a new @​template tag above a traditionally declared method.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

A QA engineer walks into a bar. Orders a beer. Orders 2 beers. Orders 9999 beers. Orders -1 beers. Orders a lizard. Orders a wteurgejeyth.

The first customer walks into the bar and asks where the bathroom is. The bar immediately bursts into flames, killing everyone.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Is this platform going to die because of endless spam I have in my mentions the last few days?

It’s pretty bad. I had to turn off notifications on all my devices.

video/mp4

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

My talk from PHP UK is on-line! Watch if you’re hungry for stricter PHPStan analysis, or if you want to learn many interesting tidbits about using the tool. https://www.youtube.com/watch?v=AFjr3RlDOZQ

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Never trust a test you haven’t seen fail first.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

London here I come! ✈️🐘 @phpukconference

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Spent the last two days making phpstan-doctrine fully compatible with Doctrine ORM 3.0 and DBAL 4.0. This is the result, enjoy it while it's hot! ☕

https://github.com/phpstan/phpstan-doctrine/releases/tag/1.3.61

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

I'm catching some flak for requiring array_filter callback to return a strict bool in the latest PHPStan release.

Returning non-bool like int or string is most likely a bug on user's side. Zero means the value gets filtered out, same for falsey strings like '' and '0'.

Doing:
array_filter($a, fn (array $subarrays) => count($subarrays))

is probably on purpose, but what about:
array_filter($a, fn (Entity $e) => $e->getId())

Yeah, that looks more like a bug, in both cases it's returning an int.

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

I'm cooking something... and I can't wait to share it with you!

Coming soon to PHPStan Pro: You'll be able to see ignored errors! Including the errors from the baseline.

This should help many projects get rid of huge baselines, or at least manage them comfortably!

video/mp4

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Did you know you can make git diff much more readable in some cases if you add "-w" option on the command line or "?w=1" to the URL on github.com?

If you mostly (un)intended some code using whitespaces this option makes it much clearer what's going on 👍

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Are you plagued by reported undefined properties when you "declare" them on an interface using @​property?

On PHP 8.2+ it doesn't fly because dynamic properties are restricted to classes with #[AllowDynamicProperties] attribute or __get() method.

We've come up with new PHPDoc tag @​phpstan-require-extends that can be used above interfaces and traits to require the implementing/using class to extend a certain parent.

If it allows dynamic properties it'll make them exist on the interface too!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • khanakhh
  • InstantRegret
  • ngwrru68w68
  • magazineikmin
  • mdbf
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • tacticalgear
  • everett
  • JUstTest
  • tester
  • cubers
  • osvaldo12
  • GTA5RPClips
  • Durango
  • cisconetworking
  • Leos
  • ethstaker
  • anitta
  • normalnudes
  • modclub
  • provamag3
  • lostlight
  • All magazines