Skip to content

Establish PHP 8.3 development baseline and split unit vs. integration infrastructure#133

Draft
Copilot wants to merge 4 commits into
masterfrom
copilot/setup-development-infrastructure
Draft

Establish PHP 8.3 development baseline and split unit vs. integration infrastructure#133
Copilot wants to merge 4 commits into
masterfrom
copilot/setup-development-infrastructure

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown

This PR establishes the v3 development baseline for the client: modern Composer metadata, isolated unit/integration test configuration, static analysis and style tooling, and a CI workflow that separates default quality checks from containerized integration execution.

  • Tooling baseline

    • raises the package requirement to PHP 8.3
    • narrows runtime dependencies to PSR interfaces (psr/http-client, psr/http-factory, psr/log)
    • adds the requested dev tooling (phpunit, mockery, phpstan, phpcs, guzzle, league/openapi-psr7-validator)
    • adds Composer scripts for the default quality gates
  • Test and analysis configuration

    • splits PHPUnit into unit and integration suites
    • excludes integration and testcontainers groups by default
    • adds a max-level PHPStan config for src/
    • adds a PHPStan baseline so the new gate is usable against the current codebase without widening scope into a full typing rewrite
  • Bootstrap and autoload discovery

    • updates test/bootstrap.php to discover Composer autoloaders first
    • adds fallback loading for system-installed packages and project classes when Composer autoload is unavailable
    • keeps test bootstrap usable in both local and CI environments
  • CI pipeline

    • replaces the previous monolithic workflow with:
      • a default unit job for push / pull_request
      • a testcontainers job gated behind workflow_dispatch
    • adds explicit minimal workflow permissions
    • keeps Docker-based integration execution isolated from the default feedback loop
  • Codebase hygiene for v3 files

    • adds declare(strict_types=1); across PHP sources, tests, and examples
    • removes closing tags
    • normalizes src/ to PSR-12 expectations
    • marks resource-backed tests as integration-scoped so unit runs stay fast and deterministic

Example of the new PHPUnit split:

<testsuites>
    <testsuite name="unit">
        <directory>test/ZammadAPIClient</directory>
        <exclude>test/ZammadAPIClient/Resource</exclude>
    </testsuite>
    <testsuite name="integration">
        <directory>test/ZammadAPIClient/Resource</directory>
    </testsuite>
</testsuites>

<groups>
    <exclude>
        <group>integration</group>
        <group>testcontainers</group>
    </exclude>
</groups>

Copilot AI linked an issue Jun 11, 2026 that may be closed by this pull request
11 tasks
Copilot AI changed the title [WIP] Setup development environment with automated quality checks Establish PHP 8.3 development baseline and split unit vs. integration infrastructure Jun 11, 2026
Copilot AI requested a review from dominikklein June 11, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S0: Development Infrastructure

2 participants