PHPStorm Quick Tip: Fix reference class not found errors

Sometimes PHPStorm stops knowing about references or locations of class definitions that were working fine previously. Below is an image (click to enlarge) where PHPStorm tells method not found in class even though class file is included and everything is okay:


This may happen due to a bug in PHPStorm (possibly), unexpected system shutdown, system date time modification or some other reason.

To fix it, you just need to change modified dates of files PHPStorm thinks aren’t there. Once you do that, PHPStorm will reload the changes and will be able to get the reference to those files thereby doing away with such errors. You could simply go to a file and modify it by entering space in its contents or if you have good deals of files, the easiest way would be to touch them. The touch is command line utility that comes with Linux OS. If you are using Windows though, you can download it here. Just run below command to touch all files of the project so PHPStorm knows about class definitions and references of them.

touch -m -c -s -R yourProjectFolder

You can see the options of touch utility by typing touch –help.


Free Admin Template

While working on a website or your custom CMS, you need to have an admin template and if you are already provided with one by designer or anyone, that’s good but sometimes you don’t have that option or you want to work on your personal project for which you need the admin template but designer isn’t available or you don’t want to buy an admin template or hire a designer. I often come across this requirement where I need an admin template which should have these features:

  • Easy to customize
  • Slick and nice looking interface
  • Can be modified to as many links as needed, suitable for small to big websites
  • Nice button and form styles
  • Nice looking info messages
  • Can be used as admin for any kind of website

Today I share with you guys an admin template that I created for my personal use. That’s free, you can use it for personal or commercial use.


This slideshow requires JavaScript.