Compare commits
26
Commits
0.1.0
..
406da07397
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
406da07397 | ||
|
|
d5d948f423 | ||
|
|
a6e904fc61 | ||
|
|
980463f715 | ||
|
|
095b9675f9 | ||
|
|
8dbfef8496 | ||
|
|
a527eada56 | ||
|
|
423ac5470d | ||
|
|
4e992c8f79 | ||
|
|
4983492088 | ||
|
|
169fa8c76a | ||
|
|
4cefba1a37 | ||
|
|
28a0916487 | ||
|
|
4cfa61f1c0 | ||
|
|
2f3268c0b7 | ||
|
|
89d0e2b0f6 | ||
|
|
fad176419c | ||
|
|
3743ba31d2 | ||
|
|
8a675cf02f | ||
|
|
20c5acc5ae | ||
|
|
21867256e8 | ||
|
|
67d4a50ee1 | ||
|
|
e72ee2541e | ||
|
|
ecdb8c1716 | ||
|
|
841f4329de | ||
|
|
50256c97ef |
+32
-1
@@ -1,6 +1,37 @@
|
||||
# Build descriptors (not application code)
|
||||
Dockerfile*
|
||||
|
||||
# Version control
|
||||
.git
|
||||
.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/
|
||||
|
||||
# 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
|
||||
docker-compose.override.yml
|
||||
|
||||
@@ -15,7 +15,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Release tag (semver, e.g. 1.2.3)'
|
||||
description: "Release tag (semver, e.g. 1.2.3)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
@@ -55,8 +55,6 @@ jobs:
|
||||
images: ${{ env.REGISTRY }}/${{ gitea.repository }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}},value=${{ inputs.tag }}
|
||||
type=semver,pattern={{major}}.{{minor}},value=${{ inputs.tag }}
|
||||
type=semver,pattern={{major}},value=${{ inputs.tag }}
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ gitea.server_url }}/${{ gitea.repository }}
|
||||
|
||||
@@ -75,10 +73,22 @@ jobs:
|
||||
username: ${{ gitea.actor }}
|
||||
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
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
target: final
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
@@ -3,5 +3,4 @@
|
||||
/vendor/
|
||||
/var/
|
||||
/public/bundles/
|
||||
composer.lock
|
||||
/.phpunit.cache
|
||||
|
||||
+27
-25
@@ -1,9 +1,16 @@
|
||||
#syntax=docker/dockerfile:1
|
||||
|
||||
FROM dunglas/frankenphp:1-php8.4-alpine AS base
|
||||
|
||||
RUN apk add --no-cache \
|
||||
curl \
|
||||
icu-libs \
|
||||
libzip
|
||||
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-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
|
||||
|
||||
@@ -21,34 +28,29 @@ RUN composer install \
|
||||
# ── build stage (generate optimised classmap with source present) ──────────────
|
||||
FROM deps AS build
|
||||
COPY . .
|
||||
RUN composer dump-autoload --optimize --no-dev --no-interaction
|
||||
|
||||
# ── dev stage (all deps + Xdebug, source is mounted at runtime) ───────────────
|
||||
FROM base AS dev
|
||||
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"]
|
||||
RUN composer dump-autoload --classmap-authoritative --no-dev --no-interaction && \
|
||||
mkdir -p var/cache var/log && \
|
||||
APP_ENV=prod APP_SECRET=placeholder php bin/console cache:warmup --no-debug && \
|
||||
composer dump-env prod
|
||||
|
||||
# ── final (prod) stage — no composer binary ────────────────────────────────────
|
||||
FROM base AS final
|
||||
|
||||
RUN addgroup -S app && adduser -S -G app app
|
||||
|
||||
COPY --from=build /app/vendor /app/vendor
|
||||
COPY . .
|
||||
COPY docker/frankenphp/Caddyfile /etc/caddy/Caddyfile
|
||||
COPY --link --from=build /app/vendor /app/vendor
|
||||
COPY --link --from=build /app/var/cache/prod /app/var/cache/prod
|
||||
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 \
|
||||
&& chown -R app:app /app
|
||||
RUN chmod +x bin/console && \
|
||||
mkdir -p var/cache/prod/pools var/log /config/caddy /data/caddy && \
|
||||
chown -R app:app /app /config /data
|
||||
|
||||
USER app
|
||||
|
||||
|
||||
@@ -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"]
|
||||
@@ -29,7 +29,7 @@ https://your-host/graph.svg?theme=dark
|
||||
|
||||
### 1. Create a `docker-compose.yml`
|
||||
|
||||
Use the pre-built image — no need to clone the repo:
|
||||
Use the pre-built image
|
||||
|
||||
```yaml
|
||||
services:
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
services:
|
||||
graph:
|
||||
build:
|
||||
target: dev
|
||||
dockerfile: Dockerfile.dev
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/vendor # keeps vendor from the dev image, not your local dir
|
||||
|
||||
@@ -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
@@ -21,13 +21,14 @@ services:
|
||||
GITEA_TOKEN: "${GITEA_TOKEN:-}"
|
||||
GITEA_URL: "${GITEA_URL:-}"
|
||||
volumes:
|
||||
- cache:/app/var/cache
|
||||
- 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
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
cache:
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
opcache.validate_timestamps=1
|
||||
opcache.revalidate_freq=0
|
||||
@@ -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 |
@@ -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+)"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,8 +5,8 @@ declare(strict_types=1);
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Service\ContributionAggregator;
|
||||
use App\Service\ProviderHealthChecker;
|
||||
use App\Service\SvgRenderer;
|
||||
use App\Service\Provider\ProviderHealthChecker;
|
||||
use App\Service\Renderer\SvgRenderer;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use App\Service\Provider\ProviderInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\DependencyInjection\Attribute\AutowireIterator;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClient;
|
||||
use IDCI\Bundle\GraphQLClientBundle\Client\GraphQLApiClientRegistryInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
enum ProviderErrorCode: string
|
||||
{
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Attribute\AutowireIterator;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
interface ProviderInterface
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
final class ProviderStatus
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Provider;
|
||||
|
||||
enum ProviderStatusType: string
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Service\Renderer;
|
||||
|
||||
/**
|
||||
* Renders a GitHub-style contribution heatmap as an inline SVG.
|
||||
@@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Tests\Unit\Service;
|
||||
|
||||
use App\Service\ContributionAggregator;
|
||||
use App\Service\ProviderInterface;
|
||||
use App\Service\Provider\ProviderInterface;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
|
||||
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\GraphQLApiClientRegistryInterface;
|
||||
use IDCI\Bundle\GraphQLClientBundle\Query\GraphQLQuery;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
|
||||
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\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
|
||||
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\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
+5
-5
@@ -2,12 +2,12 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Unit\Service;
|
||||
namespace App\Tests\Unit\Service\Provider;
|
||||
|
||||
use App\Service\ProbeTrait;
|
||||
use App\Service\ProviderErrorCode;
|
||||
use App\Service\ProviderInterface;
|
||||
use App\Service\ProviderStatusType;
|
||||
use App\Service\Provider\ProbeTrait;
|
||||
use App\Service\Provider\ProviderErrorCode;
|
||||
use App\Service\Provider\ProviderInterface;
|
||||
use App\Service\Provider\ProviderStatusType;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
+6
-6
@@ -2,13 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Unit\Service;
|
||||
namespace App\Tests\Unit\Service\Provider;
|
||||
|
||||
use App\Service\ProviderErrorCode;
|
||||
use App\Service\ProviderHealthChecker;
|
||||
use App\Service\ProviderInterface;
|
||||
use App\Service\ProviderStatus;
|
||||
use App\Service\ProviderStatusType;
|
||||
use App\Service\Provider\ProviderErrorCode;
|
||||
use App\Service\Provider\ProviderHealthChecker;
|
||||
use App\Service\Provider\ProviderInterface;
|
||||
use App\Service\Provider\ProviderStatus;
|
||||
use App\Service\Provider\ProviderStatusType;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
+4
-4
@@ -2,11 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\Unit\Service;
|
||||
namespace App\Tests\Unit\Service\Provider;
|
||||
|
||||
use App\Service\ProviderErrorCode;
|
||||
use App\Service\ProviderStatus;
|
||||
use App\Service\ProviderStatusType;
|
||||
use App\Service\Provider\ProviderErrorCode;
|
||||
use App\Service\Provider\ProviderStatus;
|
||||
use App\Service\Provider\ProviderStatusType;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
|
||||
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\DataProvider;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
Reference in New Issue
Block a user