setono / kraken-io-bundle
Symfony bundle that integrates the kraken.io PHP SDK
Installs: 28 884
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 3
Open Issues: 6
Type:symfony-bundle
Requires
- php: >=7.3
- setono/kraken-io-php-sdk: ^1.0
- symfony/config: ^4.4 || ^5.0
- symfony/dependency-injection: ^4.4 || ^5.0
- symfony/http-kernel: ^4.4 || ^5.1.5
Requires (Dev)
- kriswallsmith/buzz: ^1.1
- matthiasnoback/symfony-config-test: ^4.2
- matthiasnoback/symfony-dependency-injection-test: ^4.2
- nyholm/psr7: ^1.3
- nyholm/symfony-bundle-test: ^1.6
- phpunit/phpunit: ^9.4
- roave/security-advisories: dev-master
- setono/code-quality-pack: ^1.4
- v1.1.0
- dev-master / 1.0.x-dev
- v1.0.0
- dev-renovate/configure
- dev-dependabot/github_actions/ramsey/composer-install-2
- dev-dependabot/github_actions/actions/checkout-3.1.0
- dev-dependabot/composer/nyholm/symfony-bundle-test-tw-1.6or-tw-2.0
- dev-dependabot/github_actions/shivammathur/setup-php-2.11.0
- dev-dependabot/composer/setono/code-quality-pack-tw-1.4or-tw-2.0
This package is auto-updated.
Last update: 2024-11-15 19:30:30 UTC
README
Integrates the kraken.io PHP SDK into Symfony.
Installation
Step 1: Download the bundle
$ composer require setono/kraken-io-bundle
Step 2: Enable the bundle
Enable the plugin by adding it to the list of registered plugins/bundles in config/bundles.php
:
<?php $bundles = [ // ... Setono\KrakenIoBundle\SetonoKrakenIoBundle::class => ['all' => true], // ... ];
Step 3: Add configuration
# config/packages/setono_kraken_io.yaml setono_kraken_io: api_key: your_api_key api_secret: your_api_secret
Usage
Now you can inject the ClientInterface
into your service:
<?php namespace App\Image; use Setono\Kraken\Client\ClientInterface; final class Optimizer { private $client; public function __construct(ClientInterface $client) { $this->client = $client; } }
With auto wiring this will work out of the box. If you're not using auto wiring you have to inject it in your service definition:
<?xml version="1.0" encoding="UTF-8" ?> <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> <services> <service id="YourService"> <argument type="service" id="Setono\Kraken\Client\ClientInterface"/> </service> </services> </container>