haoyuqi / download-bing-wallpaper
Retrieve Bing wallpaper metadata by date through a versioned JSON Artisan command.
Package info
github.com/haoyuqi/download-bing-wallpaper
pkg:composer/haoyuqi/download-bing-wallpaper
Requires
- php: ^8.3
- ext-json: *
- illuminate/console: ^13.0
- illuminate/http: ^13.0
- illuminate/support: ^13.0
Requires (Dev)
- larastan/larastan: ^3.10
- laravel/pint: ^1.30
- orchestra/testbench: ^11.0
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^12.5.8
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-23 01:29:52 UTC
README
Laravel 13 package that retrieves Bing wallpaper metadata for an exact date and writes one versioned JSON document to standard output. It never downloads or saves an image.
Requirements
- PHP 8.3+
- Laravel 13
Keep PHP updated to a patched release; see runtime security requirements.
Installation
composer require haoyuqi/download-bing-wallpaper
Usage
php artisan bing:wallpaper --date=2026-08-31 --no-ansi
The command uses Bing's fixed en-US metadata source, searches its current eight-item response for the exact calendar date, and writes exactly one JSON document followed by a newline. No dates are substituted.
| Result | Exit code |
|---|---|
found or not_found |
0 |
| Invalid or missing date | 2 |
| Upstream or internal error | 1 |
The --date option is required and must be a real YYYY-MM-DD date. JSON fields are always ordered as schemaVersion, status, query, data, rawPayload, error, and retrievedAt. Technical details are represented in the JSON error; standard error remains empty.
Migrating from v2
The BingWallpaperInterface, download(), and save() APIs were removed. Use the Artisan command and consume its JSON instead.
Development
Run composer check for validation, optimized autoloading, analysis, style, and tests. CI uses fake HTTP responses and does not contact Bing.
This project was developed with AI assistance. All changes were reviewed and verified by the maintainer.
See CONTRIBUTING.md, SECURITY.md, and SUPPORT.md.
Test coverage
CI requires 100% executable line coverage across the complete src/ tree,
including files that tests never load. The PHP 8.4 stable-dependency job measures
coverage with PCOV; PHP 8.3 (lowest and stable dependencies) and PHP 8.5 continue
to test compatibility. The gate compares raw covered and total line counts, so
rounding to 100.00% cannot hide an uncovered line.
Each measured run publishes an English summary with test counts, exact coverage,
source file count, duration, and installed PHP, Laravel, PHPUnit and Composer
versions. The package-coverage artifact contains Clover, JUnit and measured JSON
reports. The README badge updates from successful master test runs through the
automatically maintained coverage-badge data branch; older commits and pull
requests cannot overwrite it.
The coverage gate and summary use PHP, and their regression tests run in the existing PHPUnit suite. Badge publishing uses GitHub CLI directly; no Python runtime or separate badge-publishing script is required.
To measure locally with PCOV installed:
php -d pcov.enabled=1 -d pcov.directory=src vendor/bin/phpunit \
--coverage-clover build/coverage.xml --coverage-text