PHP composer install different files version than GitHub

I tried to install this package: https://github.com/reactphp/filesystem from composer 2.0.13 using this command:

composer require react/filesystem:^0.1.2

Which is the latest current version of this GitHub package.

But for some reason the files content that I'm getting is far different than the one on GitHub , It lacks lots of functions.

It makes me wondered if any of my other composer packages are truely updated.. As for right now I clone it manualy but what makes composer clone a diffrent files?

I tired clearing cache, re-Install, ignore platform requirements and update both composer and packages.

Answer

Solution:

You required a stable version of this package, and got the v0.1.2. Composer package versions usually correspond to Git tags. If you look at the repository tags, you can see that v0.1.2 is commit 766cdef from 27 Oct 2018.

On the repository front page you see the code in its latest version (last commit of main branch), which actually is fc89dc2 committed on 8 May 2020.

The missing code you are talking about probably isn't released yet and may be unstable.

If you still want to install the latest version (there are good reasons for that), change the minimum-stability of your composer.json to dev and require the dev-master version of the package.

Source