Fix use of deprecated method

In some version of Composer they deprecated the use of RepositoryManager->getLocalRepositories and instead throws an error.
This pull request fixes the issue and use the getLocalRepository method instead.