mpp / apicil-client-bundle
Symfony ApiCil Bundle
Package info
github.com/mon-petit-placement/mpp-apicil-client-bundle
Type:symfony-bundle
pkg:composer/mpp/apicil-client-bundle
Requires
- php: >=8.0
- ext-json: *
- eightpoints/guzzle-bundle: ^8.0
- symfony/dependency-injection: ^4.0 | ^5.0 | ^6.0
- symfony/framework-bundle: ^4.0 | ^5.0 | ^6.0
- symfony/options-resolver: ^4.0 | ^5.0 | ^6.0
- symfony/property-info: ^4.0 | ^5.0 | ^6.0
- symfony/serializer: ^4.4.35 | ^5.3.12 | ^6.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- symfony/property-access: ^4.0 | ^5.0 | ^6.0
- symfony/yaml: ^4.0 | ^5.0 | ^6.0
This package is auto-updated.
Last update: 2026-06-04 09:39:49 UTC
README
Installation
To install this bundle, simply run the following command:
$ composer require mpp/apicil-client-bundle
Configuration
First create a guzzle client:
// config/packages/eight_point_guzzle.yaml eight_points_guzzle: clients: my_apicil_client: base_url: '%env(APICIL_BASE_URL)%' options: auth: - '%env(APICIL_USERNAME)%' - '%env(APICIL_PASSWORD)%' my_apicil_sign_client: base_url: '%env(APICIL_BASE_URL)%' options: auth: - '%env(APICIL_SIGN_USERNAME)%' - '%env(APICIL_SIGN_PASSWORD)%'
Then configure this client to be used by the bundle:
// config/packages/mpp_apicil_client.yaml mpp_apicil_client: http_client: 'eight_points_guzzle.client.my_apicil_client' sign_http_client: 'eight_points_guzzle.client.my_apicil_sign_client'
Make sure to have enabled the serializer & property info component in symfony configuration (for serialization/deserialization):
// config/packages/framework.yaml framework: serializer: enabled: true property_info: enabled: true
Clients
Here is the mapping of client for each specification name
How to use ?
How to get a specific client domain ?
Here is a sample controller on how to get a specific client domain:
<?php namespace App\Controller; use Mpp\ApicilClientBundle\Client\ApicilClientDomainRegistryInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class ExampleController extends AbstractController { public function exampleAction(ApicilClientDomainRegistryInterface $apicilClientRegistry) { // Here are the three different available methods on how to retrieve a client domain by its alias (choose the one you prefer) $myClient = $apicilClientRegistry->get('client_domain_alias'); // or $myClient = $apicilClientRegistry->getClientDomainAlias(); // Execute operations from the retrieved client domain // ... } }
How to use each clients ?
You'll find an exemple of usage of each client below
- [WIP] ApicilAccClient (acc)
- [WIP] ApicilArbitrationClient (arbitration)
- ApicilTradingAccountClient (trading_account)
- [WIP] ApicilContractClient (contract)
- [WIP] ApicilCollectiveContractClient (collective_contract)
- [WIP] ApicilReferentialClient (referential)
- [WIP] ApicilProductClient (product)
- [WIP] ApicilFinancialProfileClient (financial_profile)
- [WIP] ApicilKycContactInformationClient (kyc_contact_information)
- [WIP] ApicilKycIbanClient (kyc_iban)
- [WIP] ApicilPreconizationClient (preconization)
- [WIP] ApicilManagementClient (management)
- [WIP] ApicilPartialRepurchaseClient (partial_repurchase)
- [WIP] ApicilTotalRepurchaseClient (total_repurchase)
- ApicilProjectClient (project)
- [WIP] ApicilPaymentClient (payment)
Tests
Update the environment variables in phpunit.xml.dist:
<!-- ... --> <php> <!-- ... --> <env name="APP_ENV" value="test" /> <env name="APICIL_BASE_URL" value="APICIL_BASE_URL" /> <env name="APICIL_USERNAME" value="USEERNAME" /> <env name="APICIL_PASSWORD" value="PASSWORD" /> <!-- ... --> </php> <!-- ... -->
Then, use the following commands if you want to run the tests suite
$ make composer-install # once
$ make phpunit
TODO
- Create missing model/dto classes used in clients
- CourtierDto
- DonneesReferencesActifDto
- FraisEncoursDto
- PeriodiciteDto
- ResultatDeCreationResource
- SituationCompteDto
- ProfilFinancierActeDto
- ProfilFinancierConsultationDto
- ProfilFinancierDto
- ProfilFinancierQuestionDto
- RepartitionDto
- ChangementCoordonneesDto
- ErreurCodeFonctionnelDto
- IbanDto
- RachatPartielDtoDeConsultation
- EmailPropositionDto
- RecuperationVersementSuppression
- SuppressionOptionDto
- ModeGestionDto
- QuestionSupportStructureDto
- EmailPropositionSouscriptionDto
- ListDocumentDto
- CompteTitreDto
- ContratProfilGestionDto
- RecuperationContratProfileGestionDto
- TrClasseActifDto
- BasePreconisationDto
- TrProfilAllocationAutoriseDto
- Add unit tests
- ApicilAccClient
- ApicilArbitrationClient
- ApicilTradingAccountClient
- ApicilContractClient
- ApicilCollectiveContractClient
- ApicilReferentialClient
- ApicilProductClient
- ApicilFinancialProfileClient
- ApicilKycContactInformationClient
- ApicilKycIbanClient
- ApicilPreconizationClient
- ApicilManagementClient
- ApicilPartialRepurchaseClient
- ApicilTotalRepurchaseClient
- ApicilProjectClient
- ApicilPaymentClient
- Update documetation
- Add client exemple usage for all routes in documentation
- Enhance how options are resolved (ex: how file related fields are handled => add Trait ?)