# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Changed - Added `symfony/flex` so `extra.symfony.require: "7.4.*"` is enforced — every Symfony component, including transitive ones, now stays on 7.4 LTS - Renovate groups all Symfony components into a single PR and restricts them to `~7.4` - Dependency updates: - Symfony components 7.4.x → latest 7.4 patch (`cache`, `console`, `framework-bundle`, `http-client`, `http-kernel`, `yaml`, … → 7.4.20) - `symfony/dependency-injection` back to 7.4.20 (a transitive update had pulled in 8.0.15) - `symfony/monolog-bundle` 4.0.2 → 4.1.0 - `monolog/monolog` 3.10.0 → 3.12.1 - `phpstan/phpstan` 2.2.5 → 2.2.16 - Docker builds copy `symfony.lock` so Flex doesn't re-apply recipes during `composer install` ### Fixed - Renovate no longer pins `symfony/monolog-bundle` to `~7.4` — it is versioned independently (4.x) and was blocked from updates (#39) ### Security - Release images are built against the latest picks up PHP 8.4.27 for CVE-2026-109618 and CVE-2026-109619 (critical RCE) ## [0.2.1] - 2026-07-31 ### Added - Gitea Actions `test.yml` workflow — builds dev and prod images and runs PHPUnit and PHPStan on pushes and PRs to `main` ### Fixed - Removed a leftover `composer dump-env prod` call in the prod Docker build stage — the command doesn't exist in this project's Composer setup and broke every image build ## [0.2.0] - 2026-07-12 ### Added - **Contribution history store (SQLite)** — `ContributionStore` persists each provider's daily counts in `var/data/contributions.db`; `ContributionAggregator` now fetches only the window since each provider's last stored date (plus a 3-day trailing overlap for late corrections), merges the result into the store, and prunes rows older than `CONTRIBUTIONS_RETENTION_DAYS` - **`graph:contributions:refetch` console command** — forces a full or explicit-range re-fetch of contribution history, chunked into ≤365-day windows, for one, several, or all configured providers - **Concurrent, non-blocking provider fetches** — `ProviderInterface::fetch()` split into `startFetch()`/`resolveFetch()` so GitHub, GitLab, and Gitea requests are in flight simultaneously instead of one after another - **Bounded fetch windows** — `startFetch()`/`resolveFetch()` accept optional `$since`/`$until` bounds, used by both the incremental aggregator and the refetch command - **PHPStan static analysis** — level 8 over `src/` and `tests/`, run via `composer phpstan` - `Contribution` and `ContributionCollection` typed entities - `CONTRIBUTIONS_RETENTION_DAYS` environment variable ### Changed - **Namespace renamed from `App` to `GitContributionGraph`** across the codebase, Composer autoloading, and routing config - Removed the Guzzle and GraphQL client bundles — GitHub requests now go through Symfony's `HttpClientInterface` directly, the same as GitLab and Gitea - HTTP client requests are capped (10s connect/first-byte timeout, 15s max duration) so a slow provider can no longer stall the render path - `docker-compose.yml` and `docker-compose.prod.yml` mount a `data` volume for the SQLite store and pass through `CONTRIBUTIONS_RETENTION_DAYS` - Dev Docker Compose override targets the `dev` build stage explicitly and mounts `vendor` read-write instead of as an anonymous volume ### Fixed - `ContributionCollection`'s variadic constructor now re-indexes its arguments with `array_values()`, avoiding non-sequential keys that didn't match its declared property type - `SvgRenderer` coerces `strtotime()` results to `int` before formatting dates - `docker-compose.prod.yml` was missing the `data` volume and `CONTRIBUTIONS_RETENTION_DAYS` env var present in `docker-compose.yml`, so contribution history would not survive a container recreate on that deployment path - `composer phpstan` no longer crashes with an out-of-memory error under the default 128M limit ### Documentation - README and `CLAUDE.md` updated to describe the SQLite store, incremental fetch, refetch command, and PHPStan setup; corrected several stale examples (test path, `/health` sample response, Docker volume mounts) - Added PHPDoc to the remaining public methods across `src/` ### Tests - Added tests for `ContributionStore`, `Contribution`, `ContributionCollection`, and `RefetchContributionsCommand` - Extended provider and aggregator tests to cover `$since`/`$until` windowing, concurrent-fetch failure modes, and store interactions ## [0.1.0] - 2026-05-30 ### Added - **FrankenPHP runtime** — base image migrated from `php-cli` to FrankenPHP Alpine for better performance and built-in web server support - **FrankenPHP worker mode** — Symfony worker script (`public/worker.php`) with request reuse and graceful reload - **Caddy configuration** — `docker/frankenphp/Caddyfile` and `Caddyfile.dev` for production and development setups - **Provider health probes** — `ProviderInterface` extended with `ping()` and `probe()` methods; `ProbeTrait` provides the shared implementation - **Per-provider status on `/health`** — the health endpoint now reports `ok`, `degraded`, or `down` for each configured provider (GitHub, GitLab, Gitea), along with an error code and latency - **Supporting value objects** — `ProviderStatus`, `ProviderStatusType`, `ProviderErrorCode`, and `ProviderHealthChecker` service - **`ContributionAggregator` service** — contribution merging logic extracted from `GraphController` into a dedicated, testable service ### Fixed - Optional environment variables (`GITLAB_URL`, `ALLOWED_HOSTS`, etc.) now have explicit empty default values in `docker-compose.yml`, preventing Docker Compose warnings on startup ### Changed - `SvgRenderer` is now `final` and declares `strict_types=1` ### Tests - Unit tests added for `ProbeTrait`, `ProviderHealthChecker`, `ProviderStatus`, `ContributionAggregator`, and all three provider probes (`GitHubProvider`, `GitLabProvider`, `GiteaProvider`) - `SvgRendererTest` refactored to follow project PHPUnit conventions (`#[Test]` attribute, `it_` prefix, Arrange/Act/Assert structure) ## [0.0.1] - 2025-01-01 ### Added - Initial release — GitHub, GitLab, and Gitea contribution graph as a self-hosted SVG endpoint - Light and dark theme support - Filesystem cache with 1-hour TTL - Docker multi-stage build (`base → deps → build → final`) - Basic `/health` endpoint [Unreleased]: https://github.com/ArthurErlich/git-contribution-graph/compare/0.2.2...HEAD [0.2.2]: https://github.com/ArthurErlich/git-contribution-graph/compare/0.2.1...0.2.2 [0.2.1]: https://github.com/ArthurErlich/git-contribution-graph/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/ArthurErlich/git-contribution-graph/compare/0.1.0...0.2.0 [0.1.0]: https://github.com/ArthurErlich/git-contribution-graph/compare/0.0.1...0.1.0 [0.0.1]: https://github.com/ArthurErlich/git-contribution-graph/releases/tag/0.0.1