[PR #62] [CLOSED] Introduce Controllers #151

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/62
Author: @birkett
Created: 6/25/2018
Status: Closed

Base: masterHead: refactoring3


📝 Commits (10+)

  • 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.
  • b17b5fb Tests.

📊 Changes

79 files changed (+8421 additions, -2938 deletions)

View changed files

📝 .gitignore (+7 -1)
Classes/Autoloader.php (+50 -0)
Classes/Configuration.php (+102 -0)
Classes/Exceptions/ClassNotFoundException.php (+20 -0)
Classes/Exceptions/ConfigDefaultMissingException.php (+20 -0)
Classes/Exceptions/MethodNotAllowedException.php (+20 -0)
Classes/FileSizeFormatter.php (+39 -0)
Classes/FilterFactory.php (+71 -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)

...and 59 more files

📄 Description

This PR introduces controllers.
Code from core.php and pictsharemodel.php has been moved into the controllers (and AbstractController where it's shared between controllers).

This also adds:

  • Configuration class, which contains some helper methods for working with the application configuration.
  • FileSizeFormatter class, to format byte values to human readable file sizes.
  • Custom exceptions, to help when reading the code.
  • Unit tests (need more of these! - current coverage is around 4% by lines of code, this will improve as the controllers are split up)
  • composer.json / composer.lock - helps install the development tools and code analysis tools (PHPUnit, PHP Mess Detector, PHP_CodeSniffer, php-cs-fixer and PHAN).

There should be no breaking changes in this PR. Using PHP 7.0 all over now, so no going back.
As per normal with these PR's - a full test is needed before merging. Unit tests are going to help with this.

(branched from #61 - linking to #57)

Dev notes for the future:
Classes/, Controllers/, Models/ will eventually move into src/*
Tests eventually rename to tests
Web assets and servable content move into public/*


🔄 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/62 **Author:** [@birkett](https://github.com/birkett) **Created:** 6/25/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `refactoring3` --- ### 📝 Commits (10+) - [`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. - [`b17b5fb`](https://github.com/HaschekSolutions/pictshare/commit/b17b5fbbd503edc030dcf1927cd4ef4fb17182ee) Tests. ### 📊 Changes **79 files changed** (+8421 additions, -2938 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+7 -1) ➕ `Classes/Autoloader.php` (+50 -0) ➕ `Classes/Configuration.php` (+102 -0) ➕ `Classes/Exceptions/ClassNotFoundException.php` (+20 -0) ➕ `Classes/Exceptions/ConfigDefaultMissingException.php` (+20 -0) ➕ `Classes/Exceptions/MethodNotAllowedException.php` (+20 -0) ➕ `Classes/FileSizeFormatter.php` (+39 -0) ➕ `Classes/FilterFactory.php` (+71 -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) _...and 59 more files_ </details> ### 📄 Description This PR introduces controllers. Code from core.php and pictsharemodel.php has been moved into the controllers (and AbstractController where it's shared between controllers). This also adds: - Configuration class, which contains some helper methods for working with the application configuration. - FileSizeFormatter class, to format byte values to human readable file sizes. - Custom exceptions, to help when reading the code. - Unit tests (need more of these! - current coverage is around 4% by lines of code, this will improve as the controllers are split up) - composer.json / composer.lock - helps install the development tools and code analysis tools (PHPUnit, PHP Mess Detector, PHP_CodeSniffer, php-cs-fixer and PHAN). There should be no breaking changes in this PR. Using PHP 7.0 all over now, so no going back. As per normal with these PR's - a full test is needed before merging. Unit tests are going to help with this. (branched from #61 - linking to #57) Dev notes for the future: Classes/, Controllers/, Models/ will eventually move into src/* Tests eventually rename to tests Web assets and servable content move into public/* --- <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#151
No description provided.