Download the PHP package benjaminmal/exchangeratehost-bundle without Composer

On this page you can find all versions of the php package benjaminmal/exchangeratehost-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package exchangeratehost-bundle

Continuous integration

exchangerate.host bundle

This bundle allows you to query the great (and free!) exchangerate.host API in a Symfony app with ease. It supports PSR-7, PSR-17, PSR-18 so you have full control of your dependencies! It uses also the Symfony Cache.

⚠️ This bundle is unofficial. I'm not related to exchangerate.host.

Summary

Requirements

Installation

Composer

PSRs

In order to use this bundle, you need to set PSR-17 message factories and a PSR-18 HTTP client.

If you already have PSR-17 factories and PSR-18 HTTP client in your services you're done! Otherwise, you can use these great libraries:

If you're using Symfony Flex and the recommended librairies, you're all set!

Otherwise, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

Then add your implementation of PSR-17 and PSR-18 services if they don't exist yet:

Getting started

Config

The following file is optional but here are the default config values:

Use the API client

The API client is available through autowiring via ExchangeRateHostClientInterface or via benjaminmal.exchangerate_host_bundle.client service id:

Cache

Customizing the cache

You want to change the default cache behavior? Let's do that:

Clearing the cache

If you are using the cache (which is highly recommended) you may want to clear the cache at each new entry of the exchangerate.host API. So you need to set a cron job on your server just after 00:05am GMT everyday (found in the FAQ).

The cron command:

⚠️ Cron generally works on local time! Adapt it to the timezone of your servers.

The command:

If you changed the default cache pool, use them instead of exchangeratehost.cache!

What's more?


All versions of exchangeratehost-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
psr/http-client Version ^1.0
symfony/cache Version ^6.2
symfony/config Version ^6.2
symfony/dependency-injection Version ^6.2
symfony/flex Version ^2.2
symfony/framework-bundle Version ^6.2
symfony/http-kernel Version ^6.2
symfony/monolog-bundle Version ^3.0
symfony/validator Version ^6.2
webmozart/assert Version ^1.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package benjaminmal/exchangeratehost-bundle contains the following files

Loading the files please wait ....