Skip to content

Modernize tiny-php for current PHP and Laravel workflows - #32

Merged
zackkitzmiller merged 18 commits into
masterfrom
copilot/modernize-repo
Sep 11, 2026
Merged

zackkitzmiller merged 18 commits into
masterfrom
copilot/modernize-repo

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown

This updates tiny-php from a PHP 5.x / Travis-era package to a current PHP library with modern Composer, CI, and safer runtime behavior. The core encoding API stays intact, while package wiring, validation, and legacy integration paths are brought up to date.

  • Package + toolchain

    • Raise the PHP baseline to ^8.1
    • Move Composer autoloading to PSR-4, including explicit support for the Laravel 5 namespace
    • Replace Travis config with a GitHub Actions CI workflow
    • Refresh package metadata, scripts, and CLI bin registration
  • Core library hardening

    • Add strict types and typed APIs across the core classes
    • Validate Tiny alphabets up front and introduce a dedicated InvalidCharacterSet exception
    • Preserve existing negative-value normalization while rejecting malformed and out-of-range numeric strings
    • Detect decode overflow instead of silently returning invalid integers
    • Switch alphabet generation to a cryptographically secure shuffle
  • Key generation + config handling

    • Modernize the tiny:generate commands
    • Add shared env-file update logic with correct precedence for TINY_KEY vs LEAGUE_TINY_KEY
    • Preserve literal key contents when writing .env
    • Keep legacy Laravel config files in sync where applicable
    • Update in-memory config via the config repository so generated keys are immediately visible in-process
  • Laravel integration

    • Refresh both service providers with typed registration logic
    • Use console-only publish / command registration paths
    • Merge package config from the correct package location
    • Support both current and legacy env key names during resolution
  • Docs + tests

    • Rewrite the README around current installation, usage, and upgrade expectations
    • Clarify Laravel setup for newer vs older integration paths
    • Expand test coverage for validation, env updates, numeric-string compatibility, overflow, and edge cases
use ZackKitzmiller\Tiny;

$tiny = new Tiny(Tiny::generateSet());

$encoded = $tiny->to(12345);
$decoded = $tiny->from($encoded);

Copilot AI and others added 15 commits September 11, 2026 04:48
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
@zackkitzmiller
zackkitzmiller marked this pull request as ready for review September 11, 2026 05:05
Copilot AI and others added 3 commits September 11, 2026 05:07
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
Co-authored-by: zackkitzmiller <111536+zackkitzmiller@users.noreply.github.com>
@zackkitzmiller
zackkitzmiller merged commit 54be8a1 into master Sep 11, 2026
@zackkitzmiller
zackkitzmiller deleted the copilot/modernize-repo branch September 11, 2026 05:10
Copilot stopped work on behalf of zackkitzmiller due to an error September 11, 2026 05:10
zackkitzmiller added a commit that referenced this pull request Sep 11, 2026
Modernize tiny-php for current PHP and Laravel workflows
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.

2 participants