That's not really an example of technical debt. That's a simple find/replace operation across a project. One way Model::create()
could potentially be considered debt in your example is if you want to change the model or type of ORM easily to not use a static interface. To do this you can just use the build dependency injection container and refer to your models by a name to avoid it entirely. It should be noted that the same is true for DB::insert()
though. Maybe you don't want to use Laravel's DB layer at all, so now you worry about changing all instances of DB
you have inserted into your code - could also avoid with dependency injection and some given interface.
However, premature optimizations can lead to way more technical debt than you'd expect so be wary to abstract before you feel the need or the pain.
Additional examples of technical debt may may having too much logic shoved into a controller or model to where it becomes hard to figure out or test, you start leaving large areas of code untested, you allow bits of code to rot because you're too afraid to modify them, etc.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community