26 Commits
Author SHA1 Message Date
haylan 406da07397 chore(todod): proposal plane for sotaged the history 2026-07-02 07:30:01 +02:00
haylan d5d948f423 Merge pull request 'chore(deps): update dependency eightpoints/guzzle-bundle to v8.7.0' (#11) from renovate/eightpoints-guzzle-bundle-8.x-lockfile into main
Reviewed-on: #11
2026-06-23 17:14:32 +00:00
renovate-bot a6e904fc61 chore(deps): update dependency eightpoints/guzzle-bundle to v8.7.0 2026-06-23 12:01:52 +00:00
haylan 980463f715 Merge pull request 'Update renovate.json' (#10) from change-renovate-configuration into main
Reviewed-on: #10
2026-06-04 00:44:33 +02:00
haylan 095b9675f9 Update renovate.json 2026-06-04 00:44:18 +02:00
haylan 8dbfef8496 Merge pull request 'refactor: reorgeniced Service/ into Provider/ and Renderer/ sub-namespaces' (#9) from refactor/service-namespaces into main
Reviewed-on: #9
2026-06-04 00:42:43 +02:00
haylan a527eada56 Merge pull request 'feat: add contribution graph favicon (ICO + PNG)' (#8) from feat/favicon into main
Reviewed-on: #8
2026-06-04 00:42:37 +02:00
haylan 423ac5470d Merge branch 'main' into refactor/service-namespaces 2026-06-04 00:42:28 +02:00
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
haylanandClaude Sonnet 4.6 2f3268c0b7 refactor: reorganise Service/ into Provider/ and Renderer/ sub-namespaces
Move all provider-related classes, enums, interface and trait into
App\Service\Provider; move SvgRenderer into App\Service\Renderer.
ContributionAggregator stays at the Service root as the orchestrator.
Test namespaces and use statements updated to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 00:10:09 +02:00
haylanandClaude Sonnet 4.6 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
haylanandClaude Sonnet 4.6 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
haylanandClaude Sonnet 4.6 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
36 changed files with 6486 additions and 69 deletions
+32 -1
View File
@@ -1,6 +1,37 @@
# Build descriptors (not application code)
Dockerfile*
# Version control
.git .git
.gitea .gitea
# AI / IDE tooling
.claude
# Dev tooling
.gitignore
/.phpunit.cache
phpunit.xml.dist
tests/
# Documentation
CHANGELOG.md
CLAUDE.md
README.md
# Compose / deployment descriptors (not app code)
docker-compose.yml
docker-compose.override.yml
docker-compose.prod.yml
# Dependencies — re-installed from lockfile in the build stage;
# a local vendor/ in the build context would silently override the clean install
vendor/
# Runtime dirs (generated at build or run time, not from source)
var/ var/
# Env files — .env contains only placeholder defaults and is needed by composer dump-env;
# local overrides with real secrets stay excluded
.env.local .env.local
.env.*.local .env.*.local
docker-compose.override.yml
+13 -3
View File
@@ -15,7 +15,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
tag: tag:
description: 'Release tag (semver, e.g. 1.2.3)' description: "Release tag (semver, e.g. 1.2.3)"
required: true required: true
type: string type: string
@@ -55,8 +55,6 @@ jobs:
images: ${{ env.REGISTRY }}/${{ gitea.repository }} images: ${{ env.REGISTRY }}/${{ gitea.repository }}
tags: | tags: |
type=semver,pattern={{version}},value=${{ inputs.tag }} type=semver,pattern={{version}},value=${{ inputs.tag }}
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.tag }}
type=semver,pattern={{major}},value=${{ inputs.tag }}
labels: | labels: |
org.opencontainers.image.source=${{ gitea.server_url }}/${{ gitea.repository }} org.opencontainers.image.source=${{ gitea.server_url }}/${{ gitea.repository }}
@@ -75,10 +73,22 @@ jobs:
username: ${{ gitea.actor }} username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
# Build a single-arch image locally so Trivy can inspect it before the real push.
- name: Build local image for scanning
uses: docker/build-push-action@v5
with:
context: .
target: final
platforms: linux/amd64
load: true
tags: scan-target:${{ inputs.tag }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ gitea.repository }}:buildcache
- name: Build and push - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
target: final
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
-1
View File
@@ -3,5 +3,4 @@
/vendor/ /vendor/
/var/ /var/
/public/bundles/ /public/bundles/
composer.lock
/.phpunit.cache /.phpunit.cache
+27 -25
View File
@@ -1,9 +1,16 @@
#syntax=docker/dockerfile:1
FROM dunglas/frankenphp:1-php8.4-alpine AS base FROM dunglas/frankenphp:1-php8.4-alpine AS base
RUN apk add --no-cache \ RUN apk add --no-cache icu-dev libzip-dev \
curl \ && docker-php-ext-install -j$(nproc) intl opcache zip \
icu-libs \ && apk del icu-dev libzip-dev \
libzip && apk add --no-cache curl icu-libs libzip \
&& cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& mkdir -p $PHP_INI_DIR/app.conf.d
ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d"
ENV COMPOSER_ALLOW_SUPERUSER=1
WORKDIR /app WORKDIR /app
@@ -21,34 +28,29 @@ RUN composer install \
# ── build stage (generate optimised classmap with source present) ────────────── # ── build stage (generate optimised classmap with source present) ──────────────
FROM deps AS build FROM deps AS build
COPY . . COPY . .
RUN composer dump-autoload --optimize --no-dev --no-interaction RUN composer dump-autoload --classmap-authoritative --no-dev --no-interaction && \
mkdir -p var/cache var/log && \
# ── dev stage (all deps + Xdebug, source is mounted at runtime) ─────────────── APP_ENV=prod APP_SECRET=placeholder php bin/console cache:warmup --no-debug && \
FROM base AS dev composer dump-env prod
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
RUN apk add --no-cache ${PHPIZE_DEPS} linux-headers \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del ${PHPIZE_DEPS}
COPY docker/php/xdebug.ini /usr/local/etc/php/conf.d/docker-xdebug.ini
COPY docker/frankenphp/Caddyfile.dev /etc/caddy/Caddyfile
COPY composer.json composer.lock* ./
RUN composer install --no-scripts --no-interaction --prefer-dist
EXPOSE 8080
ENV APP_ENV=dev APP_DEBUG=1
CMD ["frankenphp", "run", "--config", "/etc/caddy/Caddyfile"]
# ── final (prod) stage — no composer binary ──────────────────────────────────── # ── final (prod) stage — no composer binary ────────────────────────────────────
FROM base AS final FROM base AS final
RUN addgroup -S app && adduser -S -G app app RUN addgroup -S app && adduser -S -G app app
COPY --from=build /app/vendor /app/vendor COPY --link --from=build /app/vendor /app/vendor
COPY . . COPY --link --from=build /app/var/cache/prod /app/var/cache/prod
COPY docker/frankenphp/Caddyfile /etc/caddy/Caddyfile COPY --link bin/ ./bin/
COPY --link config/ ./config/
COPY --link public/ ./public/
COPY --link src/ ./src/
COPY --link composer.json composer.lock ./
COPY --link docker/frankenphp/Caddyfile /etc/caddy/Caddyfile
COPY --link docker/php/conf.d/20-app.prod.ini $PHP_INI_DIR/app.conf.d/
RUN mkdir -p var/cache var/log \ RUN chmod +x bin/console && \
&& chown -R app:app /app mkdir -p var/cache/prod/pools var/log /config/caddy /data/caddy && \
chown -R app:app /app /config /data
USER app USER app
+30
View File
@@ -0,0 +1,30 @@
FROM dunglas/frankenphp:1-php8.4-alpine
RUN apk add --no-cache icu-dev libzip-dev \
&& docker-php-ext-install -j$(nproc) intl opcache zip \
&& apk del icu-dev libzip-dev \
&& apk add --no-cache curl icu-libs libzip \
&& cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \
&& mkdir -p $PHP_INI_DIR/app.conf.d
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
RUN apk add --no-cache ${PHPIZE_DEPS} linux-headers \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del ${PHPIZE_DEPS}
ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d"
ENV COMPOSER_ALLOW_SUPERUSER=1
WORKDIR /app
COPY docker/php/xdebug.ini /usr/local/etc/php/conf.d/docker-xdebug.ini
COPY docker/php/conf.d/20-app.dev.ini $PHP_INI_DIR/app.conf.d/
COPY docker/frankenphp/Caddyfile.dev /etc/caddy/Caddyfile
COPY composer.json composer.lock* ./
RUN composer install --no-scripts --no-interaction --prefer-dist
EXPOSE 8080
ENV APP_ENV=dev APP_DEBUG=1
CMD ["frankenphp", "run", "--config", "/etc/caddy/Caddyfile"]
+1 -1
View File
@@ -29,7 +29,7 @@ https://your-host/graph.svg?theme=dark
### 1. Create a `docker-compose.yml` ### 1. Create a `docker-compose.yml`
Use the pre-built image — no need to clone the repo: Use the pre-built image
```yaml ```yaml
services: services:
+133
View File
@@ -0,0 +1,133 @@
# TODO: persist contribution history in SQLite + audit cleanup
Backend-only work. Follow Red → Green → Refactor per `CLAUDE.md` for every
step that adds behavior (store, retention, provider `$since` handling).
Order matters — later steps assume earlier ones are done.
## 1. Audit cleanup
- [ ] **Remove `eightpoints/guzzle-bundle` + `idci/graphql-client-bundle`.**
They exist only to build one near-static GitHub GraphQL query string
(`GitHubProvider.php:59-74`); the bundle's own HTTP transport is already
bypassed (comment at `GitHubProvider.php:76-77`). Replace
`$graphqlClient->buildQuery(...)->getGraphQLQuery()` with a plain
`sprintf`/heredoc query string. Delete the two packages from
`composer.json`, `config/bundles.php`, and delete
`config/packages/eight_points_guzzle.yaml` +
`config/packages/idci_graphql_client.yaml`. Run `composer update` and
commit the regenerated `composer.lock`.
- [ ] **Dedupe `baseUrl` normalization.** `GitLabProvider.php` (lines 41,
53) and `GiteaProvider.php` (lines 42, 54) each call
`rtrim($this->baseUrl..., '/')` twice — once in `ping()`, once in
`fetch()`. Compute it once as a `private readonly string $baseUrl` in
the constructor instead.
## 2. Fix stale `config/services.yaml` (found during exploration, blocks step 1 & 4)
- [ ] `services.yaml` still binds `$username`/`$token`/`$baseUrl` to the
pre-refactor FQCNs (`App\Service\GitHubProvider` etc.) and
`_instanceof: App\Service\ProviderInterface`, left over from the
`Service/``Provider/`+`Renderer/` namespace reorg. Update all of
these to `App\Service\Provider\...`. Currently these bindings silently
no-op, and scalar constructor args can't autowire without them — any
edit to these constructors (steps 1, 4) needs this fixed first, or the
container fails to compile.
## 3. `ContributionStore` (SQLite via native PDO)
- [ ] New `src/Service/ContributionStore.php`. PDO SQLite, DB file at
`%kernel.project_dir%/var/data/contributions.db` (configurable
constructor arg), table created lazily:
```sql
CREATE TABLE IF NOT EXISTS contributions (
provider TEXT NOT NULL,
date TEXT NOT NULL,
count INTEGER NOT NULL,
PRIMARY KEY (provider, date)
);
```
- [ ] `latestDate(string $provider): ?string` — `SELECT MAX(date) WHERE provider = ?`.
- [ ] `merge(string $provider, array $dateCounts): void` — upsert via
`INSERT ... ON CONFLICT(provider, date) DO UPDATE SET count = excluded.count`.
- [ ] `all(string $provider, ?int $sinceDays = null): array` — `date => count`;
`null` returns full history (no arbitrary cutoff), a value filters to the
last N days.
- [ ] `prune(): void` — `DELETE FROM contributions WHERE date < ?` using
the configured retention window; no-ops if retention is unset/0.
- [ ] Constructor takes `?int $retentionDays` bound from new env var
`CONTRIBUTIONS_RETENTION_DAYS` (empty/default = keep forever).
- [ ] Tests: `tests/Unit/Service/ContributionStoreTest.php` — store &
retrieve, upsert overwrites existing date, `sinceDays` filtering,
`prune()` no-ops when retention unset, `prune()` deletes rows older
than the window when set.
## 4. Wire `$since` through providers
- [ ] `ProviderInterface::fetch()` → `fetch(?\DateTimeImmutable $since = null): array`.
- [ ] `GitHubProvider::fetch()` — use `$since ?? new \DateTimeImmutable('-365 days')`
for the GraphQL `from` param.
- [ ] `GitLabProvider::fetch()` — same, feeds the `after` query param
(this is what actually shrinks the pagination loop).
- [ ] `GiteaProvider::fetch()` — same, feeds the `$cutoff` timestamp filter.
- [ ] Update `GitHubProviderTest.php` (drop `GraphQLApiClientRegistryInterface`
stub setup entirely per step 1), `GitLabProviderTest.php`,
`GiteaProviderTest.php` — add a case asserting a passed `$since` narrows
the request window.
## 5. Wire `ContributionStore` into `ContributionAggregator`
- [ ] Inject `ContributionStore` into `ContributionAggregator`.
- [ ] Per configured provider: `$since = $store->latestDate($name)` → if
set, `(new \DateTimeImmutable($latest))->modify('-3 days')` (3-day
overlap for late corrections), else `null` (first run).
- [ ] `$fresh = $provider->fetch($since)`, `$store->merge($name, $fresh)`,
then read back `$store->all($name, sinceDays: 371)` for the render
window (53 weeks × 7 days) and merge into the returned array.
- [ ] Call `$store->prune()` once per `aggregate()` call, after all
providers have merged.
- [ ] Keep the existing try/catch-and-log-per-provider behavior — a
provider failure leaves its DB history stale, doesn't break the render.
- [ ] Update `ContributionAggregatorTest.php` with store-interaction and
prune-call cases.
## 6. Docker / env
- [ ] `docker-compose.yml` — add a `data` named volume mounted at
`/app/var/data` (same pattern as `cache`/`logs`), and pass through
`CONTRIBUTIONS_RETENTION_DAYS: "${CONTRIBUTIONS_RETENTION_DAYS:-}"`.
- [ ] `Dockerfile` — add `var/data` to the `mkdir -p` in the `final` stage
alongside `var/cache/prod/pools var/log`, owned by `app`.
- [ ] `.env` — document `CONTRIBUTIONS_RETENTION_DAYS` (empty by default),
same style as the existing `ALLOWED_HOSTS` comment.
## 7. PHPStan
- [ ] `composer require --dev phpstan/phpstan` (plain PHPStan — no
Symfony extension needed for this app's size).
- [ ] Add `phpstan.neon`: `paths: [src, tests]`, `level: 8`.
- [ ] Add composer script `"phpstan": "phpstan analyse"`.
- [ ] Fix whatever level-8 flags on first run.
## 8. `CLAUDE.md` update
- [ ] Architecture section: add the `ContributionStore` (SQLite) tier
between providers and the renderer; note the two-tier cache (1h SVG
cache → SQLite raw-data store → provider APIs).
- [ ] Environment variables table: add `CONTRIBUTIONS_RETENTION_DAYS`.
- [ ] Development section: add `composer phpstan` next to the existing
`vendor/bin/phpunit` commands.
- [ ] Remove any remaining mentions of the two deleted bundles.
## Verification
- `vendor/bin/phpunit --testdox` green after every step.
- `composer phpstan` clean at level 8.
- `composer install` succeeds with no dangling references to the removed bundles.
- `docker compose up -d --build`; clear the FS cache
(`docker compose exec graph rm -rf var/cache/*`); hit
`/graph.svg?theme=dark` twice; check `docker compose logs -f graph` shows
a narrower `since` window on the second fetch.
- Set `CONTRIBUTIONS_RETENTION_DAYS=30`; confirm rows older than 30 days
are gone after the next refresh
(`sqlite3 var/data/contributions.db "SELECT date FROM contributions ORDER BY date LIMIT 1"`).
- `curl localhost:8080/health` still reports all configured providers healthy.
Generated
+6141
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,7 +3,7 @@
services: services:
graph: graph:
build: build:
target: dev dockerfile: Dockerfile.dev
volumes: volumes:
- .:/app - .:/app
- /app/vendor # keeps vendor from the dev image, not your local dir - /app/vendor # keeps vendor from the dev image, not your local dir
+32
View File
@@ -0,0 +1,32 @@
services:
graph:
image: git.arthurerlich.de/haylan/git-contribution-graph:latest
container_name: git-contribution-graph
restart: unless-stopped
ports:
- "8080:8080"
environment:
APP_ENV: prod
APP_DEBUG: "0"
APP_SECRET: "${APP_SECRET}"
ALLOWED_HOSTS: "${ALLOWED_HOSTS:-}"
GITHUB_USER: "${GITHUB_USER:-}"
GITHUB_TOKEN: "${GITHUB_TOKEN:-}"
GITLAB_USER: "${GITLAB_USER:-}"
GITLAB_TOKEN: "${GITLAB_TOKEN:-}"
GITLAB_URL: "${GITLAB_URL:-}"
GITEA_USER: "${GITEA_USER:-}"
GITEA_TOKEN: "${GITEA_TOKEN:-}"
GITEA_URL: "${GITEA_URL:-}"
volumes:
- cache:/app/var/cache/prod/pools
- logs:/app/var/log
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 5s
retries: 3
volumes:
cache:
logs:
+2 -1
View File
@@ -21,13 +21,14 @@ services:
GITEA_TOKEN: "${GITEA_TOKEN:-}" GITEA_TOKEN: "${GITEA_TOKEN:-}"
GITEA_URL: "${GITEA_URL:-}" GITEA_URL: "${GITEA_URL:-}"
volumes: volumes:
- cache:/app/var/cache - cache:/app/var/cache/prod/pools
- logs:/app/var/log - logs:/app/var/log
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"] test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s interval: 30s
timeout: 5s timeout: 5s
retries: 3 retries: 3
start_period: 10s
volumes: volumes:
cache: cache:
+2
View File
@@ -0,0 +1,2 @@
opcache.validate_timestamps=1
opcache.revalidate_freq=0
+6
View File
@@ -0,0 +1,6 @@
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=128
opcache.max_accelerated_files=20000
opcache.validate_timestamps=0
expose_php=0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

+29
View File
@@ -0,0 +1,29 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"separateMajorMinor": true,
"major": {
"enabled": false
},
"packageRules": [
{
"allowedVersions": "^7.0",
"description": "Keep Symfony on 7.x LTS until EOL",
"matchPackageNames": [
"/^symfony//"
]
},
{
"matchManagers": ["github-actions"],
"enabled": false,
"description": "Ignore GitHub Actions — no GITHUB_COM_TOKEN available"
},
{
"matchPackageNames": ["phpunit/phpunit"],
"allowedVersions": "^12.0",
"description": "Stay on PHPUnit 12.x (compatible with Symfony 7 / PHP 8.2+)"
}
]
}
+2 -2
View File
@@ -5,8 +5,8 @@ declare(strict_types=1);
namespace App\Controller; namespace App\Controller;
use App\Service\ContributionAggregator; use App\Service\ContributionAggregator;
use App\Service\ProviderHealthChecker; use App\Service\Provider\ProviderHealthChecker;
use App\Service\SvgRenderer; use App\Service\Renderer\SvgRenderer;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
+1
View File
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Service; namespace App\Service;
use App\Service\Provider\ProviderInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\Attribute\AutowireIterator; use Symfony\Component\DependencyInjection\Attribute\AutowireIterator;
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClient; use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClient;
use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClientRegistryInterface; use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClientRegistryInterface;
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
enum ProviderErrorCode: string enum ProviderErrorCode: string
{ {
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
use Symfony\Component\DependencyInjection\Attribute\AutowireIterator; use Symfony\Component\DependencyInjection\Attribute\AutowireIterator;
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
interface ProviderInterface interface ProviderInterface
{ {
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
final class ProviderStatus final class ProviderStatus
{ {
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Provider;
enum ProviderStatusType: string enum ProviderStatusType: string
{ {
@@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Service; namespace App\Service\Renderer;
/** /**
* Renders a GitHub-style contribution heatmap as an inline SVG. * Renders a GitHub-style contribution heatmap as an inline SVG.
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service;
use App\Service\ContributionAggregator; use App\Service\ContributionAggregator;
use App\Service\ProviderInterface; use App\Service\Provider\ProviderInterface;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
@@ -2,9 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service\Provider;
use App\Service\GitHubProvider; use App\Service\Provider\GitHubProvider;
use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClient; use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClient;
use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClientRegistryInterface; use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClientRegistryInterface;
use IDCI\Bundle\GraphQLClientBundle\Query\GraphQLQuery; use IDCI\Bundle\GraphQLClientBundle\Query\GraphQLQuery;
@@ -2,9 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service\Provider;
use App\Service\GitLabProvider; use App\Service\Provider\GitLabProvider;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
@@ -2,9 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service\Provider;
use App\Service\GiteaProvider; use App\Service\Provider\GiteaProvider;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
@@ -2,12 +2,12 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service\Provider;
use App\Service\ProbeTrait; use App\Service\Provider\ProbeTrait;
use App\Service\ProviderErrorCode; use App\Service\Provider\ProviderErrorCode;
use App\Service\ProviderInterface; use App\Service\Provider\ProviderInterface;
use App\Service\ProviderStatusType; use App\Service\Provider\ProviderStatusType;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
@@ -2,13 +2,13 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service\Provider;
use App\Service\ProviderErrorCode; use App\Service\Provider\ProviderErrorCode;
use App\Service\ProviderHealthChecker; use App\Service\Provider\ProviderHealthChecker;
use App\Service\ProviderInterface; use App\Service\Provider\ProviderInterface;
use App\Service\ProviderStatus; use App\Service\Provider\ProviderStatus;
use App\Service\ProviderStatusType; use App\Service\Provider\ProviderStatusType;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
@@ -2,11 +2,11 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service\Provider;
use App\Service\ProviderErrorCode; use App\Service\Provider\ProviderErrorCode;
use App\Service\ProviderStatus; use App\Service\Provider\ProviderStatus;
use App\Service\ProviderStatusType; use App\Service\Provider\ProviderStatusType;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
@@ -2,9 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
namespace App\Tests\Unit\Service; namespace App\Tests\Unit\Service\Renderer;
use App\Service\SvgRenderer; use App\Service\Renderer\SvgRenderer;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\Attributes\Test;