diff --git a/pkg/fanal/analyzer/language/php/composer/composer.go b/pkg/fanal/analyzer/language/php/composer/composer.go index 1aec56ef694e..9ecb9ac7ef99 100644 --- a/pkg/fanal/analyzer/language/php/composer/composer.go +++ b/pkg/fanal/analyzer/language/php/composer/composer.go @@ -100,11 +100,7 @@ func (a composerAnalyzer) Version() int { } func (a composerAnalyzer) parseComposerLock(path string, r dio.ReadSeekerAt) (*types.Application, error) { - libs, deps, err := a.lockParser.Parse(r) - if err != nil { - return nil, xerrors.Errorf("unable to parse composer.lock: %w", err) - } - return language.ToApplication(types.Composer, path, "", libs, deps), nil + return language.Parse(types.Composer, path, r, a.lockParser) } func (a composerAnalyzer) mergeComposerJson(fsys fs.FS, dir string, app *types.Application) error {