You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrade to PHP 8.2+, Symfony 6.4/7.4/8.0, replace Psalm with PHPStan
- PHP requirement bumped to >=8.2; CI matrix moved to PHP 8.2/8.3/8.4
- Symfony constraints widened to ^6.4 || ^7.4 || ^8.0; CI pins per row
- Replace Psalm with PHPStan (level 8) via setono/code-quality-pack ^3.4
- Replace composer-unused with shipmonk/composer-dependency-analyser
- Migrate PHPUnit 9 → 11 (#[Test] attribute, schema rewrite)
- Migrate service config from XML to PHP DSL for Symfony 8 readiness
- Port ecs.php to ECSConfig builder
- Switch codecov uploader to codecov/codecov-action@v5
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project
6
+
7
+
Symfony bundle that wires the [`setono/gls-webservice-php-sdk`](https://github.com/Setono/gls-webservice-php-sdk) into a Symfony application's DI container. The bundle itself contains no business logic — it loads an XML service definition file that registers the SDK's `SoapClientFactory` and `Client`, and exposes `wsdl` / `connection_timeout` as configurable parameters.
8
+
9
+
Supports PHP `>=7.4` and Symfony `^5.4 || ^6.0`. The CI matrix tests PHP 7.4 / 8.0 / 8.1 against both Symfony lines (excluding PHP 7.4 + Symfony 6).
10
+
11
+
## Common commands
12
+
13
+
Composer scripts (also exposed as zsh aliases — see user-level CLAUDE.md):
14
+
15
+
-`composer phpunit` (`phpunit`) — run the test suite.
-`composer-unused` — surface unused composer dependencies. `composer-unused.php` contains a `NamedFilter` for `setono/gls-webservice-php-sdk` because that package is wired only through XML and so appears unused to static analysis; do not remove the filter.
21
+
22
+
Run a single test: `vendor/bin/phpunit --filter it_inits` (or pass a path: `vendor/bin/phpunit tests/SetonoGlsWebserviceBundleTest.php`).
23
+
24
+
## Architecture
25
+
26
+
Three files do all the work; understand them as a unit:
27
+
28
+
-`src/SetonoGlsWebserviceBundle.php` — empty `Bundle` subclass; the framework derives the extension class name (`SetonoGlsWebserviceExtension`) by convention.
29
+
-`src/DependencyInjection/Configuration.php` — defines the `setono_gls_webservice` config tree (`wsdl`, `connection_timeout`).
30
+
-`src/DependencyInjection/SetonoGlsWebserviceExtension.php` — processes config into two container parameters (`setono_gls_webservice.wsdl`, `setono_gls_webservice.options`) and loads `Resources/config/services.xml`. Note that `connection_timeout` is only added to `options` when `> 0` — falsy values are intentionally omitted so the `SoapClient` uses its own default.
31
+
-`src/Resources/config/services.xml` — instantiates `SoapClientFactory` and `Client` from the SDK and registers FQCN aliases (`Setono\GLS\Webservice\Client\ClientInterface`, `Setono\GLS\Webservice\Factory\SoapClientFactoryInterface`) so consumers can autowire by interface. When adding a new service, register both the snake-case id and the interface alias to preserve this convention.
32
+
33
+
Tests use `nyholm/symfony-bundle-test`'s `TestKernel`. The integration test in `tests/SetonoGlsWebserviceBundleTest.php` registers a compiler pass that marks every `setono.*` service / alias public so the assertions can fetch them from the container — required because the bundle's services are private by default.
0 commit comments