$country->getIso() is string|null, but I'm sure it is string - or at least I'm fine ignoring the unexpected case 🙈
Or do I neet to put it in a var to add a /**@var to it?
it allows you to put expiration on your code comments.
a comment can expire by e.g. a github, jira or youtrack issue-url. expiration dates and composer version constraints also work.
Dumb question here, I'm looking at tools to find compatibility issues with a project moving from PHP 5.6 -> 8.2.
Does anybody have experience with PHPStan and can explain how I could use that for this task? Is it just a matter of specifying a certain level to run it at? I'm running it but I think it's showing existing problems unrelated to PHP 8.2 compatibility and I'd like to just focus in on problems related to PHP 8.2 compatibility
While making my PHP packages compatible with Laravel 11 the last few weeks, I've also spent some time and added PHPStan to all of them.
The more simpler ones are already on level 9. The more complex are still on level 5 or 6. I'm still a novice when it comes to proper type documentation. Goal is to increase levels throughout the year.
As of 0.1.16 #phpstan#todoBy learnt to expire comments based on issue ticket references. This means when a ticket is 'resolved' leftover todos will error.
ATM only JIRA is supported - thanks to @EMasiakowski
In #PHP, a language without a compiler, static checking via #PHPStan is really neat. I'm running this on the command line ever now and then to see whether I messed something up during a rename or refactoring. That's not as convenient as a type checker in an IDE like Xcode which is constantly running in the background, but it's bridging a lot of the gaps.
Am Dienstag, 12. Februar, geht es um 19 Uhr um das Thema #TYPO3 Projektübernahmen und -updates. @danielsiepmann zeigt uns, wie eine Übernahme gelingt und wie man das Projekt anschließend aktualisiert. Dabei gehts dann auch um Themen wie #CI, Linting, Testing mit @phpunit und Tools wie @phpstan oder #Rector.
New plugin for #PHP#Pest to give you type coverage right in Pest. Simply composer require pestphp/pest-plugin-type-coverage —dev and then run Pest with pest —type-coverage -min=100 Perhaps you won’t need #PHPStan or #LaraStan anymore.
We've had an internal linter for years, which is built on a PHP #symphony framework.
You run the linter you want and append --fix if you want it to resolve issues (if it can)
It lints things like #JS, #SCSS as well as #PHP (via #Rector and #phpstan), #Composer files and even #TYPO3 TypoScript files - all by using the open source libraries available.
It means all our developers can adhere to central linting conventions without having to update local config files.
Fixer v3.55 brings brand new ordered_attributes rule that extends our support for #PHP8 😁. There are also multiple internal improvements, as we bumped #PHPStan level to 7 and fixed several reported issues.