John Davidson

PHP composer install different files version than GitHub

0 comments
Message:


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.



My Answer:
There could be a few reasons why the files you are getting from Composer are different from the ones on GitHub:

1. Version mismatch: Make sure that the version you are requiring in Composer (0.1.2) matches the version you are expecting from GitHub. Sometimes package maintainers may not update the version number in the composer.json file on GitHub, so double-check the latest release on GitHub.

2. Composer cache: Composer caches packages to speed up installations. Try clearing the Composer cache by running `composer clear-cache` before installing the package again.

3. Composer.lock file: Make sure that your `composer.lock` file is up to date. If it is not, run `composer update` to update all packages to their latest versions.

4. Platform requirements: Check if the package has any specific platform requirements that may affect the installation. You can try ignoring platform requirements by running `composer install --ignore-platform-reqs`.

5. Package dependencies: The package you are trying to install may have dependencies that are not being installed correctly. Check the `composer.json` file of the package on GitHub to see if there are any required dependencies that are missing.

If none of these solutions work, you may want to reach out to the package maintainer or open an issue on the GitHub repository to report the discrepancy in the files you are receiving from Composer.

Rate this post

3 of 5 based on 4983 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us