Skip to content

Tipsy 2.0: PHP 8.3 modernization, Postgres-first, hot-path perf - #57

Merged
spacedevin merged 9 commits into
masterfrom
v2
Aug 7, 2026
Merged

Tipsy 2.0: PHP 8.3 modernization, Postgres-first, hot-path perf#57
spacedevin merged 9 commits into
masterfrom
v2

Conversation

@spacedevin

Copy link
Copy Markdown
Member

Summary

  • Modernize Tipsy for PHP 8.3+ with strict typing, PHPUnit 11, and GitHub Actions (zero runtime Composer deps preserved).
  • Make PostgreSQL the default DB driver with dialect-aware Resource SQL; MySQL/SQLite remain supported.
  • Ship working examples, Hello World benchmarks, UPGRADING docs, and measurable hot-path routing/DI/request optimizations (~6–9% Hello World RPS).

Test plan

  • CI green on PHP 8.3/8.4 × pgsql/mysql
  • composer test locally against Postgres and MySQL
  • Smoke each example under examples/ (COMPOSER_MIRROR_PATH_REPOS=1 composer install)
  • Optional: ab -n 5000 -c 50 against benchmarks/hello-world

Port the core to strict types and PHPUnit 11, replace Travis with GitHub Actions, document upgrades, and ship working examples plus a Hello World benchmark baseline while keeping zero runtime dependencies.
Use exact string matching for static routes, avoid reverse-array allocations, cache request methods, and slim DI/path parsing. Also stop PHPUnit coverage from following example path-repo symlinks.
Resource now emits dialect-aware SQL via quoteIdent, tests default to pgsql, and MysqlToPgsql remains an optional opt-in for raw MySQL SQL against Postgres.
@gitguardian

gitguardian Bot commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
35863986 Triggered Generic Password b726b75 .github/workflows/ci.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Drop php -c (it wiped xdebug coverage), remove deprecated E_STRICT for PHP 8.4, use trust-auth Postgres (no hardcoded CI password), and rename travis DB configs to ci.
@spacedevin

Copy link
Copy Markdown
Member Author

CI update: GitHub Actions is green across PHP 8.3/8.4 × pgsql/mysql (coverage on 8.3/pgsql).

GitGuardian: the remaining failure is a false positive on historical commit b726b75 (POSTGRES_PASSWORD: postgres for an ephemeral Postgres service). HEAD now uses POSTGRES_HOST_AUTH_METHOD: trust with an empty password — no real secret. Clearing the check requires rewriting v2 history (force-push) to drop that line from the commit graph; say the word if you want that done.

Mirror the tish flow: matrix tests + coverage, semantic-release dry-run on master/main, GitHub prerelease, then Packagist publish when the prerelease is promoted.
@spacedevin

Copy link
Copy Markdown
Member Author

CI/release pipeline (tish-style, PHP-adapted) is on v2:

  1. CI (test, coverage, release) — PHP 8.3/8.4 × pgsql/mysql + coverage; on master/main push, semantic-release dry-run → GitHub prerelease
  2. Packagist release — runs when that prerelease is promoted to a full release (pings Packagist)

Docs: docs/RELEASE.md

One-time secrets to add: PACKAGIST_USERNAME, PACKAGIST_TOKEN (optional: CODECOV_TOKEN).

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Test results (PHPUnit)

187 tests   181 ✅  1s ⏱️
 24 suites    6 💤
  1 files      0 ❌

Results for commit 94da972.

♻️ This comment has been updated with latest results.

Stock angular ignores feat!: (no type → no release). Switch Tipsy to the
conventionalcommits preset and document BREAKING CHANGE footers as the
reliable major trigger.
Db now keeps _tipsy from service construction, App always assigns tipsy on
new services, underscore config keys are not copied onto instances, and
sqlite connections accept path/database for a proper DSN.
Docker Hub timeouts were failing PHP 8.4/mysql before tests ran. Each matrix
cell now starts only the DB it needs, via public.ecr.aws official mirrors.
Replace the old Coveralls/Slack status badges with GitHub Actions + Codecov.
@spacedevin
spacedevin merged commit b82d53f into master Aug 7, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant