It seems like you're trying to require a specific branch (dev-l10) from your forked repository, but Composer is unable to find that branch. Here's a step-by-step guide to troubleshoot and resolve the issue:
-
Verify the Branch Name: Ensure that the branch
l10actually exists in your forked repository. If the branch name is incorrect or the branch does not exist, Composer will not be able to find it. -
Check the Repository URL: Make sure that the URL provided in the
repositoriessection of yourcomposer.jsonfile is correct and points to your forked repository. -
Use the Correct Branch Alias: If you want to alias your branch to a version, you can use the
dev-prefix followed by the branch name. For example, if your branch is namedl10, you should usedev-l10in therequiresection. -
Clear Composer Cache: Sometimes, Composer might cache the old repository data. Run
composer clear-cacheto clear the cache and then try updating or installing again. -
Update Composer: Make sure you're using the latest version of Composer. Run
composer self-updateto update Composer to the latest version. -
Check Composer Stability Settings: If you've removed the
minimum-stabilityandprefer-stablesettings, Composer will default to stable versions, which might not include your dev branch. You can temporarily set"minimum-stability": "dev"to allow unstable packages.
Here's an example of how your composer.json should look:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ankheur/all-my-sms.git"
}
],
"require": {
"laravel-notification-channels/all-my-sms": "dev-l10"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "auto",
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
After making sure everything is correct, run the following command to update your dependencies:
composer update
If you've followed these steps and Composer still can't find your forked repository, double-check the branch name and the repository URL. If the problem persists, you might want to check the Composer documentation or seek support from the Composer community.