• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

move-elevator / typo3-image-compression / 35981638346
91%

Build:
DEFAULT BRANCH: main
Ran 24 Sep 2026 09:32AM UTC
Jobs 1
Files 38
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Sep 2026 09:30AM UTC coverage: 89.805% (-0.8%) from 90.598%
35981638346

push

github

web-flow
feat: add backup and restore for original files before compression (#59)

* feat: add backup and restore for original files before compression

* test: cover backup and restore functionality

* docs: document backup and restore feature

* fix: avoid mocking readonly IconFactory and declare psr/http-message explicitly

* refactor: apply rector fixes and skip TYPO3-13+-only IconSize migration

* fix: replace readonly-incompatible IconFactory test double with a real, cache-seeded instance

* fix: replace PHPUnit-based IconFactory double with framework-free version-agnostic stand-in

* fix: require CSRF token and file-replace permission before restoring a backup

The restore action accepted any authenticated backend request with a
file UID, without verifying the request originated from the file list
UI or that the user may actually replace that file. Also skip
rendering the restore action entirely when backups are disabled.

* fix: clear stale backup-path references and reindex FAL metadata after restore

sys_file.backup_path could point at a file that pruning had already
deleted, and a restored file's size/hash were never refreshed in the
FAL index, leaving both out of sync with what is actually on disk.

* fix: avoid doubling readonly ResourceFactory in RestoreFileController's unit tests

Some resolvable PHPUnit/mock-object versions refuse to double a class
TYPO3 declares readonly (ResourceFactory, since 13.4), throwing
ClassIsReadonlyException instead of a usable test double. The
"file exists" cases now seed a real, reflection-instantiated
ResourceFactory's internal cache directly; the "file does not exist"
case moved to a functional test, which needs a real, DB-backed
ResourceFactory/FileIndexRepository lookup anyway.

* fix: cover file-permission scenarios with a real backend user instead of a ResourceFactory double

ResourceFactory's internal instance-cache property isn't stable across
the supported TYPO3 versions either, so reflecting it (like the
... (continued)

245 of 287 new or added lines in 14 files covered. (85.37%)

1700 of 1893 relevant lines covered (89.8%)

4.04 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
26.09
Classes/Backup/RestoreService.php
7
87.27
Classes/Backup/BackupService.php
7
95.95
-4.05% Classes/Domain/Repository/FileRepository.php
4
83.72
-8.59% Classes/Configuration/ExtensionConfiguration.php
4
69.23
-12.59% Classes/Domain/Model/File.php
2
92.31
Classes/Backend/RestoreButton.php
1
97.06
-2.94% Classes/EventListener/AfterFileListRendered.php
Jobs
ID Job ID Ran Files Coverage
1 35981638346.1 24 Sep 2026 09:32AM UTC 38
89.8
GitHub Action Run
Source Files on build 35981638346
  • Tree
  • List 38
  • Changed 8
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35981638346
  • d28795de on github
  • Prev Build on main (#35980247373)
  • Next Build on main (#35984061667)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc