Toots for codito@mas.to account

Written by Greg Korba on 2025-01-28 at 12:27

Following already accepted and implemented "Support Closures in constant expressions" RFC, the new "First Class Callables in constant expressions" #PHP RFC extends the initial proposal with FCC usage. Hot or not?

https://wiki.php.net/rfc/fcc_in_const_expr

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-22 at 09:44

There are another 2 #PHP RFCs with similar concept πŸ˜΅β€πŸ’«!

How on Earth voters can process all of that? Each of these RFCs require a lot of attention, I feel sorry for them πŸ˜….

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-21 at 19:09

Aaaand it's now live πŸ˜ƒ. Tomorrow I will update #PHPStan and #Symfony extension in GetResponse, which should prevent any other issues with static analysis not catching bugs related to DI container ☺️.

https://github.com/phpstan/phpstan-symfony/releases/tag/2.0.2

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-21 at 17:11

Been a while since my last contribution to #PHPStan, but here it is ☺️. Very first implementation of result cache meta extension is almost done for #Symfony plugin πŸ‘.

https://github.com/phpstan/phpstan/releases/tag/2.1.2

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-21 at 08:22

Interesting #PHP RFC: data classes πŸ€”. With data modifier, such classes would have been compared by values they carry, rather than memory allocation (object ID). No more big conditions with multiple expressions, single === would be enough!

https://wiki.php.net/rfc/dataclass

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-16 at 15:06

Please, never do this πŸ™. It's a waste of time to write such test, waste of resources to run it, and waste of any code reader's time. It's obvious that creating instance of Foo will end up with an object that is an instance of Foo, no need to test it πŸ€¦β€β™‚οΈ.

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-14 at 08:45

Sad reality of #OpenSource. Easy to use for free, hard to contribute with your own valuable time. Remember: contributing to #OSS is not only about providing features or fixing bugs, it's also sponsoring people like @jrf_nl, triaging stuff, writing docs, answering discussions 😊.

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-09 at 13:52

After almost a year since I created it, my PR to #PHPCSFixer that introduces #PHPCompatibility check was merged πŸ₯³. This improves our QA suite with another tool that can catch usage of language features not available on runtimes marked as supported.

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7844

=> More informations about this toot | View the thread

Written by Greg Korba on 2025-01-04 at 10:41

New achievement unlocked πŸ”“β€οΈ #gym #abs #fitness

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-31 at 09:21

πŸ“’ Huge update in #PHP ecosystem! If you're utilising PHP 8.4 features, they're now covered with #PHPStan analysis, so you can work with your code with greater confidence πŸ₯³. That's an awesome way to close the calendar year in #OSS 😊.

https://phpstan.org/blog/phpstan-2-1-support-for-php-8-4-property-hooks-more

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-20 at 08:07

It seems like discussion I sparked recently about #PHP releases on GitHub made an effect 😍! This is good enough: enables GH notifications for php-src repository, provides basic information about new version and points to downloads/changelog. Great job!

https://github.com/php/php-src/releases

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-18 at 15:21

Once again I want to praise #PHPStorm 's Search & Replace by Regex feature, it's such a life saver! Using simple trick I was able to get rid of more than 2000 #PHPStan errors in our app in minutes - old code had Foo|ObjectProphecy types, where it should be ObjectProphecy<Foo>. Love it!

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-18 at 09:51

Yesterday #PHP 8.4.2 was tagged, here's the diff between latest release & the previous tag:

https://github.com/php/php-src/compare/php-8.4.1...php-8.4.2

It's a pity that php-src repo does not have proper Github releases with a changelog... There IS changelog on the official page though, but still not updated πŸ™„.

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-12 at 12:28

πŸ“’ Major update in #PHP ecosystem: #Rector v2.0 was released πŸ₯³πŸŽ‰! For projects using both Rector and #PHPStan it also unlocks usage of PHPStan v2.0 which was released some time ago. All hands on board, upgrading time 😁!

https://github.com/rectorphp/rector/releases/tag/2.0.0

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-06 at 14:16

Interestingly, properties with closures assigned as default value can also have property hooks, which makes the syntax a bit too curly πŸ™ˆ. Imagine default closure with actual body + hooks...... oof, let's pray for @PHPCSFixer πŸ™πŸ˜†.

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-06 at 14:15

"Closures in constant expressions" #PHP RFC was accepted and implemented, so in the next non-patch version (8.5 / 9.0) it will be possible to assign closures as a default values for class properties or function arguments. WDYT πŸ€”?

https://wiki.php.net/rfc/closures_in_const_expr

https://3v4l.org/8bLVZ/rfc#vgit.master

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-04 at 09:22

In general, it's a great addition, but requires many improvements. First of all, it looks weird that docs contain "The above example will output" section, because you can see the output by clicking "Run code" button πŸ˜…. Unfortunately, it requires a lot of clean up.

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-12-04 at 09:22

Thanks to Antoine Bluchet (soyuka) and Les-Tilleuls.coop we now can run #PHP docs' examples directly in the browser πŸ₯³! It's done using #WASM, and you can see the implementation here: https://github.com/php/web-php/pull/1097. What do you think? My thoughts are in the thread.

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-11-26 at 12:42

Anyone using #Gitlab and had an issue with creating job that utilises multiple #CI services that use the same #Docker image? Just stumbled upon it again in our pipeline, so I've created an issue: https://gitlab.com/gitlab-org/gitlab/-/issues/506347 😒.

=> View attached media

=> More informations about this toot | View the thread

Written by Greg Korba on 2024-11-22 at 19:09

I know all of you would have preferred to use Fixer already in your #PHP 8.4 projects, but this language release is huge and introduces many new syntaxes that are problematic for tokenizer-based tools πŸ˜”. We'll do our best to bring 8.4 support to you as soon as possible 🀞!

=> More informations about this toot | View the thread

=> This profile with reblog | Go to codito@mas.to account

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/110077782275676734
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
391.086352 milliseconds
Gemini-to-HTML Time
4.845705 milliseconds

This content has been proxied by September (3851b).