apitoolkit / apitoolkit-symfony
A PHP/Symfony SDK Wrapper for APIToolkit. It monitors incoming traffic, gathers the requests and sends the request to the apitoolkit servers.
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.0
- ext-curl: *
- ext-json: *
- galbar/jsonpath: ^3.0
- google/cloud-pubsub: >=1.35
- symfony/dependency-injection: >=5.4
- symfony/http-kernel: >=5.4
Requires (Dev)
- symfony/test-pack: dev-main
This package is auto-updated.
Last update: 2024-11-04 11:12:03 UTC
README
Symfony SDK
APItoolkit is an end-to-end API and web services management toolkit for engineers and customer support teams. To integrate your Symfony (PHP) application with APItoolkit, you need to use this SDK to monitor incoming traffic, aggregate the requests, and then deliver them to the APItoolkit's servers.
Table of Contents
Installation
Kindly run the command below to install the SDK:
composer require apitoolkit/apitoolkit-symfony
Configuration
First, add the APITOOLKIT_KEY
environment variable to your .env
file, like so:
APITOOLKIT_KEY={ENTER_YOUR_API_KEY_HERE}
Then, add the APIToolkit\EventSubscriber\APIToolkitService
listener and API Key to your config/service.yaml
file, like so:
# This file is the entry point to configure your own services. # Files in the packages/ subdirectory configure your dependencies. # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: locale: 'en' services: # default configuration for services in *this* file _defaults: autowire: true # Automatically injects dependencies in your services. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. APIToolkit\EventSubscriber\APIToolkitService: arguments: $apiKey: '%env(APITOOLKIT_KEY)%' # makes classes in src/ available to be used as services # this creates a service per class whose id is the fully-qualified class name App\: resource: '../src/' exclude: - '../src/DependencyInjection/' - '../src/Entity/' - '../src/Kernel.php' # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones
Note
The {ENTER_YOUR_API_KEY_HERE}
demo string should be replaced with the API key generated from the APItoolkit dashboard.
Important
To learn more configuration options (redacting fields, error reporting, outgoing requests, etc.), please read this SDK documentation.
Contributing and Help
To contribute to the development of this SDK or request help from the community and our team, kindly do any of the following:
- Read our Contributors Guide.
- Join our community Discord Server.
- Create a new issue in this repository.
License
This repository is published under the MIT license.