[PR #62] [MERGED] Refactor: Performance, structure and code improvement #861

Closed
opened 2026-03-15 15:39:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/flyimg/flyimg/pull/62
Author: @sadok-f
Created: 6/27/2017
Status: Merged
Merged: 6/27/2017
Merged by: @sadok-f

Base: masterHead: optimization-br


📝 Commits (2)

  • 6f01c4a Refactor: Performance, structure and code improvement
  • 9daa591 Fix PHPCS warning

📊 Changes

8 files changed (+205 additions, -162 deletions)

View changed files

📝 README.md (+9 -9)
📝 app.php (+1 -1)
📝 src/Core/Entity/Image.php (+81 -59)
📝 src/Core/Service/CoreManager.php (+32 -10)
📝 src/Core/Service/ImageProcessor.php (+10 -32)
📝 tests/Core/BaseTest.php (+11 -18)
📝 tests/Core/Entity/ImageTest.php (+25 -7)
📝 tests/Core/Service/ImageProcessorTest.php (+36 -26)

📄 Description

Apply changes in order to fix review notes:

  • Uses fopen to load the image over HTTP. allow_url_fopen required.
  • Doesn't use a stream context to provide HTTP timeouts or proxies, follow redirects, etc
  • Uses a custom filename randomisation scheme instead of tempnam()
  • Reads the entire source image into memory on every request, even if it's located on a blacklisted domain or has already been fetched
  • Uses external commands to process images, but does not apply memory limits or timeouts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/flyimg/flyimg/pull/62 **Author:** [@sadok-f](https://github.com/sadok-f) **Created:** 6/27/2017 **Status:** ✅ Merged **Merged:** 6/27/2017 **Merged by:** [@sadok-f](https://github.com/sadok-f) **Base:** `master` ← **Head:** `optimization-br` --- ### 📝 Commits (2) - [`6f01c4a`](https://github.com/flyimg/flyimg/commit/6f01c4a967ea7a18b77f9d040e6e9867f9621b88) Refactor: Performance, structure and code improvement - [`9daa591`](https://github.com/flyimg/flyimg/commit/9daa591fc4779c1bc6d3a2f69c9d544ed1b15260) Fix PHPCS warning ### 📊 Changes **8 files changed** (+205 additions, -162 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+9 -9) 📝 `app.php` (+1 -1) 📝 `src/Core/Entity/Image.php` (+81 -59) 📝 `src/Core/Service/CoreManager.php` (+32 -10) 📝 `src/Core/Service/ImageProcessor.php` (+10 -32) 📝 `tests/Core/BaseTest.php` (+11 -18) 📝 `tests/Core/Entity/ImageTest.php` (+25 -7) 📝 `tests/Core/Service/ImageProcessorTest.php` (+36 -26) </details> ### 📄 Description Apply changes in order to fix review notes: - Uses fopen to load the image over HTTP. allow_url_fopen required. - Doesn't use a stream context to provide HTTP timeouts or proxies, follow redirects, etc - Uses a custom filename randomisation scheme instead of tempnam() - Reads the entire source image into memory on every request, even if it's located on a blacklisted domain or has already been fetched - Uses external commands to process images, but does not apply memory limits or timeouts --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 15:39:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#861
No description provided.