Team vscode: how can you pretend you are happy ?

Draft Disclaimer: Please note that this article is currently in draft form and may undergo revisions before final publication. The content, including information, opinions, and recommendations, is subject to change and may not represent the final version. We appreciate your understanding and patience as we work to refine and improve the quality of this article. Your feedback is valuable in shaping the final release.

Language Mismatch Disclaimer: Please be aware that the language of this article may not match the language settings of your browser or device.
Do you want to read articles in English instead ?

Team vscode I still wonder how you pretend being happy. Do you know what you're missing with phpstorm? Recently had to refactor a laravel project:

  • move php class, namespace, renaming
  • All of that is made super easy with phpstorm (intelliJ idea)
  • find and replace using regex
  • all that refactoring because we were not using laravel way to update

(.*) => ((Model)::class) $1 => (new $3)->getMorphClass()

.* =? ((Model)::class) .::class '.\?Models\? get_class $this->assertEquals(.*::class

Out of scope: polymorphic relationship with Laravel

  • use $model->getMorphClass()
  • use $model->getKey() for relationships in general image

The official way to replace the polymorphic relationship would be

(new Model)->getMorphClass()

readme should have section about: For polymorphic relationship $user->getMorphClass() instead of App\Models\User User::class get_class($user)