veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

293
active users

#phpstan

1 post1 participant0 posts today
Lukas Rotermund<p>PHP is when you spend eight hours mapping a dynamic OOP query structure into an array structure so that an external library can read it. However, today, PHPStan 1.12.28 required me to specify the array value EXACTLY. Yet it doesn't support the necessary circular dependencies by its `@phpstan-type`... 👏 </p><p>This is why I sometimes need a three-week vacation from PHP; otherwise, I'll burn out.</p><p>What remains? Delete all type definitions, and then exclude each resulting phpstan error individually. Awesome! More wasted time!</p><p>And of course some after-work Golang :go: to keep me sane.</p><p><a href="https://social.tchncs.de/tags/PHP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHP</span></a> <a href="https://social.tchncs.de/tags/PHPStan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHPStan</span></a></p>
DCoder 🇱🇹❤🇺🇦<p>Hm. <a href="https://ohai.social/tags/Phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Phpstan</span></a> really doesn’t like it when I make an abstract Doctrine repo for an interface:</p><p>/**<br> * @template TEntity of SomeInterface<br> * @extends ServiceEntityRepository&lt;TEntity&gt;<br>*/<br>abstract class SomeClass …</p><p>leads to an internal phpstan error. ☠️</p><p>If turning that base into a trait solves it, I’m going to be 🫠.</p>
Helmut Hummel 🐝<p><a href="https://phpstan.org/r/6b9bdd7e-8fc3-4200-9dfa-ed7b29f6e41e" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">phpstan.org/r/6b9bdd7e-8fc3-42</span><span class="invisible">00-9dfa-ed7b29f6e41e</span></a></p><p>Any idea what <a href="https://chaos.social/tags/phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstan</span></a> is complaining about here? <a href="https://chaos.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> </p><p>I don't get it.</p>
Michael T<p>thanks <a href="https://phpc.social/tags/phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstan</span></a> <span class="h-card" translate="no"><a href="https://phpc.social/@OndrejMirtes" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>OndrejMirtes</span></a></span> for the new <a href="https://phpc.social/tags/elephpant" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>elephpant</span></a> member to my herd 🤩 <a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a></p>
DCoder 🇱🇹❤🇺🇦<p>I wonder if it’s possible to write a <a href="https://ohai.social/tags/Phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Phpstan</span></a> rule that flags “hey dumbass, your <a href="https://ohai.social/tags/Symfony" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Symfony</span></a> container makes a compile-time decision based on an env var”. I just spent half an hour explaining to a coworker why that approach doesn’t work.</p>
Larry Garfield<p><a href="https://phpc.social/tags/PHPStan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHPStan</span></a> users! What level do you consider "good enough" for your code?</p><p><a href="https://phpc.social/tags/PHP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHP</span></a></p>
markus staab<p>Just released a <a href="https://phpc.social/tags/PHPStan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHPStan</span></a> extension which reports risky use of PSR3 compilant loggers as described by <span class="h-card" translate="no"><a href="https://phpc.social/@Crell" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>Crell</span></a></span> in <a href="https://peakd.com/hive-168588/@crell/using-psr-3-placeholders-properly" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">peakd.com/hive-168588/@crell/u</span><span class="invisible">sing-psr-3-placeholders-properly</span></a></p><p><a href="https://github.com/staabm/phpstan-psr3" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/staabm/phpstan-psr3</span><span class="invisible"></span></a></p>
Ben Ramsey<p>Does anyone know if there's an annotation I can set to tell <span class="h-card" translate="no"><a href="https://phpc.social/@phpstan" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>phpstan</span></a></span> that `$min` is definitely less than `$max`, in this example:</p><p><a href="https://phpstan.org/r/30b3b96f-268e-4f22-b286-129f81f7dd25" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">phpstan.org/r/30b3b96f-268e-4f</span><span class="invisible">22-b286-129f81f7dd25</span></a></p><p><a href="https://phpc.social/tags/PHP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHP</span></a> <a href="https://phpc.social/tags/PHPStan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHPStan</span></a></p>
Jérémy DECOOL<p>Hey <a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstan</span></a> users, how your baseline big ? </p><p>How many errors do you ignore in your static analysis ?</p>
DCoder 🇱🇹❤🇺🇦<p>I have typed “phpstab” instead of <a href="https://ohai.social/tags/phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstan</span></a> a few times, and yeah, stabbing some else’s code should be a thing 😏</p><p><a href="https://infosec.exchange/@Em0nM4stodon/113955227662602555" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">infosec.exchange/@Em0nM4stodon</span><span class="invisible">/113955227662602555</span></a></p>
Jim Winstead<p>In the early days of <a href="https://mefi.social/tags/PHP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHP</span></a>, I had to argue against the type conversion of strings to numbers not interpreting it using the '0x' hex and '0' (octal) syntaxes. I wish I'd considered scientific notation.</p><p>(I think this would have been around PHP/FI to PHP 3, and was on the non-archived core list.)</p><p>Does <a href="https://mefi.social/tags/PHPStan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHPStan</span></a> have a "comparing strings with == isn't safe" rule?<br><a href="https://toot.cat/@woozle/113849828962032884" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">toot.cat/@woozle/1138498289620</span><span class="invisible">32884</span></a></p>
Csaba<p>Hi all,</p><p>I made a small extension to celebrate the release of <a href="https://phpc.social/tags/phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstan</span></a> version 1.11: <a href="https://packagist.org/packages/senki/phpstan-prevent-ignore-line" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">packagist.org/packages/senki/p</span><span class="invisible">hpstan-prevent-ignore-line</span></a></p><p>This is not meant to be a full-featured migration—that's the role of PHPStan Pro. However, for the rest of us, it offers an easy solution to remove legacy ignore comments.</p>
markus staab<p>Do you need help with <a href="https://phpc.social/tags/PHPStan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHPStan</span></a> in some form?</p><p>I have plenty of experience in contributing changes to PHPStan core, or implementing custom extensions.</p><p><a href="https://staabm.github.io/2024/01/01/phpstan-customizing.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">staabm.github.io/2024/01/01/ph</span><span class="invisible">pstan-customizing.html</span></a></p><p>plz RT</p>
markus staab<p>check your sql queries like a boss. resultset type inference included.</p><p>next level static analysis - using the <a href="https://phpc.social/tags/phpstandba" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstandba</span></a> extension for <a href="https://phpc.social/tags/phpstan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>phpstan</span></a></p><p>Supports doctrineproject<br>DBAL, PDO, mysqli with MySQL/MariaDB and PostgreSQL.</p><p><a href="https://github.com/staabm/phpstan-dba" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="">github.com/staabm/phpstan-dba</span><span class="invisible"></span></a></p>