Skip to content

v0.3.1 - Centralized User-Agent (Chrome 138)

Choose a tag to compare

@zupolgec zupolgec released this 21 Nov 23:04
· 12 commits to main since this release
ecc5d25

πŸ”§ Fixes

This release properly implements the Chrome 138 User-Agent update that was claimed in v0.3.0 but wasn't actually applied correctly.

What Was Wrong in v0.3.0

  • ❌ Downloader still had Chrome 39 (ancient!)
  • ❌ FolderDownloader had Chrome 98 (old)
  • ❌ User-Agent duplicated across 2 files
  • ❌ Update script didn't work (mago formatting broke regex)

What's Fixed in v0.3.1

  • βœ… New UserAgent class with centralized UserAgent::DEFAULT constant
  • βœ… Chrome 138.0.0.0 properly applied everywhere
  • βœ… Single source of truth - no duplication
  • βœ… Update script works with new centralized architecture
  • βœ… Removed unused Symfony DomCrawler import

πŸ“ Code Changes

New: src/UserAgent.php

class UserAgent
{
    /**
     * Updated: 2025-11-21
     * Chrome Version: 138.0.0.0
     */
    public const DEFAULT = 'Mozilla/5.0 ... Chrome/138.0.0.0 ...';
}

Both Downloader and FolderDownloader now use:

'User-Agent' => $this->userAgent ?? UserAgent::DEFAULT

βœ… Verified

  • All 22 tests passing
  • composer update-ua works correctly
  • No code duplication
  • Respects mago's print-width=120 rule

πŸ“¦ Installation

composer require zupolgec/gdown-php

πŸ”— Links

  • Full Changelog: v0.3.0...v0.3.1