development

Release of Larastan v. 1.0.

mohammad-rahmani-Y5yxdx2a4PI-unsplash

Many developers rely on some software that helps to check the code. Clean code that follows predefined rules makes further development and support much more manageable, so spending a bit more time now, they get a chance to save much more time later. One of such tools is Larastan - a static analysis command-line tool that uses PHPStan as its base. Many developers who worked with PhpStorm may have had encounter the latter one. It allows finding errors in the code before it is run, performing static analysis in real-time or within the code inspections. Larastan works in a similar way. It also allows you to check the code of different Laravel packages. Also, it supports most of Laravel’s magic methods.

One of Larastan’s features is the booting of the application’s container. This allows working with the types that can be computed only at runtime. Thus the code analysis can cover even more.

The analyzer also allows you to configure some specific rules for your project and even ignore some errors (this can be useful for some Laravel features that can be misinterpreted).

The code analysis works quite fast. The whole project can be reviewed in a single pass, and even if it contains thousands of files, it won’t take more than a few minutes. So this is a valuable tool for large projects that allows avoiding many of the issues. It checks 100% of the code allowing the developers to find the errors not covered by unit tests. It is difficult and expensive to cover all the code with unit tests, so Larastan allows to find as many flaws as possible while the developers can cover the most critical places.

The project has been in development for a long time. The oldest available release (0.4.2) became available on the project’s GitHub page back in October 2019, while some mentions were even in 2018. And this week, the stable release, v.1.0.0, became available.

Reading next

michal-soukup-hDOskFirs-c-unsplash
cytonn-photography-n95VMLxqM2I-unsplash

Interested in a specific business & technology topic and looking for an article in our blog but haven't found one yet?

If you haven't come across an article that matches your query, feel free to suggest the topic to us, and we'll consider featuring it in our blog. Share your suggestion in the form below, and we'll be sure to review your request.

Talk with us

If you have any questions or problems in your business that can be solved with technical solutions, just let us know. We'll do everything we can to help you.