This package provides remessage/client package features for applications designed via Symfony framework.
Client uses the specific version when sends messages to Core. You cannot change the version of the API used, because this may violate the logic of this package.
- PHP 8.1+
- Requirements of
remessage/client
- You will need Composer to install:
composer require remessage/client-bundle - Register the bundles in
config/bundles.php:- RmClientBundle
- RmMessageBundle
- Configure the application authorization (see Authorization)
How to get authorization credentials for your application described here.
You have two options for setting authorization credentials: using environment variables and setting credentials directly in the package configuration.
To configure using environment variables, you need to use the symfony/dotenv package. Set the environment variables RM_APP_ID and RM_APP_SECRET in one of the .env files:
RM_APP_ID=paste-your-app-id
RM_APP_SECRET=paste-your-app-secretOr in the package config you can set the app_id and app_secret properties:
remessage_client:
auth:
app_id: paste-your-app-id
app_secret: paste-your-app-secretThis configuration provides automatic authorization on each request, if the service token is not found in the storage.
If you do not want to authorize your application for each request, you can disable automatic authorization:
remessage_client:
auth:
auto: falseThis means that the parameters app_id and app_secret parameters will be injected in RM\Component\Client\Security\Authenticator\ServiceAuthenticator service, but the authenticate method will not be called. So you can call this method when you need.
Otherwise, if you do not need any of these behaviors, you can disable this behavior completely:
remessage_client:
auth: false