Skip to content

v2.3: Code review fixes, Docker deployment, and documentation update#18

Merged
devsimsek merged 14 commits into
mainfrom
dev
Jun 12, 2026
Merged

v2.3: Code review fixes, Docker deployment, and documentation update#18
devsimsek merged 14 commits into
mainfrom
dev

Conversation

@devsimsek

Copy link
Copy Markdown
Owner

Summary

Bump version to v2.3 with code review bug fixes, new Docker deployment infrastructure, and comprehensive documentation update.

Code Review Fixes

# File Fix
1 UserProvider.php retrieveByCredentials() iterates all credential fields, skips password
2 Scope.php Added validate() method with allowlist enforcement
3 SessionGuard.php login() throws RuntimeException when user id is null
4 sdf/cli getPortArg() changed from static $GLOBALS to instance method
5 sdf/cli SQLite DSN guards against double sqlite: prefix
6 RedisDriver.php setMultiple() checks availability before multi/exec
7 FileDriver.php saveTagIndex() adds LOCK_EX for concurrent safety
8 Cache.php normalizeKey() removes !- violating PSR-16 charset
9 Router.php Regex delimiter changed from # to ~ to avoid URL collision
10 ModelTimestampTest.php Removed brittle sleep(1) dependency

Docker

  • Dockerfile — multi-stage (base/dev/production) with FrankenPHP
  • compose.yaml — app + MySQL 8.4 + Redis 7-alpine
  • Caddyfile — static serving, security headers, forbidden paths
  • .dockerignore — build exclusions

Documentation

  • README fully rewritten with all features, Docker guide, test stats
  • Version bumped to 2.3.0 throughout codebase

Tests: 428 tests, 763 assertions, 0 failures

…, queue, fuse inheritance) + home nav + skill update
…, Queue

- 110 new tests covering all new features
- Fix Job::getPayload() to use actual property values
- Fix Schema::buildCreateSql() to avoid double PK on SQLite
- Fix Translator::choice() double-colon replacement
- Fix Translator::matchesExplicitRule() to handle * wildcard
- 393 tests total, 710 assertions, 0 failures
- StorageDriver interface with 16 methods
- LocalDriver for local filesystem operations
- S3Driver using AWS SDK (optional soft dependency)
- Storage static facade with fromConfig() and disk() switching
- Config at app/config/storage.php
- 22 tests covering all operations
- 415 tests total, 743 assertions, 0 failures
- Auto created_at/updated_at on save (configurable via )
- Soft delete with deleted_at column ( = true)
- withTrashed() / onlyTrashed() query scopes
- restore() / forceDelete() / trashed() methods
- QueryBuilder IS NOT NULL support
- 13 tests, 428 total, 761 assertions, 0 failures
- Bump version to 2.3.0 throughout the codebase
- UserProvider::retrieveByCredentials() iterates all credential fields
- Scope::validate() with allowlist enforcement
- SessionGuard::login() throws on null user id
- CLI getPortArg() changed to instance method using $this->argv
- CLI SQLite DSN guards against double 'sqlite:' prefix
- RedisDriver::setMultiple() checks availability before transaction
- FileDriver::saveTagIndex() adds LOCK_EX
- Cache::normalizeKey() complies with PSR-16 charset
- Router regex delimiter # -> ~ to avoid URL collision
- ModelTimestampTest removes brittle sleep(1)
- Add Dockerfile (multi-stage), compose.yaml, Caddyfile, .dockerignore
- Update README with all features, Docker guide, test stats
@devsimsek devsimsek self-assigned this Jun 12, 2026
@devsimsek devsimsek added the v2.3 label Jun 12, 2026
@devsimsek

devsimsek commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Code Review – v2.3

Reviewed 16 files changed in this pr.

Finding 1: Docker dev stage missing system deps + composer install (FIXED)

File: Dockerfile:28-50
Severity: HIGH
Issue: The dev stage starts fresh from dunglas/frankenphp:1-php8.4 (does not inherit from base), so it lacks system packages (git, unzip, libicu-dev, etc.) and never runs composer install. The /app/vendor/ directory would not exist in dev builds.
Fix applied: Added apt-get install for system packages and RUN composer install --no-interaction to the dev stage.

Finding 2: Unused variable in test (FIXED)

File: tests/ModelTimestampTest.php:77
Severity: LOW
Issue: $originalUpdated is assigned but never read after the sleep(1) was removed.
Fix applied: Removed the unused variable.

Finding 3: compose.yaml mounts gitignored composer.lock

File: compose.yaml:24
Severity: LOW
Issue: composer.lock is gitignored. If the host file doesn't exist, Docker creates an empty directory at the mount point, potentially breaking Composer inside the container.
Recommendation: Remove the composer.lock bind mount from the dev service, or ensure a fallback default.

All other changes look correct:

  • UserProvider::retrieveByCredentials() properly iterates all credential fields
  • Scope::validate() uses private ALL constant for allowlist
  • SessionGuard::login() throws RuntimeException on null ID
  • CLI getPortArg() now uses instance method correctly
  • Cache::normalizeKey() complies with PSR-16
  • Router #~ delimiter avoids URL collisions
  • RedisDriver/FileDriver concurrency fixes are correct
  • README and version bumps look accurate

Comment thread sdf/core/Spark.php
Comment thread Caddyfile

@devsimsek devsimsek left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the code I like and the code open code writes at the same time. Though there exist a few security issues which are well documented within youtrack. Ill fix em now.

Comment thread sdf/core/Request.php
@devsimsek

Copy link
Copy Markdown
Owner Author

Finally :)

@devsimsek devsimsek merged commit 618d830 into main Jun 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant