Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lampert's avatar

J.A.R.V.I.S. in the ecosystem?

Is there any plan to build a new ecosystem member that uses AI / machine learning to help in building a Laravel application? Just like Telescope makes the development process easier, JARVIS would catch errors when they happen and suggest fixes. For example, if I make a reference to App\Model\User, and it can't find that class, but it sees there's a class App\Models\User, it would say "I think you meant this... May I fix that for you?" (perhaps even with a Paul Bettany voice). It would tap into a growing number of issues and resolutions by developers, with opt-in to automatically contribute machine learning concepts yourself, but it would first focus on how to fix the top 90% of issues that come up daily. In time, it would learn to analyze code in the app to suggest optimizations or performance improvements.

If there's no plan so far, I might be in a position to start building it myself as part of the Laravel community.

0 likes
5 replies
martinbean's avatar

If someone can’t spell, then programming is not a suitable endeavour for them…

Most modern IDEs and text editors will highlight things like typos in class names, missing imports, etc. It’s really not a problem that needs A.I. to solve.

lampert's avatar

I respectfully disagree. There are many errors that occur, not because the programmer doesn't know how to spell, but because Laravel is new to them or they have other things on their mind. For example, I was working on a project where there was an App\Models folder and most models were there, but one model wasn't, so I used Visual Code to drag the model into the folder along with the others, but I forgot to change the "use" in all the places, so it complained about not being able to find that model anymore. Likewise, when doing php artisan make:factory WidgetFactory without a model, it just puts a placeholder use App\Model, and if you forget to fill that in, again it will complain in a seeding class that it can't find that model. There are hundreds of "gotchas" that a JARVIS-like system could catch and suggest, allowing a fix in a single "ok" click.

automica's avatar

If you used phpstorm and used refactor > move class then your use statements would have been updated.

Likewise if you create a factory but you don’t define the model, the application will throw an error with a stack trace which will show where the error is.

A good IDE will feedback on non functional code but it will just do that. It’s up to you to decide what the appropriate fix is.

The problem with an AI is that it’s only as good as the programmer. I don’t want an AI to assume what I want to do.

A dev would be better off learning from the various Laravel best practice repos, and then looking at something like laravel blueprint

https://github.com/laravel-shift/blueprint

I personally think an AI would be too basic for it to be of use to a developer. If you need an AI to work with laravel perhaps you should be working with squarespace or wix

2 likes
martinbean's avatar

so I used Visual Code to drag the model into the folder along with the others, but I forgot to change the "use" in all the places, so it complained about not being able to find that model anymore.

@lampert Cool. So sounds like you need an IDE and not a text editor.

jlrdw's avatar

Is there any plan to build a new ecosystem member that uses AI / machine learning to help in building a Laravel application?

That work falls to the ide you use, not laravel.

As example, Netbeans will popup a message to put in an import if needed. So if I type the following:

Map<String, Object> author = new HashMap<String, Object>();

Netbeans automatically offers to fix the problem, it adds:

import java.util.HashMap;
import java.util.Map;
As needed

I only have a java example for netbeans, but perhaps consider phpstorm for laravel and it will probably catch these errors. I don't use storm, so above was just example.

But the language itself has nothing to do with "fixing" errors.

Edit: Just FYI, netbeans has had the fixes for java errors for many years now, I am on netbeans 12.4, even back when I had 5.5 version, it would auto put in imports and fix other errors as well.

Unfortunately it doesn't do this for laravel, so use an ide that does.

Also if you program these solutions you can put in a pull request. But I think it's the ide's job, just my opinion.

I just tested something in netbeans, i changed

use Illuminate\Support\Facades\DB;

to

use Illuminate\Support\Facades\DBS

and got this

Unused Use Statement    in a little ballon symbol

So the ide is still alerting me to something.

2 likes

Please or to participate in this conversation.