Commit Graph

18 Commits

Author SHA1 Message Date
Peter Kokot 5ed911a14f Bump copyrights and license year range to 2019 2019-01-25 00:22:14 +01:00
Peter Kokot d9a602e2b5 Add Extractor utility
This patch adds extractor service class for retrieving file contents
from the tar gzip archives (tgz). Instead of a pure PHP implementation
Archive_Tar PEAR package it uses Phar and zlib extensions to retrieve
contents from the phar stream.
2018-12-06 15:52:22 +01:00
Peter Kokot 7be4f4dbc9 Refactor files uploading
This patch removes dependency of the deprecated HTTP_Upload PEAR package
and replaces it with a lighter version of a dedicated uploader service
class instead.
2018-12-02 13:06:35 +01:00
Peter Kokot 788b92f59b Remove Pager dependency
This patch simplifies the Pager dependency and adds a new Pagination
class for this purpose.
2018-11-22 23:19:59 +01:00
Peter Kokot 5a74283bb2 Add data fixtures CLI command
This patch adds ability to insert data fixtures in the development
environment using new console script via Symfony Console component
and Faker library which generates demo data for localhost development
environments.
2018-11-22 19:33:37 +01:00
Peter Kokot 8d0b4db8b8 Remove ext/mysql/mysqli dependency 2018-11-20 05:18:27 +01:00
Peter Kokot 58f7b2e0ca Sync images location to img from gifs
Images include gifs, PNGs, jpges so img is more universal name for
images in the public_html.
2018-11-17 03:35:48 +01:00
Peter Kokot cc7ba6f0fc Refactor display_user_notes() to repository
This patch adds a simple database adapter using PDO and migrates the
display_user_notes() function into a repository class.
2018-11-16 03:51:06 +01:00
Peter Kokot 4a8ebf5ccf Refactor Autoloader test with dataProvider 2018-11-15 18:26:46 +01:00
Peter Kokot e15a51007d Add dual autoloading mechanism
This patch adds a dual autoloading mechanism for classes until further
refactorings will be possible using Composer's autoloader and full
PSR-4 support.
2018-11-15 17:49:22 +01:00
Peter Kokot edf11ec836 Add DSN converter
This patch adds a DSN string converter that can convert the already set
DSN database setting into an array and populates proper configuration
values. This is done to sync things with the production settings and to
gradually migrate the mysql_* mysqli_* elements to PDO.
2018-11-15 00:47:33 +01:00
Peter Kokot 62c2f892ec Refactor posttohost function to API client
This patch refactors the posttohost() function into a dedicated more
OOP-alike approach of using a new PhpMasterClient class with added unit
test.

For testing it uses a simple CLI server written and runnable via php
file.
2018-11-14 00:48:07 +01:00
Peter Kokot 5d7d447d17 Add environment dependent configuration
This patch adds environment dependent configuration. When in development
environment, the `composer install` step copies the `.env` file from the
`.env.dist` file. This approach allows following the "The Twelve-Factor App"
methodology of building web applications.

The .env files with environment variables are processed in development
environment with the Symfony Dotenv component. When in production
environment, the .env files are not used but are for now overridden via
the `config/app_prod.php` file since the production environment is less
configurable and adaptable to changes. Changing future configuration
approach is with this way prepared for using environment variables in
production if needed in the future.
2018-11-12 00:22:52 +01:00
Peter Kokot 8b633c572c Add Config class
This patch adds a new configuration handler class and introduces an
initial config directory using a PHP format.
2018-11-05 01:40:03 +01:00
Peter Kokot dc3ec7d604 Add htmlspecialchars to license HTML output 2018-11-05 00:14:54 +01:00
Peter Kokot 2213218ccf Refactor get_license_link() into a class
This patch refactors a function get_license_link() into a class
Licenser.
2018-11-04 23:30:16 +01:00
Peter Kokot dd3c7620e4 Refactor make_image() template helper
This patch refactors function make_image() into a class and adds a unit
test. Several unnecessary make_image() calls have been refactored into a
plain HTML instead since the size attributes are not needed on them
exactly.
2018-11-04 21:42:25 +01:00
Peter Kokot fbbba3b774 Refactor make_utc_date() into a DateFormat class
This patch formats the function make_utc_date() helper into a dedicated
utility class DateFormat with added PHPUnit test. Application ini
configuration for date.timezone has been set to UTC.
2018-11-04 00:03:22 +01:00