buchhaltungsbutler / microservice-connector-bundle
a bundle implementing abstract classes used to connect a bhb microservice to the main bhb application
Package info
gitlab.com/buchhaltungsbutler-packages/microservice-connector-bundle
pkg:composer/buchhaltungsbutler/microservice-connector-bundle
Requires
- php: >=8.1
- ext-ctype: *
- ext-curl: *
- ext-iconv: *
- ext-mbstring: *
- aws/aws-sdk-php: 3.*
- doctrine/doctrine-bundle: ^2.6
- doctrine/doctrine-migrations-bundle: ^3.2
- doctrine/orm: ^2.12
- guzzlehttp/guzzle: 7.*
- symfony/console: 6.4.*
- symfony/dotenv: 6.4.*
- symfony/flex: ^2
- symfony/framework-bundle: 6.4.*
- symfony/monolog-bundle: ^3.8
- symfony/process: 6.4.*
- symfony/proxy-manager-bridge: 6.4.*
- symfony/runtime: 6.4.*
- symfony/security-bundle: 6.4.*
- symfony/validator: 6.4.*
- symfony/yaml: 6.4.*
Requires (Dev)
- doctrine/data-fixtures: ^1.5
- doctrine/doctrine-fixtures-bundle: ^3.4
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.5
- symfony/browser-kit: 6.4.*
- symfony/maker-bundle: ^1.40
- symfony/phpunit-bridge: ^6.0
- symfony/stopwatch: 6.4.*
- symfony/web-profiler-bundle: 6.4.*
Suggests
None
Provides
None
Conflicts
Replaces
None
This package is auto-updated.
Last update: 2026-10-29 12:50:41 UTC
README
A Symfony 6.4 bundle for connecting external services to BuchhaltungsButler.
It provides HTTP endpoints, request parsers, and response classes for customers,
connections, accounts, transactions, OAuth, and synchronization.
Doctrine entities, repositories, and persisters handle data storage.
Concrete connectors implement the abstract classes in src/PublicInterfaces/;
test implementations are available in tests/TestService/.
Prerequisites
- Docker with Docker Compose (
docker compose), for example Docker Desktop. - Run commands from the project directory. PHP and Composer run inside the container
as
www-data(uid 33), which needs write access to the checkout forvendor/andcomposer.lock. - Ports
3309(MariaDB) and optionally8888(Adminer) must be available.
Set up containers and dependencies
Symfony requires a .env file. The supplied test values are sufficient for local
testing. The following command preserves an existing file:
test -f .env || cp .env.test .env
docker compose build bb_interface_php_test
docker compose up -d db
docker compose run --rm --no-deps --entrypoint composer \
bb_interface_php_test install --no-interaction
The PHP service uses PHP 8.1. The original entrypoint ignores PHP requirements when running Composer and then only executes cache commands. The commands in this guide explicitly override that entrypoint. Composer must check PHP requirements to avoid installing incompatible packages.
If dependencies were previously installed with --ignore-platform-req=php,
resolve them again inside the container:
docker compose run --rm --no-deps --entrypoint composer \
bb_interface_php_test update --no-interaction
This repository does not track composer.lock, so the first installation in a
fresh checkout resolves dependencies again. The bind mount stores vendor/ and
the local lock file in the project directory.
Optionally start Adminer at http://localhost:8888
(server db, username bb, password bb):
docker compose up -d adminer
Run tests
The tests use PHPUnit and a dedicated Symfony test kernel. MariaDB must be ready
before running database tests; docker compose logs db should show
ready for connections with port: 3306.
Use only the local test database: Tests drop and recreate tables through
tests/FixtureAwareTrait.php. In the test environment, Doctrine automatically
appends _test to the database name. Docker initialization creates that database
and its user.
Run the full test suite:
docker compose run --rm --no-deps \
-e 'MICROSERVICE_CONNECTOR_BUNDLE_DATABASE_URL=mysql://bb:bb@db:3306/bhb_external_data_provider_bundle_data?serverVersion=mariadb-10.1.43&charset=utf8mb4' \
--entrypoint php bb_interface_php_test bin/phpunit
The environment variable overrides the address from .env.test: containers
connect to db:3306, while connections from the host use 127.0.0.1:3309.
The generic DATABASE_URL in phpunit.xml.dist is not used for this bundle's
database connection.
Tests that do not access the database can run without a database container, for example the request parser tests:
docker compose run --rm --no-deps --entrypoint php \
bb_interface_php_test bin/phpunit tests/Http/RequestParser
To run a single file, replace the directory path with its file path.
Use --filter MethodName to narrow the selection further.
The PHP container exits after each run and is removed by --rm.
PHPUnit does not require a continuously running PHP web server.
Logs and known messages
docker compose ps -a
docker compose logs --tail=100
version is obsolete: Compose ignores the legacyversionfield.Could not open input file: .../artisan: The original entrypoint contains Laravel commands. The commands above bypass it.- PSR-4 warnings: Some existing test classes use namespaces that do not match their directories.
- Symfony/Doctrine deprecation notices should be assessed separately from the PHPUnit result. Also check the exit code and any errors reported at the end.
- For syntax errors in
vendor/, check PHP and extension requirements:docker compose run --rm --no-deps --entrypoint composer bb_interface_php_test check-platform-reqs.
Stop and remove the containers while keeping the MariaDB volume:
docker compose down