composer在自动加载文件中生成不正确的命名空间

I have a 3rd party lib in the composer.json:

some/library:version

And the namespace is like:

ns1
s2\MainClass

Everything worked just fine, until one day this library changed its namespace structure.

The problem is: when I composer update the dependencies. It(composer) keeps the old psr4 namespace setting(autoload_psr4.php).

I checked the "installed.json" and found out that it loaded the incorrent config as well. But in the vendor folder, the library is correct. In the composer.lock the package's setting of "require" "require-dev" "autoload" fields are not updated. -- Think this is the breakpoint.

I've tried:

    1. clear all the cache and reinstall everything
    1. clear the vendor folder and everthing except the composer.json and reinstall
    1. switch to the dev-master version of the library and changed the library's composer.json (it's my library)

Thanks.


I'm now pretty sure it's caused by the package(remote) setting, I created a new project and try to get the newest version(or dev-master), but only that "special"(older) version was pulled. I noticed the only difference between the the "special" version and the newer ones is:

"special": require:{php:>=5.6} newer: require:{php:>=7.0}

PS: The package requires nothing else.

I guess it might be some conflict cause by my projects "require" and this package's require change.