Repository navigation
v0.3.1 - Centralized User-Agent (Chrome 138)
π§ 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::DEFAULTconstant - β 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-uaworks 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