Commit Graph

54 Commits

Author SHA1 Message Date
haylan 4e992c8f79 Merge branch 'main' into feat/favicon 2026-06-04 00:42:11 +02:00
haylan 4983492088 Merge pull request 'chore(config): migrate Renovate config' (#7) from renovate/migrate-config into main
Reviewed-on: #7
2026-06-04 00:31:09 +02:00
renovate-bot 169fa8c76a chore(config): migrate config renovate.json 2026-06-03 22:29:25 +00:00
haylan 4cefba1a37 Merge pull request 'chore: Configure Renovate' (#5) from renovate/configure into main
Reviewed-on: #5
2026-06-03 10:42:26 +02:00
haylan 28a0916487 chore(renovate): pinned shymfony version, seperated major and minor. removed major upgrades 2026-06-03 10:37:49 +02:00
renovate-bot 4cfa61f1c0 Add renovate.json 2026-06-03 08:27:12 +00:00
haylan 89d0e2b0f6 feat: add contribution graph favicon (ICO + PNG)
Multi-size favicon.ico (16×16, 32×32, 48×48) and favicon.png built from
a 5×5 GitHub-green contribution graph grid on a dark #0d1117 background.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 00:00:06 +02:00
haylan fad176419c Merge pull request 'Fix/docker production' (#4) from fix/docker-production into main
Reviewed-on: #4
2026-05-30 23:43:06 +02:00
haylan 3743ba31d2 Merge branch 'main' into fix/docker-production 2026-05-30 23:42:57 +02:00
haylan 8a675cf02f fix: aligen docker image with symfyon stu 2026-05-30 17:28:59 +02:00
haylan 20c5acc5ae Merge pull request 'Update README.md' (#3) from haylan-patch-1 into main
Reviewed-on: #3
2026-05-30 16:51:50 +02:00
haylan 21867256e8 Update README.md 2026-05-30 16:51:42 +02:00
haylan 67d4a50ee1 chroe: removed test 2026-05-30 16:29:31 +02:00
haylan e72ee2541e fix: fixed build stages and docker images. Docker image is now sleeker. The pulbish build should now have less garbage 2026-05-30 16:14:51 +02:00
haylan ecdb8c1716 fix(docker): commit composer.lock and install intl extension
- Remove composer.lock from .gitignore so it is tracked and included in
  the build context; without it composer install resolves fresh versions
  on every CI build, causing cache/vendor mismatches that produce the
  RewindableGenerator and LazyGhostTrait runtime errors in prod
- Install the intl PHP extension in the base stage to remove the
  Symfony startup deprecation warning; icu-dev and libzip-dev are only
  kept for the compile step, then deleted to keep the layer lean

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 15:41:17 +02:00
haylan 841f4329de feat: removed patters x.x and x 2026-05-30 15:29:46 +02:00
haylan 50256c97ef build(docker): warm prod cache at build time and add prod compose file
- Run cache:warmup in the build stage so containers start with a
  pre-built Symfony kernel and DI container
- Scope the cache volume to var/cache/prod/pools where Symfony writes
  pool data, preserving the warmed kernel across container restarts
- Add docker-compose.prod.yml for deploying the registry image without
  the dev override being picked up automatically
- Expand .dockerignore to exclude vendor/, tests/, docs, compose files,
  and env files from the build context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 15:15:51 +02:00
haylan 2f66c65b30 Merge pull request 'feat: FrankenPHP runtime, per-provider health probes, and ContributionAggregator' (#2) from feat/frankenphp into main
Reviewed-on: #2
0.1.0
2026-05-30 14:32:10 +02:00
haylan 38312f549c docs: add CHANGELOG for 0.1.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:27:58 +02:00
haylan a8d5f205db docs: fix typos and reformat tables in CLAUDE.md
Fix "Prever" typo, add Windows WSL test runner command, and align
Markdown table columns for readability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:14:38 +02:00
haylan 85428826a0 test(provider): add unit tests for probe infrastructure and all providers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:14:06 +02:00
haylan 61b7735afc refactor(renderer): add strict_types declaration and make class final
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:13:51 +02:00
haylan c70d96c3aa feat(health): make /health report per-provider probe status
Introduce ProviderHealthChecker which probes each configured provider
via AutowireIterator. Wire it into GraphController so /health returns
detailed per-provider status and responds 503 when any provider is
in a degraded state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:13:24 +02:00
haylan d3b9463c57 feat(provider): implement ping and probe on GitHub, GitLab, and Gitea
Add getName() and ping() to each provider and wire ProbeTrait. Make
all classes final, add strict_types declarations, and replace generic
RuntimeException with typed HTTP exceptions so probe() can classify
auth failures and unreachable endpoints correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:13:14 +02:00
haylan 71bfb38028 feat(provider): add health-probe contract and supporting value objects
Add getName(), ping(), and probe() to ProviderInterface. Introduce
ProbeTrait to classify HTTP/transport exceptions into typed error codes,
ProviderStatus as the result value object, and ProviderStatusType /
ProviderErrorCode as backing enums.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:13:07 +02:00
haylan 225c614057 test(service): refactor SvgRendererTest to follow PHPUnit best practices
- Replace setUp() factory with direct instantiation (zero-param constructor)
- Add AAA blank-line separators to all test methods
- Consolidate theme + fallback tests behind a DataProvider
- Consolidate day-of-week label tests behind a DataProvider
- Split multi-assertion tests to one assertion per test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:58:23 +02:00
haylan c205fed14b refactor(controller): extract contribution aggregation into dedicated service
Move fetchAllContributions and merge logic from GraphController into a new
ContributionAggregator service. Replace deprecated TaggedIterator with
AutowireIterator throughout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:58:17 +02:00
haylan 3e3a6752af chore(dev): remove broken auto-run PHPUnit hook
The PostToolUse hook called php bin/phpunit directly, which does not
work inside the Docker-based dev setup. Remove it; tests should be
run via docker compose exec graph vendor/bin/phpunit as documented.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:39:39 +02:00
haylan 5b07eae672 docs: update installation guide to use pre-built image
Replace the clone-and-build workflow with a docker-compose snippet
that pulls the image directly from the Gitea container registry.
Add semver tag reference and rename steps to match the new flow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:39:33 +02:00
haylan 235e63bfc0 fix(config): add default empty values for optional env vars
Declare empty-string defaults for all optional env vars as Symfony
parameters so the container compiles without errors when GITHUB_USER,
GITLAB_TOKEN, GITEA_URL, etc. are not set in the environment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:39:29 +02:00
haylan 92380e534a feat(docker): migrate base image from php-cli to FrankenPHP Alpine
Replace php:8.4-cli-alpine3.21 with dunglas/frankenphp:1-php8.4-alpine.
No Go toolchain required — the official image ships as a pre-compiled
Alpine binary.

- Drop docker-php-ext-install opcache (FrankenPHP enables it by default)
- Both dev and final stages run frankenphp run --config /etc/caddy/Caddyfile
- Dev stage bakes in Caddyfile.dev (no worker mode, Xdebug compatible)
- Final stage bakes in production Caddyfile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:38:38 +02:00
haylan 4654a287a8 feat(app): add FrankenPHP worker script for Symfony
Boot the Symfony kernel once at startup, then loop with
frankenphp_handle_request() to handle every incoming request without
re-bootstrapping the framework. Supports MAX_REQUESTS env var for
graceful worker restarts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:38:27 +02:00
haylan 2427c07f4c feat(docker): add FrankenPHP Caddy configuration
Add production and dev Caddyfiles for FrankenPHP:
- Caddyfile: HTTP-only on :8080, auto_https off, worker mode
- Caddyfile.dev: same but without worker directive so Xdebug
  step-debugging remains functional; Caddy debug logging enabled

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:38:23 +02:00
haylan 7c1b893e09 chore: update docker image to php 8.4 2026-05-29 23:20:53 +02:00
haylan 4993fdca00 Update .env 2026-05-29 23:04:39 +02:00
haylan c4803ea5cb fix: fixed labeling to make contaienr apper correctly in the repo 2026-05-29 22:43:53 +02:00
haylan 19bfa4cf28 Update README.md 2026-05-29 22:37:25 +02:00
haylan e70d035672 feat: change to use token 2026-05-29 19:42:10 +02:00
haylan d57320cb77 fix: changed pipline to use workflow token instead self made one 2026-05-29 19:32:36 +02:00
haylan 5feae97dd3 feat: fix manuel pipline. to create a release tag or replace exisiting release 2026-05-29 19:20:32 +02:00
haylan cceda8abf2 feat: integrate Monolog for enhanced logging across providers and controller 0.0.1 2026-05-29 18:57:25 +02:00
haylan 8b8ec9ab2f feat: add redirect from index route to graph.svg with query parameters 2026-05-29 18:28:56 +02:00
haylan b3e79de069 fix: php unit startup command 2026-05-29 18:23:36 +02:00
haylan f3770f1c2a docs: update README with token configuration and Docker development instructions 2026-05-29 16:09:07 +02:00
haylan 56035096c6 feat: implement multi-provider architecture for contribution fetching and add Docker support 2026-05-29 11:51:05 +02:00
haylan 381b8f4489 docs: add TDD conventions and testing guide to CLAUDE.md
Covers testing file conventions, Red→Green→Refactor cycle with
example prompts, common anti-patterns, test runner commands, and
the auto-run hook setup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:09:44 +02:00
haylan fa035781fd fix(svg-renderer): correct date alignment and drop unused parameter
- modify('Sunday') → modify('last Sunday') so the grid start is
  reliably the prior Sunday when today is already Sunday
- Remove unused $totalW from renderLegend signature
- Remove unused GAP constant (value preserved inline as a comment on STEP)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:09:31 +02:00
haylan d1dce19832 refactor(github): migrate contribution query to GraphQL bundle
Use GraphQLApiClientRegistryInterface to build the query via the
bundle's query builder. Keep Symfony HttpClient for the actual POST
since GitHub requires application/json (the bundle's transport sends
form_params instead).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:09:25 +02:00
haylan 0c2a185927 test: add PHPUnit 11.5 unit test suite
- phpunit.xml.dist with unit suite and source coverage config
- .phpunit.cache excluded in .gitignore
- Initial SvgRendererTest as example test
- .claude/settings.json with PostToolUse hook to auto-run phpunit on edit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:09:17 +02:00
haylan ff44161a99 chore(deps): bump Symfony to 7.4 and add GraphQL client bundles
- symfony/* pinned to 7.4.* (was 7.1.*)
- eightpoints/guzzle-bundle ^8.6 and idci/graphql-client-bundle ^2.0 added
- phpunit/phpunit ^11.5 and symfony/phpunit-bridge ^7.4 added as dev deps
- Bundles registered in config/bundles.php
- Guzzle and GraphQL client configured via YAML package configs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 22:09:11 +02:00