Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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).
- Loading branch information