Open niiaboni opened 1 year ago
Thank you for opening this @niiaboni. This came up recently in a farmOS forum topic: https://farmos.discourse.group/t/installing-on-ddev-via-composer/1646
The solution is to use the following command:
composer create-project farmos/project:2.x-dev
The reason this happens is because this composer-project
repo does not have any tagged versions - only the 2.x
development branch. That's why Composer complains without the 2.x-dev
specified: Could not find package farmos/project with stability stable.
- There is no "stable" package of farmos/project
.
There probably should be - but that's a bigger topic. Hopefully this helps you get past this particular roadblock. :-)
@niiaboni Can you open a separate issue for this please? It's not the same as the "Could not find package farmos/project with stability stable" error that this issue is focused on.
Thank you for opening this @niiaboni. This came up recently in a farmOS forum topic: https://farmos.discourse.group/t/installing-on-ddev-via-composer/1646
The solution is to use the following command:
composer create-project farmos/project:2.x-dev
The reason this happens is because this
composer-project
repo does not have any tagged versions - only the2.x
development branch. That's why Composer complains without the2.x-dev
specified:Could not find package farmos/project with stability stable.
- There is no "stable" package offarmos/project
.There probably should be - but that's a bigger topic. Hopefully this helps you get past this particular roadblock. :-)
Thanks
Thank you for opening https://github.com/farmOS/composer-project/issues/11 separately, @niiaboni!
I will keep this issue open for the time being so we remember to fix it.
May I suggest updating the below page with the above explanation. It took me some time to figure this out.
https://farmos.org/hosting/composer/
I will keep on exploring.... Thanks
Thanks for bringing this up again @jdschwam. Updating the docs in the short-term makes sense. Do you want to open a PR? Here is the relevant file in GitHub: https://github.com/farmOS/farmOS/blob/2.x/docs/hosting/composer.md
FYI I opened a draft PR which proposes a long-term solution to this: https://github.com/farmOS/farmOS/pull/739
I merged a documentation change as a temporary fix. I'd like to leave this open while we consider https://github.com/farmOS/farmOS/pull/739, because I do think we should support the ability to simply run composer create-project farmos/project
, rather than requiring the 3.x-dev
version to be appended to the end.
Describe the bug Unable to install farmos via composer. Failed with composer command and also with composer.json file on github
To Reproduce Steps to reproduce the behavior:
In CreateProjectCommand.php line 424:
Could not find package farmos/project with stability stable.
Tried to install with composer.json file from the github here. Got this error: composer create-project Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1
Potential causes:
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
To enable extensions, verify that they are enabled in your .ini files:
php --ini
in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with--ignore-platform-req=ext-simplexml --ignore-platform-req=ext-sodium
to temporarily ignore these required extensions.Expected behavior I expected farmOs files and dependencies to be downloaded to my local directory
Screenshots
Desktop (please complete the following information):
Additional context I used Composer version 2.5.5 2023-03-21 11:50:05