Entries with the tag “phpstorm”
These entries have all been tagged with “phpstorm”.
PhpStorm suddenly stopped recognizing my git repository. I cleared the cache, restarted the IDE, but nothing helped. I jumped to my terminal, ran git from the command line, and everything worked fine there. Confusing, right?
Let me explain why this happened and how I fixed it for good.
I’m working with Yajra DataTables in a Laravel project and I’ve ran into a little bit of a headache. They provide their own render() method, which you pass a blade file to as the first parameter. Something like users.dogs.index - and through that mechanism it loads the proper blade for the datatable.
Here’s the problem, though. I can’t get auto complete and I can’t click through on that in PhpStorm. But I want to. Let’s find out how.
When a new terminal opens in PhpStorm on macOS, I was getting a weird error: bash: warning: setlocale: LC_ALL: cannot change locale (en_US-u-hc-h12-u-ca-gregory-u-nu-latn): Invalid argument.. Strange, I use Oh My Zsh with the Zsh shell. Why am I getting that error? Why bash? I could ignore it each time - but I wanted a fix.
Recently, I had an issue with PhpStorm not detecting my Docker configuration. I was using Docker Compose and everything worked fine with docker cli and Orbstack. Why wouldn’t PhpStorm recognize this? It’s a simple fix, actually. It has to do with the name of your project. Let me explain.
I love PhpStorm, but it can only do so much. Even with plugins like Laravel Idea, you may still have some missing features. One that I wish I had was autocomplete of models from collections or paginators in blade files. Well, turns out there’s an easy enough way to add this functionality for yourself.
I’d like to say I don’t ever have tons of error logs in my Laravel projects - but, sometimes it happens. With a sea of text, how can you see what you need to see easily? Enter JetBrain’s idealog plugin in PhpStorm.
When PHP errors happen, often times there is an error log. This might be in the PHP error log itself or in a log file. For example, in one of my Laravel projects, I have two log files, one for errors and one for info or debug level information.
I manage any WordPress plugins I create using git. In order to create a distribution of those, I need to zip up the source code and use that to upload to the marketplace (or directly upload). This was easy with SVN - I just used an svn export command and there we go.
I like when projects have documentation, yet I hate writing it. That’s why I rely on phpDocumentor to do most of my documentation for my project. Recently, I’ve also discovered a new tool for documenting my API: ApiDoc. I’ve also been relying heavily on vagrant for my projects.
As I’ve mentioned before, I’ve recently moved to PhpStorm. I’ve done a little bit of configuration and I plan to start using it more now. Here are a few things I really like:
We’ve just migrated to the PhpStorm IDE in my team. Commercial licenses are $200, personal are $100. I believe that the investment was well worth it. If you’ve been following my entries, you know I have a love affair with Eclipse PDT. It has been hard for an open source programmer like myself to want to buy software. But, we did it.