Replacement repo for dingo/api

Related tags

API dingo-api
Overview

Note: This is an official and reasonably maintained fork of the popular https://github.com/dingo/api repository by one of the maintainers of that project. The reason it was forked is due to broken integrations with CI tools such as travis (which can only be fixed by owner), and in general to be able to better support the project and ensure non-breaking updates.

In order to move to this repo, you merely need to update your composer file. All the namespaces and other aspects of the project are the same. Example instructions are below, to use the latest version:

composer remove dingo/api
composer require api-ecosystem-for-laravel/dingo-api

Please note, we do not actively maintain the Lumen support of this project. If you are still using Lumen, we recommend you migrate to Laravel.


The Dingo API package is meant to provide you, the developer, with a set of tools to help you easily and quickly build your own API. While the goal of this package is to remain as flexible as possible it still won't cover all situations and solve all problems.

Build Status License Development Version Monthly Installs StyleCI

Features

This package provides tools for the following, and more:

  • Content Negotiation
  • Multiple Authentication Adapters
  • API Versioning
  • Rate Limiting
  • Response Transformers and Formatters
  • Error and Exception Handling
  • Internal Requests
  • API Blueprint Documentation

Documentation

Please refer to our extensive Wiki documentation for more information.

API Boilerplate

If you are looking to start a new project from scratch, consider using the Laravel API Boilerplate, which builds on top of the dingo-api package, and adds a lot of great features.

Support

For answers you may not find in the Wiki, avoid posting issues. Feel free to ask for support on the dedicated Slack room. Make sure to mention specialtactics so he is notified.

License

This package is licensed under the BSD 3-Clause license.

Comments
  • Add Laravel 9 support

    Add Laravel 9 support

    Description

    In general tests look good for L9 + PHP8+ but changes are not backward compatible

    Waiting for dependent packages

    • https://github.com/dingo/blueprint/pull/90

    Tests overview

    • ❌ Laravel 8 + PHP 7.4.15 (fail due to php incompatible function calls)
    • ❌ Laravel 8 + PHP 8.0.15 (2 tests break because of mismatching type - symfonys repsonse getContent() changed return behavior)
    • ❌ Laravel 8 + PHP 8.1.2 (fail due to php incompatible function calls)
    • ✅ Laravel 9 + PHP 8.0.15
    • ✅ Laravel 9 + PHP 8.1.2

    Install instructions

    Test and install this locally first. Thanks to @tobias-kuendig for sharing the instructions.

    composer.json:

        "repositories": [
            {
                "type": "vcs",
                "url":  "https://github.com/christoph-kluge/dingo-api"
            },
            {
                "type": "vcs",
                "url":  "https://github.com/dmason30/blueprint"
            }
        ],
    

    Then require the package like so:

    composer require api-ecosystem-for-laravel/dingo-api dev-laravel-9-support
    
    opened by christoph-kluge 23
  • laravel9 install error

    laravel9 install error

    today install ,fund error:

    Problem 1

    • Root composer.json requires api-ecosystem-for-laravel/dingo-api ^4.0 -> satisfiable by api-ecosystem-for-laravel/dingo-api[v4.0.0, v4.0.1, v4.0.2].
    • api-ecosystem-for-laravel/dingo-api[v4.0.0, ..., v4.0.2] require dingo/blueprint ^0.4.4 -> found dingo/blueprint[dev-chore/laravel-7-compat, dev-master, v0.1.0, ..., v0.4.3] but it does not match the constraint.

    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

    opened by boyadmin 22
  • Laravel 9 unsupport

    Laravel 9 unsupport

    | Q | A | ----------------- | --- | Bug? |yes | New Feature? | yes | Framework | Laravel | Framework version | 9 | Package version | 3.x.y | PHP version | 8.0.2

    Actual Behaviour

    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.

    Expected Behaviour

    How can i composer require api-ecosystem-for-laravel/dingo-api

    opened by suguer 12
  • Laravel 9 support

    Laravel 9 support

    | Q | A | ----------------- | --- | Bug? | no | New Feature? | yes | Framework | Laravel | Framework version | 9 | Package version | 3.x.y | PHP version | 8

    Actual Behaviour

    I want to test this package with Laravel 9. Any ideas how I can do it?

    Expected Behaviour

    Steps to Reproduce

    opened by prady00 10
  • UrlGenerator::setRouteCollections throws Exception

    UrlGenerator::setRouteCollections throws Exception

    | 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

    opened by hetzner 3
  • explode can't be null in php 8 set default include input to empty string

    explode can't be null in php 8 set default include input to empty string

    Hello,

    I have a suggest to apply because explode can't be null if include input not exist (it gives a php warning)

    Sorry if my PR is not perfect, this bug appeared when I upgraded to Laravel 9 and php8 and changes dingo-api package with your.

    opened by germ1f 1
  • change signature of setRouteCollections

    change signature of setRouteCollections

    Hello dingo-api team !

    I have a suggest to apply : change signature setRouteCollection (cf commit) because getRoutes into https://github.com/api-ecosystem-for-laravel/dingo-api/blob/master/src/Routing/Router.php#L693 can be a collection, I don't know how to reproduce the bug in the tests to show you (i need more time for that).

    Sorry if my PR is not perfect, this bug appeared when I upgraded to Laravel 9 and php8 and changes dingo-api package with your.

    Thanks for your answers

    opened by germ1f 1
  • JSON Web Tokens (Dingo\Api\Auth\Provider\JWT)

    JSON Web Tokens (Dingo\Api\Auth\Provider\JWT)

    { "message": "Target class [PHPOpenSourceSaver\JWTAuth\JWTAuth] does not exist.", "status_code": 500 }{ "message": "Target class [PHPOpenSourceSaver\JWTAuth\JWTAuth] does not exist.", "status_code": 500 }

    opened by zhonghaibin 1
  • Update JWT Provider

    Update JWT Provider

    As stated in the previous pull request on the original repository.

    Let's update the default JWT Provider to the new community-driven fork which has taken over general support and updates of the repository.

    I am happy for you to make edits if required.

    Thanks, Matthew

    opened by matthewmnewman 1
  • Update blueprint version, remove redundant php 8.1 support (^8.0 alre…

    Update blueprint version, remove redundant php 8.1 support (^8.0 alre…

    Comments:

    • We don't need both PHP ^8.0 and ^8.1 - the former already satisfies the latter
    • We need to increase our major version because of the backwards incompatibles changes in tests, so since we will need to do that, there is no need to keep older versions of packages (ie. laravel) in the requirements
    • I branched off "V3" from before the "Laravel 9" PR, just in case we need to backport anything into the v3.x.x line.

    Tests currently pass, will tag this as v4.0.0

    opened by specialtactics 0
  • Moving away from Dingo

    Moving away from Dingo

    | Q | A | ----------------- | --- | Bug? | no | New Feature? | no | Framework | Laravel | Framework version | 9.38.0 | Package version | 4.x | PHP version | 8.1.12

    Removing Dingo

    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?

    opened by SturmB 1
Releases(v4.0.2)
  • v4.0.2(Aug 31, 2022)

    What's Changed

    • explode can't be null in php 8 set default include input to empty string by @germ1f in https://github.com/api-ecosystem-for-laravel/dingo-api/pull/25
    • change signature of setRouteCollections by @germ1f in https://github.com/api-ecosystem-for-laravel/dingo-api/pull/24

    New Contributors

    • @germ1f made their first contribution in https://github.com/api-ecosystem-for-laravel/dingo-api/pull/25

    Full Changelog: https://github.com/api-ecosystem-for-laravel/dingo-api/compare/v4.0.1...v4.0.2

    Source code(tar.gz)
    Source code(zip)
  • v4.0.1(Aug 20, 2022)

  • v4.0.0(Aug 20, 2022)

  • v3.1.0(Jan 30, 2022)

    Still using the same package, just replaced repo location with a new community one.

    New upstream has various updates, including support for php 8

    Thanks to @matthewmnewman

    Source code(tar.gz)
    Source code(zip)
  • v3.0.8(Jan 27, 2022)

Owner
API Ecosystem for Laravel
API Ecosystem for Laravel
A PHP replacement layer for the C intl extension that also provides access to the localization data of the ICU library.

A PHP replacement layer for the C intl extension that also provides access to the localization data of the ICU library.

Symfony 2.5k Dec 29, 2022
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Dec 14, 2022
This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science courses and the like.

Simple PHP API v.1.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science courses a

Edson M. de Souza 14 Nov 18, 2021
微信支付 API v3 的 PHP Library,同时也支持 API v2

微信支付 WeChatPay OpenAPI SDK [A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP 概览 微信支付 APIv2&APIv3 的Guzzle HttpClient封装组合, APIv2已内置请求数据签名及XML转换器,应

null 275 Jan 5, 2023
This API provides functionality for creating and maintaining users to control a simple To-Do-List application. The following shows the API structure for users and tasks resources.

PHP API TO-DO-LIST v.2.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science cours

Edson M. de Souza 6 Oct 13, 2022
API documentation API SCB EASY APP

SCB-API-EASY V3.0 API documentation SIAM COMMERCIAL BANK PUBLIC COMPANY LTD. API SCB Easy V3 endpoint = https://fasteasy.scbeasy.link 1.0. Get balance

SCB API Esay team 2 Sep 28, 2021
Courier API adalah project API untuk mengetahui ongkos kirim Logistik-logistik pengiriman barang antar kota & International

Courier API Courier API adalah project API untuk mengetahui ongkos kirim Logistik-logistik pengiriman barang antar kota (dalam negeri) & International

Rangga Darmajati 2 Sep 24, 2021
Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using laravel best practices.

Laravel API tool kit and best API practices Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using lar

Ahmed Esa 106 Nov 22, 2022
LaraBooks API - Simple API for iOS SwiftUI app tests.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Konrad Podrygalski 1 Nov 13, 2021
Simple PHP API client for tube-hosting.com rest API

Tube-Hosting API PHP client Explanation This PHP library is a simple api wrapper/client for the tube-hosting.com api. It is based on the provided docu

null 4 Sep 12, 2022
Best resources restful api for developers (with JSON:API standar specification design)

List API Best resources restful api for developers (with JSON:API standar specification design). API Resource Endpoint Name Resource Description Al Qu

Noval 2 Jan 18, 2022
Chargebee API PHP Client (for API version 2 and Product Catalog version 2.0)

chargebee-php-sdk Overview This package provides an API client for Chargebee subscription management services. It connects to Chargebee REST APIs for

GLOBALIS media systems 8 Mar 8, 2022
GraphQL API to Studio Ghibli REST API

GhibliQL GhibliQL is a GraphQL wrapper to the Studio Ghibli REST API Usage First, you'll need a GraphQL client to query GhibliQL, like GraphQL IDE Con

Sebastien Bizet 8 Nov 5, 2022
Single file PHP script that adds a REST API to a SQL database

PHP-CRUD-API Single file PHP script that adds a REST API to a MySQL/MariaDB, PostgreSQL, SQL Server or SQLite database. NB: This is the TreeQL referen

Maurits van der Schee 3.2k Jan 8, 2023
Open source API management platform

About Fusio is an open source API management platform which helps to build and manage REST APIs. Fusio provides all tools to quickly build an API from

Apioo 1.2k Jan 4, 2023
This PHP library will help you to work with your Pinterest account without using any API account credentials.

Pinterest Bot for PHP A PHP library to help you work with your Pinterest account without API credentials. The Pinterest API is painful: receiving an a

Sergey Zhuk 414 Nov 21, 2022
PHP REST API Framework

PSX Framework About PSX is a framework written in PHP dedicated to build REST APIs. It is based on multiple components which cover many aspects of the

Apioo 121 Dec 30, 2022
A simple way of authenticating your RESTful APIs with API keys using Laravel

ApiGuard This package is no longer maintained This package is no longer maintained as Laravel already has a similar feature built-in since Laravel 5.8

Chris Bautista 691 Nov 29, 2022
A RESTful API package for the Laravel and Lumen frameworks.

The Dingo API package is meant to provide you, the developer, with a set of tools to help you easily and quickly build your own API. While the goal of

null 9.3k Jan 7, 2023