[PR #61] [CLOSED] Introduce Storage Providers #149

Closed
opened 2026-02-25 23:40:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/HaschekSolutions/pictshare/pull/61
Author: @birkett
Created: 6/23/2018
Status: Closed

Base: masterHead: refactoring2


📝 Commits (9)

  • 7ea14ce CS fixer, PSR2.
  • 46c1bcc Refactor the filters.
  • 81b43d9 Update README for PHP7 requirement.
  • b713e9e Filter fixes.
  • d4a950a Clean up the Backblaze class.
  • 3649ebe Introduced StorageProviders. Start cleaning up tools.
  • 78198fe LocalStorageProvider.
  • 1e706e3 Added RotateFilter, removed old /classes/.
  • 9fe664a Added Autoloader and FileSizeFormatter. Cleanup.

📊 Changes

53 files changed (+4329 additions, -2838 deletions)

View changed files

Classes/Autoloader.php (+82 -0)
Classes/FileSizeFormatter.php (+39 -0)
Classes/FilterFactory.php (+69 -0)
Classes/Filters/AbstractFilter.php (+110 -0)
Classes/Filters/AquaFilter.php (+48 -0)
Classes/Filters/BlurFilter.php (+115 -0)
Classes/Filters/BoostFilter.php (+45 -0)
Classes/Filters/BrightnessFilter.php (+36 -0)
Classes/Filters/BubblesFilter.php (+81 -0)
Classes/Filters/ColorizeFilter.php (+72 -0)
Classes/Filters/ContrastFilter.php (+36 -0)
Classes/Filters/CoolFilter.php (+41 -0)
Classes/Filters/EdgeDetectFilter.php (+26 -0)
Classes/Filters/EmbossFilter.php (+46 -0)
Classes/Filters/FilterInterface.php (+54 -0)
Classes/Filters/FuzzyFilter.php (+46 -0)
Classes/Filters/GrayFilter.php (+41 -0)
Classes/Filters/GrayscaleFilter.php (+26 -0)
Classes/Filters/LightFilter.php (+57 -0)
Classes/Filters/NegativeFilter.php (+26 -0)

...and 33 more files

📄 Description

This started out as a refactor of the Backblaze support - but turned into a storage structure concept.

StorageProviders are ways to store and retrieve files.
Currently, we have:

  • LocalStorageProvider - uses the local filesystem.
  • BackblazeStorageProvider - uses Backblaze buckets.

The application is not fully utilising LocalStorageProvider yet. There are still some calls to GD functions, which are directly saving images locally.

Eventually, we should be able to have multiple StorageProviders enabled, configured via config / env vars.

This also paves the way to Amazon S3 support - linking to #49

Breaking changes: PHP 7.0 required (type hints, strict types)
Functionality changes: Rotating images is now treated as a filter (backwards compatible).

This PR is branched off #60. I recommend a full test before merging.

Linking to #57


🔄 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/HaschekSolutions/pictshare/pull/61 **Author:** [@birkett](https://github.com/birkett) **Created:** 6/23/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `refactoring2` --- ### 📝 Commits (9) - [`7ea14ce`](https://github.com/HaschekSolutions/pictshare/commit/7ea14ce486f4309e2f28658705dff6f079652d24) CS fixer, PSR2. - [`46c1bcc`](https://github.com/HaschekSolutions/pictshare/commit/46c1bcc09f905ae4f6482fa2995b6125196f0bae) Refactor the filters. - [`81b43d9`](https://github.com/HaschekSolutions/pictshare/commit/81b43d97e7231d487c754f6d32d1a134ef3277c7) Update README for PHP7 requirement. - [`b713e9e`](https://github.com/HaschekSolutions/pictshare/commit/b713e9e214670c98e60c70aa99b0a5b772585101) Filter fixes. - [`d4a950a`](https://github.com/HaschekSolutions/pictshare/commit/d4a950abf39306e3adf70cc20ae655ad2e176880) Clean up the Backblaze class. - [`3649ebe`](https://github.com/HaschekSolutions/pictshare/commit/3649ebee433d036189970331211036ae29f8df1b) Introduced StorageProviders. Start cleaning up tools. - [`78198fe`](https://github.com/HaschekSolutions/pictshare/commit/78198febdedfb626e9ffdbfbff4168f05426fd30) LocalStorageProvider. - [`1e706e3`](https://github.com/HaschekSolutions/pictshare/commit/1e706e3bf2a6475c294feb8acc891dbf088e489b) Added RotateFilter, removed old /classes/. - [`9fe664a`](https://github.com/HaschekSolutions/pictshare/commit/9fe664ac0e05410692e630808960c5d4eed363f3) Added Autoloader and FileSizeFormatter. Cleanup. ### 📊 Changes **53 files changed** (+4329 additions, -2838 deletions) <details> <summary>View changed files</summary> ➕ `Classes/Autoloader.php` (+82 -0) ➕ `Classes/FileSizeFormatter.php` (+39 -0) ➕ `Classes/FilterFactory.php` (+69 -0) ➕ `Classes/Filters/AbstractFilter.php` (+110 -0) ➕ `Classes/Filters/AquaFilter.php` (+48 -0) ➕ `Classes/Filters/BlurFilter.php` (+115 -0) ➕ `Classes/Filters/BoostFilter.php` (+45 -0) ➕ `Classes/Filters/BrightnessFilter.php` (+36 -0) ➕ `Classes/Filters/BubblesFilter.php` (+81 -0) ➕ `Classes/Filters/ColorizeFilter.php` (+72 -0) ➕ `Classes/Filters/ContrastFilter.php` (+36 -0) ➕ `Classes/Filters/CoolFilter.php` (+41 -0) ➕ `Classes/Filters/EdgeDetectFilter.php` (+26 -0) ➕ `Classes/Filters/EmbossFilter.php` (+46 -0) ➕ `Classes/Filters/FilterInterface.php` (+54 -0) ➕ `Classes/Filters/FuzzyFilter.php` (+46 -0) ➕ `Classes/Filters/GrayFilter.php` (+41 -0) ➕ `Classes/Filters/GrayscaleFilter.php` (+26 -0) ➕ `Classes/Filters/LightFilter.php` (+57 -0) ➕ `Classes/Filters/NegativeFilter.php` (+26 -0) _...and 33 more files_ </details> ### 📄 Description This started out as a refactor of the Backblaze support - but turned into a storage structure concept. StorageProviders are ways to store and retrieve files. Currently, we have: - LocalStorageProvider - uses the local filesystem. - BackblazeStorageProvider - uses Backblaze buckets. The application is not fully utilising LocalStorageProvider yet. There are still some calls to GD functions, which are directly saving images locally. Eventually, we should be able to have multiple StorageProviders enabled, configured via config / env vars. This also paves the way to Amazon S3 support - linking to #49 Breaking changes: PHP 7.0 required (type hints, strict types) Functionality changes: Rotating images is now treated as a filter (backwards compatible). This PR is branched off #60. I recommend a full test before merging. Linking to #57 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:40:55 +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/pictshare#149
No description provided.