Strengthening checks around Locker use.
Strengthening checks around Locker use.

Hi Rob,

I just changed the way you check if the locker is available or not in the "init()" method.
At this point in the process, since we are in post-dump-autoload, we should be safe to assume that the lockfile is created. Therefore, the test as you wrote (`if (isset(($locker)) {...}`) should always be true.

However, in very special circumstances (like when you are using [EmbeddedComposer](https://github.com/dflydev/dflydev-embedded-composer), there can be really no lock file. The test is still true, but the call to `$locker->getLockData()` throws an exception (lock file not found). The piece of code I added actually checks that the lock file exists, and the test fails if the lock file does not exist (or if it contains no packages).
aurelijusrozenas/component-installer,aurelijusrozenas/component-installer,Moro4125/component-installer,Moro4125/component-installer