Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(composer): Always allow to create lockfiles
The `composer.json` might have the `lock` option [1] (which defaults to `true`) explicitly set to `false` to disallow the creation of lockfiles. Previously, analyzing such projects resulted in Composer failed to resolve dependencies for path 'composer.json': FileNotFoundException: /tmp/.../composer.lock (No such file or directory) because the implementation relies on either a lockfile to be present or to be able to create one via `composer update` in order to parse it. But if Composer is configured to work without a lockfile, none would be created, resulting in the above error. Fix this by unsetting the `lock` option before the call to `compose update`. Unsetting the option instead of setting it to `false` has the advantage that `composer.json` files without the setting are not modified. [1]: https://getcomposer.org/doc/06-config.md#lock Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
- Loading branch information