We are trying to wrap a Laravel Nova within it's Resources in a composer package to use as a temporary solution to manage our API resources. Building this package instead of using the regular implementation to keep it organized and remove easily in the future when needed.
When running composer require vendor/my-nova-package, we are getting this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1 - Installation request for chatfood/chatfood-admin * -> satisfiable by chatfood/chatfood-admin[dev-master]. - chatfood/chatfood-admin dev-master requires laravel/nova ~1.0 -> no matching package found.
Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
We tried everything we found at the composer docs but nothing works.
This is our package structure:
.package/
..src/
../NovaResources/
../AdminServiceProvider.php
..composer.json
composer.json
{
"name": "vendor/my-package",
"description": "Admin Panel based on Laravel Nova for My API.",
"repositories": [
{
"type": "composer",
"url": "https://nova.laravel.com"
}
],
"require": {
"php": ">=7.1.0",
"laravel/nova": "~1.0"
},
...
"minimum-stability": "dev",
"prefer-stable": true
}
NOTES: running composer update from inside the package works well! When trying to require the package inside my API - as per composer.json bellow - we get errors.
API composer.json
{
"name": "vendor/my-api",
"type": "project",
"repositories": [
{
"type": "path",
"url": "./packages/vendor/my-package"
}
],
"require": {
...
"vendor/my-package": "*",
"laravel/framework": "5.7.*"
...
},
...
"minimum-stability": "dev",
"prefer-stable": true
}
Any idea on how to get it done?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire