:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:
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 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:
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/