api-ecosystem-for-laravel / dingo-api Goto Github PK
View Code? Open in Web Editor NEWReplacement repo for dingo/api
License: BSD 3-Clause "New" or "Revised" License
Replacement repo for dingo/api
License: BSD 3-Clause "New" or "Revised" License
today install ,fund error:
Problem 1
You can also try re-running composer require with an explicit version constraint, e.g. "composer require api-ecosystem-for-laravel/dingo-api:*" to figure out if any version is installable, or "composer require api-ecosystem-for-laravel/dingo-api:^2.1" if you know which you need.
need help
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Larave |
Framework version | 10.x |
Package version | 4.x |
PHP version | 8.x |
My route api.php
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function ($api) {
$api->group(['prefix' => 'customer', 'middleware' => ['api', 'multi.store']], function ($api) {
$api->group(['prefix' => 'account'], function ($api) {
$api->group(['middleware' => ['auth']], function ($api) {
$api->get('profile', [CustomerController::class, 'profile']);
and got empty middleware. here log on telescope
Request Details
Time May 16th 2024, 9:34:26 AM (10s ago)
Hostname DESKTOP-7U5A9BN
Method GET
Controller Action
Middleware
Path /api/customer/account/profile
Status 200
Duration 322 ms
IP Address 127.0.0.1
Memory usage 24 MB
Tags [Auth:9119]
it should include middleware : api, multi.store, auth.
Thanks for help.
Hi,
Will there any new release on supporting Laravel 11?
Thank you.
Hello 👋
Anybody has this working in Laravel 9 already?
Asking just in case someone already did all the process.
Kind regards
{
"message": "Target class [PHPOpenSourceSaver\JWTAuth\JWTAuth] does not exist.",
"status_code": 500
}{
"message": "Target class [PHPOpenSourceSaver\JWTAuth\JWTAuth] does not exist.",
"status_code": 500
}
Since the inception of this package, certain functionality has been since implemented within Laravel, however a lot of functionality still hasn't - both from this package and dependency packages such as league/serializer.
I think many people would appreciate a more modern and perhaps minimalist replacement for this package, and something which better works with the default Laravel router rather than replacing it (at least I would). While I have my own wishlist of features, I would like to do a sort of survey of what sorts of features people find most useful, to give me an idea of what's required for an MVP replacement.
I am hoping over time people see this issue and can respond and give their insights.
Q | A |
---|---|
Bug? | yes |
New Feature? | yes |
Framework | Laravel |
Framework version | 9 |
Package version | 3.x.y |
PHP version | 8.0.2 |
composer require api-ecosystem-for-laravel/dingo-api:*
./composer.json has been updated
Running composer update api-ecosystem-for-laravel/dingo-api
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires api-ecosystem-for-laravel/dingo-api * -> satisfiable by api-ecosystem-for-laravel/dingo-api[dev-feature/jwt-auth-mgiration-extra, dev-master, dev-chore/php-versions-travis-check, dev-feature/php-8-travis, dev-feature/php-8.1-support, dev-analysis-OMjxOl, dev-analysis-64Rwwo, 2.0.x-dev, v3.0.8, v3.0.9, v3.1.0, v3.1.1].
- api-ecosystem-for-laravel/dingo-api[dev-feature/jwt-auth-mgiration-extra, dev-master, dev-chore/php-versions-travis-check, dev-feature/php-8-travis, dev-feature/php-8.1-support, dev-analysis-OMjxOl, dev-analysis-64Rwwo, 2.0.x-dev, v3.0.8, ..., v3.1.1] require illuminate/routing ^7.0|^8.0 -> found illuminate/routing[v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
How can i composer require api-ecosystem-for-laravel/dingo-api
Q | A |
---|---|
Bug? | no |
New Feature? | no |
Framework | Laravel |
Framework version | 8.66 |
Package version | 3.1.1 |
PHP version | 7.4.33 |
All of our API v1 endpoints are working fine, regardless header version presence.
All v2 endpoints also working fine on local/remote development server, except live Heroku server.
The v2 endpoints are not working well in Heroku server, calling v1 default version controllers.
In the Heroku server we have following command when deployment is complete:
php artisan cache:clear && php artisan config:cache && php artisan api:cache
We defined our endpoints in routes/api.php as following:
include base_path('routes/api_v1.php');
include base_path('routes/api_v2.php');
Codes of routes/api_v1.php:
use Api\V1\Auth\Http\Controllers\LoginRequestController;
$api = app(Dingo\Api\Routing\Router::class);
$api->version('v1', ['middleware' => ['api', 'jwt.check']], function (\Dingo\Api\Routing\Router $api) {
$api->group([
'prefix' => 'auth',
], function (\Dingo\Api\Routing\Router $api) {
$api->post('login-token', LoginRequestController::class)->name('api.auth.login_token');
});
});
Codes of routes/api_v2.php:
use Api\V2\Auth\Http\Controllers\LoginRequestController;
$api = app(Dingo\Api\Routing\Router::class);
$api->version('v2', ['middleware' => ['api', 'jwt.check']], function (\Dingo\Api\Routing\Router $api) {
$api->group([
'prefix' => 'auth',
], function (\Dingo\Api\Routing\Router $api) {
$api->post('login-token', LoginRequestController::class)->name('api.auth.login_token');
});
});
The config/api.php codes are not changed.
My env vars are:
API_STANDARDS_TREE=vnd
API_SUBTYPE=myapp
API_VERSION=v1
API_PREFIX=api
API_NAME="MyApp API"
API_CONDITIONAL_REQUEST=false
API_STRICT=false
API_DEBUG=true
The headers I am sending for v2 endpoints in Postman:
Accept: application/vnd.myapp.v2+json
Content-Type: application/json
I verified Heroku server headers by \Log::info() and headers were NOT altered by load balancer.
All v2 endpoints should call appropriate v2 response controllers same as local/remote development server. May be something going wrong with the optimization route cache commands this Dingo package facing trouble.
This is happening for me on fresh Dingo project sadly.
I believe the behavior is v2 is different between development and Heroku server is the caching process.
Update: 3 May, 2023: I removed the config and api route caching command from release phase for testing purpose in Heroku but sadly still it is not working as expected sadly. php artisan config:cache && php artisan api:cache
Q | A |
---|---|
Bug? | not sure |
New Feature? | no |
Framework | Laravel |
Framework version | 9.52.5 |
Package version | 4.0.2 |
PHP version | 8.1.17 |
We try to switch from Laravel 8 to Laravel 9 but sending api-requests runs in infinite loop.
The pipe() seems not to be cleared after closure.
Any ideas whats wrong here? Do we use wrong versions?
Laravel 8 (working):
"laravel/framework", "version": "v8.83.27"
"php-open-source-saver/jwt-auth", "version": "2.1.0"
"dingo/api", "version": "v3.0.8"
Laravel 9 (not working):
"laravel/framework", "version": "v9.52.5"
"php-open-source-saver/jwt-auth", "version": "2.1.0"
"api-ecosystem-for-laravel/dingo-api", "version": "v4.0.2"`
[stacktrace]
#0 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(855): end()
#1 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(829): Illuminate\\Container\\Container->findInContextualBindings()
#2 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(749): Illuminate\\Container\\Container->getContextualConcrete()
#3 /application/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(856): Illuminate\\Container\\Container->resolve()
#4 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(706): Illuminate\\Foundation\\Application->resolve()
#5 /application/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(841): Illuminate\\Container\\Container->make()
#6 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(1431): Illuminate\\Foundation\\Application->make()
#7 /application/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Middleware/Request.php(94): Illuminate\\Container\\Container->offsetGet()
#8 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(885): Dingo\\Api\\Http\\Middleware\\Request->Dingo\\Api\\Http\\Middleware\\{closure}()
#9 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(770): Illuminate\\Container\\Container->build()
#10 /application/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(856): Illuminate\\Container\\Container->resolve()
#11 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(706): Illuminate\\Foundation\\Application->resolve()
#12 /application/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(841): Illuminate\\Container\\Container->make()
#13 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(607): Illuminate\\Foundation\\Application->make()
#14 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(277): Illuminate\\Container\\Container->rebound()
#15 /application/vendor/laravel/framework/src/Illuminate/Container/Container.php(388): Illuminate\\Container\\Container->bind()
#16 /application/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Middleware/Request.php(95): Illuminate\\Container\\Container->singleton()
#17 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Dingo\\Api\\Http\\Middleware\\Request->handle()
#18 /application/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#19 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle()
#20 /application/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#21 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Fideloper\\Proxy\\TrustProxies->handle()
#22 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#23 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#24 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#25 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#27 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#28 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#29 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#30 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#31 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#32 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#33 /application/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Middleware/Request.php(124): Illuminate\\Pipeline\\Pipeline->then()
#34 /application/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Middleware/Request.php(101): Dingo\\Api\\Http\\Middleware\\Request->sendRequestThroughRouter()
#35 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Dingo\\Api\\Http\\Middleware\\Request->handle()
#36 /application/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#37 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle()
#38 /application/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#39 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Fideloper\\Proxy\\TrustProxies->handle()
#40 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#42 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#43 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#44 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#45 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#46 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#47 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#48 /application/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#50 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /application/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Middleware/Request.php(124): Illuminate\\Pipeline\\Pipeline->then()
#52 /application/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Middleware/Request.php(101): Dingo\\Api\\Http\\Middleware\\Request->sendRequestThroughRouter()
#53 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Dingo\\Api\\Http\\Middleware\\Request->handle()
#54 /application/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#55 /application/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle()
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Laravel |
Framework version | 9.40.1 |
Package version | 4.0.2 (and 4.1.0) |
PHP version | 8.1.7 |
OS | Windows 8.1 and Debian AWS EC2 (EBS) |
I had an error when doing a composer update
:
This seems to be caused by the recent (14/05/2023) dingo\blueprint
0.4.6 update, required by api-ecosystem-for-laravel
(as "dingo/blueprint": "^0.4.5"
).
[previous exception] [object] (ReflectionException(code: -1): Class \"Doctrine\\Common\\Annotations\\SimpleAnnotationReader\" does not exist at C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php:889)
[stacktrace]
#0 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(889): ReflectionClass->__construct('Doctrine\\\\Common...')
#1 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(770): Illuminate\\Container\\Container->build('Doctrine\\\\Common...')
#2 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(856): Illuminate\\Container\\Container->resolve('Doctrine\\\\Common...', Array, true)
#3 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(706): Illuminate\\Foundation\\Application->resolve('Doctrine\\\\Common...', Array)
#4 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(841): Illuminate\\Container\\Container->make('Doctrine\\\\Common...', Array)
#5 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(1043): Illuminate\\Foundation\\Application->make('Doctrine\\\\Common...')
#6 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(959): Illuminate\\Container\\Container->resolveClass(Object(ReflectionParameter))
#7 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(920): Illuminate\\Container\\Container->resolveDependencies(Array)
#8 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(770): Illuminate\\Container\\Container->build('Dingo\\\\Blueprint...')
#9 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(856): Illuminate\\Container\\Container->resolve('Dingo\\\\Blueprint...', Array, true)
#10 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(706): Illuminate\\Foundation\\Application->resolve('Dingo\\\\Blueprint...', Array)
#11 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(841): Illuminate\\Container\\Container->make('Dingo\\\\Blueprint...', Array)
#12 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(1431): Illuminate\\Foundation\\Application->make('Dingo\\\\Blueprint...')
-> #13 C:\\laravel-app\\vendor\\api-ecosystem-for-laravel\\dingo-api\\src\\Provider\\DingoServiceProvider.php(182): Illuminate\\Container\\Container->offsetGet('Dingo\\\\Blueprint...')
#14 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(885): Dingo\\Api\\Provider\\DingoServiceProvider->Dingo\\Api\\Provider\\{closure}(Object(Illuminate\\Foundation\\Application), Array)
#15 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(770): Illuminate\\Container\\Container->build(Object(Closure))
#16 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(856): Illuminate\\Container\\Container->resolve('Dingo\\\\Api\\\\Conso...', Array, true)
#17 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(706): Illuminate\\Foundation\\Application->resolve('Dingo\\\\Api\\\\Conso...', Array)
#18 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(841): Illuminate\\Container\\Container->make('Dingo\\\\Api\\\\Conso...', Array)
#19 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(280): Illuminate\\Foundation\\Application->make('Dingo\\\\Api\\\\Conso...')
#20 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(294): Illuminate\\Console\\Application->resolve('Dingo\\\\Api\\\\Conso...')
#21 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\ServiceProvider.php(404): Illuminate\\Console\\Application->resolveCommands(Array)
#22 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(161): Illuminate\\Support\\ServiceProvider->Illuminate\\Support\\{closure}(Object(Illuminate\\Console\\Application))
#23 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(82): Illuminate\\Console\\Application->bootstrap()
#24 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(417): Illuminate\\Console\\Application->__construct(Object(Illuminate\\Foundation\\Application), Object(Illuminate\\Events\\Dispatcher), '9.52.7')
#25 C:\\laravel-app\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(155): Illuminate\\Foundation\\Console\\Kernel->getArtisan()
#26 C:\\laravel-app\\artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#27 {main}
Switch back to the previous dingo\blueprint
version, adding to your composer.json
: "dingo/blueprint": "0.4.5"
Should I report this to dingo\blueprint ? This issue may be related.
I need to move the wiki documentation to this repo
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Laravel |
Framework version | 9.27.0 |
Package version | 4.0.1 |
PHP version | 8.1.2 |
TypeError: Dingo\Api\Routing\UrlGenerator::setRouteCollections(): Argument #1 ($collections) must be of type array, Illuminate\Support\Collection given, called in .../vendor/api-ecosystem-for-laravel/dingo-api/src/Provider/RoutingServiceProvider.php on line 55 and defined in .../vendor/api-ecosystem-for-laravel/dingo-api/src/Routing/UrlGenerator.php:46
Track PR progress here: #14
Q | A |
---|---|
Bug? | yes |
New Feature? | yes |
Framework | Laravel |
Framework version | 11.x.y |
Package version | 3.x.y |
PHP version | 8.2 |
"php": "^8.2",
"huangbule/laravel-eloquent-filter": "^1.0",
"laravel/framework": "^11.0",
"laravel/tinker": "^2.9",
"maatwebsite/excel": "^1.1",
"overtrue/laravel-lang": "^3.0",
"owen-it/laravel-auditing": "^13.6",
"predis/predis": "^2.2",
"tencent/tls-sig-api-v2": "^1.1",
"tencentcloud/trtc": "^3.0",
"tymon/jwt-auth": "^2.1",
"vinkla/hashids": "^12.0",
"wangju/ding-notice": "^1.0",
"yansongda/pay": "^3.6"
www/recharge # composer require api-ecosystem-for-laravel/dingo-api
Composer could not detect the root package (laravel/laravel) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
./composer.json has been updated
Composer could not detect the root package (laravel/laravel) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Running composer update api-ecosystem-for-laravel/dingo-api
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- api-ecosystem-for-laravel/dingo-api[v3.0.8, ..., v3.1.1] require illuminate/routing ^7.0|^8.0 -> found illuminate/routing[v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
- api-ecosystem-for-laravel/dingo-api[v4.0.0, ..., v4.0.2] require illuminate/routing ^9.0 -> found illuminate/routing[v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
- api-ecosystem-for-laravel/dingo-api[v4.1.0, ..., v4.1.2] require illuminate/routing ^9.0|^10.0 -> found illuminate/routing[v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.5] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires api-ecosystem-for-laravel/dingo-api * -> satisfiable by api-ecosystem-for-laravel/dingo-api[v3.0.8, v3.1.0, v3.1.1, v4.0.0, ..., v4.1.2].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require api-ecosystem-for-laravel/dingo-api:*" to figure out if any version is installable, or "composer require api-ecosystem-for-laravel/dingo-api:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Lumen |
Framework version | 10.0 |
Package version | 4.1.0 |
PHP version | 8.1.16 |
If the application receives a request where the Accepts header is not set/null
/''
, the following warning is output
monolog.WARNING: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /app/vendor/api-ecosystem-for-laravel/dingo-api/src/Http/Parser/Accept.php on line 70 [] []
A not set/null
/''
Accepts header does not cause a warning
Clean application, a new route defined with dingo, make a request to that route with no Accepts header
On the line in question, default to ''
or */*
if the header is not set/null
/''
Hi,
Is not clear to me if this library is still maintained and if it will get larval 9 support.
We need to migrate to Laravel 10 and our app is using a lot this library and we don't know if we should start to rebuild everything and remove the dependency on this module.
Thanks,
daniel
Q | A |
---|---|
Bug? | no |
New Feature? | yes |
Framework | Laravel |
Framework version | 9 |
Package version | 3.x.y |
PHP version | 8 |
I want to test this package with Laravel 9. Any ideas how I can do it?
Q | A |
---|---|
Bug? | no |
New Feature? | no |
Framework | Laravel |
Framework version | 9.38.0 |
Package version | 4.x |
PHP version | 8.1.12 |
We have a Laravel API project built back in the Laravel 5 days and was slowly upgraded to Laravel 8. This week, I'm upgrading it to Laravel 9 with PHP 8.1 and have done so successfully. However, I'd like to also end our dependency on Dingo since it's deprecated.
I'd instead use Laravel's built-in API routing, but it looks like it's fairly well-integrated into our app, especially in terms of authentication. Since it appears that we use OAuth2 tokens, I figure I can set up Laravel Passport to be used in place of Dingo. (It seems to be already installed, too.)
But I'll have to modify dozens of our Controllers that use Dingo. For example, here's a small piece of error output from running PhpStan:
------ ------------------------------------------------------------------------
Line Http/Middleware/CheckAnyAPIPermissionMiddleware.php
------ ------------------------------------------------------------------------
16 Class App\Http\Middleware\CheckAnyAPIPermissionMiddleware uses unknown
trait Dingo\Api\Routing\Helpers.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
36 Access to an undefined property
App\Http\Middleware\CheckAnyAPIPermissionMiddleware::$auth.
42 Access to an undefined property
App\Http\Middleware\CheckAnyAPIPermissionMiddleware::$response.
44 Access to an undefined property
App\Http\Middleware\CheckAnyAPIPermissionMiddleware::$response.
------ ------------------------------------------------------------------------
So some Dingo-specific properties and methods like $auth
, $response
, and various things in Helpers
will need to be replaced. I don't mind doing so, but I'd need to know what to replace them with successfully.
Are there instructions for migrating away from Dingo and replacing it with Laravel's built-in routing and Passport?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.