Roland Häder [Sun, 16 Jul 2017 16:19:49 +0000 (18:19 +0200)]
Added first PHPUnit-based unit test. This will test some of the methods in the
configuration class 'FrameworkConfiguration'. Strangely, not all I have tested
have 100% coverage ... Why? :-(
Roland Häder [Sun, 16 Jul 2017 15:02:28 +0000 (17:02 +0200)]
Continued a bit:
- some rewrites to make PHPUnit be able to unit-test it
- more sanity-checks on parameters, were sometimes combined
- surpress some anoyances caused by to strict xdebug settings
Roland Häder [Sun, 16 Jul 2017 11:14:01 +0000 (13:14 +0200)]
Continued:
- rewrote some parts of the class loader to e.g. avoid loading full lust into
variable and then only decode it
- renamed shortended variables
- cut a very long variable down a bit (one word)
- ignored all logfiles in root directory
Roland Häder [Sun, 16 Jul 2017 10:56:32 +0000 (12:56 +0200)]
Continued a bit:
- renamed method app_exit() to exitApplication(), still it needs rewritings
- rewrote a bit searching for framework files, also check __DIR__ from
index.php to find it
Roland Häder [Sun, 16 Jul 2017 10:43:03 +0000 (12:43 +0200)]
Continued a bit:
- start of rewriting unit tests, these old where not very well written anyway
- created phpunit.xml.dist
- created composer.json/lock files. No, I'm not going to replace my class
loader with it. I still like mine better. :-)
- created tests/bootstrap.php which contains an ugly hack for loading my tests
first. Maybe there is a better way?
- moved class to proper (deeper) location
Roland Häder [Sun, 16 Jul 2017 00:32:39 +0000 (02:32 +0200)]
Cleanup:
- removed deprecated unit tests, very old-lost stuff
- removed deprecated setMagicQuotesRuntime() which only wraps an already
deprecated PHP function
- unit tests with PHPUnit are coming! :-)
Roland Häder [Sat, 1 Jul 2017 21:27:39 +0000 (23:27 +0200)]
Continued a bit:
- added experimental RegistryIterator class which will iterate over all found
entries in the given registry. If a sub-registry is found, also their entries
will be iterated over instead of the sub-registry being returned.
Roland Häder [Fri, 19 May 2017 13:56:31 +0000 (15:56 +0200)]
Continued a bit:
- in the wake of mcrypt being deprecated, an OpenSSL-based implementation
needs to be written. This commit marks the start for it. Please note, that
currently you don't have *ANY* encryption as the methods are unfinished
- moved DATA_PAYLOAD_SEPARATOR to EncryptableStream
- updated TODOs.txt
Roland Häder [Thu, 18 May 2017 20:23:46 +0000 (22:23 +0200)]
Rewrite continued:
- the framework now attempts to initialize the application more OOP-ed
- this is done by calling 3 simple methods:
+ FrameworkBootstrap::initFramework();
+ FrameworkBootstrap::prepareApplication();
+ FrameworkBootstrap::startApplication();
- initFramework: 3 simple steps again:
+ scanFrameworkClasses: scans for framework-related classes, interfaces and
exceptions
+ determineRequestType: determines request-type (console, html) and loads all
given parameter into the initialized request class. It also initializes the
response instance
+ validateApplicationParameter: validates the parameter 'app' if it is there
and points to a valid application (very basic check, more later on)
- prepareApplication: Prepares detected application by attempting to load all
required include files and only optional if present. Please note that some
files are now deprecated and should be ported to the new methods (see below)
- startApplication: Starts the application by calling 3 methods:
+ setupApplicationData: replacement for data.php, sets all application's data.
Please don't set any configuration stuff here, this is still done in
config.php!
+ initApplication: Calls some additional methods to initialize application.
Here is a good place to init database instance by calling the shiny new
method initDatabaseInstance().
+ launchApplication: Still old method name which starts the application.
Please remove any request/response-init stuff from here as it is now
generically done in FrameworkBootstrap
- include files in framework/database/ are now all deprecated
- renamed framework/config.inc.php -> framework/config-global.php
- PrimeraPortal's API is history, so let us remove the obsolete file here, too
- some "contrib" files updated
- updated TODOs.txt
- moved rand.php to contrib/ folder
Roland Häder [Wed, 3 May 2017 16:05:20 +0000 (18:05 +0200)]
Continued:
- the word "Default" and "Array" is not possible to use alone in namespace like
<?php
namespace Some\Foo\Array;
?> <-- yes, discouraged. just to clearify end-of-php
- some math stuff "fixed".
- removed discouraged headers from all remaining scripts
Roland Haeder [Sun, 2 Apr 2017 18:44:02 +0000 (20:44 +0200)]
Continued:
- renamed BootstrapFramework -> FrameworkBootstrap as there are also similar
classes around, like FrameworkConfiguration
- require/include are no functions, don't use parentheses here (including old
tests, I know)
- continued with rewriting bootstrap: more methods in FrameworkBootstrap and
lesser include files in framework/ path
Roland Haeder [Sun, 26 Mar 2017 14:39:13 +0000 (16:39 +0200)]
Continued with rewrites:
- rewrote bootstrap to a more easier way, still index.php will contain a class
- this class has a method to detect the framework's path on common places
- splitted application_base_path and framework_base_path, was only base_path
before
Roland Häder [Tue, 14 Mar 2017 11:20:54 +0000 (12:20 +0100)]
strict naming-convention check can be disabled, but is not recommended in
general use. For example for PhpUnit unit tests this must be disabled, else
PHP_Invoker cannot be loaded.
Roland Häder [Thu, 9 Mar 2017 09:44:30 +0000 (10:44 +0100)]
Cleanup:
- removed old scripts which were used in SVN times
- some may become useful, like remote-deprecated.sh and find-bad-php.sh
- the later one now searches for discouraged ?> closing tag
- the first one can now be used with GIT to remove deprecated files