Grey.ooo
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@mander.xyz to PHP@programming.dev · 1 month ago

Introducing Safe and Progressive Strict Type Adoption Rule

getrector.com

external-link
message-square
0
link
fedilink
1
external-link

Introducing Safe and Progressive Strict Type Adoption Rule

getrector.com

cm0002@mander.xyz to PHP@programming.dev · 1 month ago
message-square
0
link
fedilink
PHP's `declare(strict_types=1)` directive is a powerful tool for preventing subtle bugs. Yet most existing, mature projects don't use it consistently, if at all. Why? Because automatically adding it to all your files at once will cause your application to explode: expect thousands of errors. That leaves you fixing files by hand, one by one, and relying on team members to remember to add it to new files. Without a safe and automated process, adoption hardly ever sticks. Until now. The new `SafeDeclareStrictTypesRector` only adds strict types to files that are **already type-safe**, making safe, progressive adoption finally possible and preventing the file from becoming non-strict in the future.
alert-triangle
You must log in or # to comment.

PHP@programming.dev

php@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !php@programming.dev

Welcome to /c/php! This is a community for PHP developers and enthusiasts to share and discuss anything related to PHP. From the latest updates and tutorials, to your burning questions and amazing personal projects, we welcome all contributions.

Let’s foster an environment of respect, learning, and mutual growth. Whether you’re an experienced PHP developer, a beginner, or just interested in learning more about PHP, we’re glad to have you here!

Let’s code, learn, and grow together!

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 2 users / day
  • 21 users / week
  • 21 users / month
  • 21 users / 6 months
  • 1 local subscriber
  • 787 subscribers
  • 51 Posts
  • 0 Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • mbd@programming.dev
  • BE: 0.19.16
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org