This repository contains simple symfony bundle for redlink-api-php-client.
This version supports PHP >= 7.2 and Symfony >= 4.4.0.
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
After getting composer you have to install PSR HTTP client implementation (if you dont have one already - for example Guzzle / Buzz):
$ composer require guzzlehttp/guzzle
Next you should install this package with usage of composer:
$ composer require --no-scripts plotkabytes/redlink-api-php-client plotkabytes/redlink-api-symfony-bundle
Procedure is the same as in "Applications that use Symfony Flex" chapter.
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php
return [
// ...
Plotkabytes\RedlinkApiBundle\PlotkabytesRedlinkApiBundle.php::class => ['all' => true],
];
Then, configure the bundle by adding following configuration to the config/packages/plotkabytes_redlink_api.yaml
file:
# config/packages/plotkabytes_redlink_api.yaml
plotkabytes_redlink_api:
clients:
client_name:
authorization_key: HERE_INSERT_AUTHORIZATION_KEY
application_key: HERE_INSERT_APPLICATION_KEY
alias: OPTIONAL_CLIENT_ALIAS
default: false
After bundle configuration may be required to clear symfony cache.
$ bin/console cache:clear
Inside config/services.yaml
add following:
# config/services.yaml
services:
# ...
# Other services
# ...
App\Controller\DefaultController:
arguments: {$client: '@plotkabytes_redlink_api.client.default'}
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Plotkabytes\RedlinkApi;
class DefaultController extends AbstractController {
private $client;
public function __construct(DefaultClient $client) {
$this->client = $client;
}
}
We use Semantic Versioning 2.0.0.
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
We will gladly receive issue reports and review and accept pull requests. Feel free to contribute in any way.
Mateusz Żyła mateusz.zylaa@gmail.com
Redlink Api Symfony Bundle is licensed under The MIT License (MIT).