Releases: devvoh/parable
Parable PHP Framework 0.11.0
0.11.0
Note: This version breaks backwards compatibility! If you need any assistance in dealing with refactors due to the upgrade, create an issue and I'll help in any way I can.
Hey, look! Tests! With 100% code coverage, too! Run make tests
to run them (which will attempt to composer install
for needed libraries and then run the tests). Run make coverage
to run the tests AND generate the HTML coverage report in ./coverage
.
With tests, every nook and cranny of the code was looked at, evaluated and where needed, checked, fixed, removed or added to. This changelog will be huge.
This release also pulls out all interdependencies except for Framework
still depending on other Components.
There's so many changes that it'll take a fly's lifetime to jot them all down, and it's just not worth it.
If you're upgrading from 0.10, I wish you all the luck, though in most cases the errors will show you the way.
Changes
- Many things.
Bugfixes
- Much more.
Parable PHP Framework 0.10.0
0.10.0
Note: Breaks backwards compatibility in some instances, and based on your implementation might require small tweaks or none whatsoever. By reading the following changelog carefully it should be trivial to fix any incompatibilities.
Changes
\Parable\Auth\Authentication
has been moved to\Parable\Framework\Authentication
, since it cannot function without packages fromFramework
andHttp
.\Parable\Auth\Rights
has been moved to\Parable\Tool\Rights
, since by itself it does not warrent anAuth
namespace.\Parable\Mail\Mailer
has also been improved:- The main class been simplified and all template logic has been moved to
\Parable\Framework\Mail\Mailer
, since those require external logic. \Parable\Framework\Mail\Mailer
now uses aGetSet
implementation (\Parable\Mail\TemplateVariables
) for its template variables and requires a full path forloadTemplate
calls.\Parable\Mail\Mailer
has gainedrequiredHeader
, to distinguish between headers it wants to enforce itself and ones set by the dev.\Parable\Mail\Mailer
has gainedgetSubject()
,getBody()
,getHeaders()
,getRequiredHeaders()
.\Parable\Mail\Mailer
has gainedresetMailData()
,resetRecipients()
,resetSender()
,reset()
(resets all but sender).
- The main class been simplified and all template logic has been moved to
- All classes previously using
Routes
as a namespace now useRouting
to make the namespace more consistently singular. \Parable\Console
has once again gotten some love:\Parable\Console\Command
namespace has been added, with 2 commands:Help
andInit
.- It's now possible to add your own commands to the
parable
command, as shown in structure's\Config\App
($config->get('console.commands')
). \Parable\Console\App
is now always available to Commands, by setting it throughsetApp()
.parable.php
has been moved up one directory.
\Parable\Events
namespace has been changed to\Parable\Event
for consistency.\Parable\Http\Values\GetSet
has gained the following methods:getAllAndReset()
,getAndRemove($key)
,reset()
andcount()
.
Bugfixes
\Parable\Framework\View
list of@property
tags updated, since some classes were missing.
Miscellaneous
- Where logical and readable, double-quote {}-style concatenation added.
- Comments improved in places.
Parable PHP Framework 0.9.8
0.9.8
Changes
\Parable\Auth\Authentication
no longer demands a\Model\Users
object, but defaults to\Model\User
and allows another class to be set.- Since the Auth system now has a user-overwritable user class name, it no longer calls
initialize()
in its__construct()
. Easiest way of both overwriting and initializing the Auth system is by using anInit\Auth
class to do so.
Parable PHP Framework 0.9.7
0.9.7
Changes
\Parable\Mail
has been added, a very basic wrapper for the nativemail()
function. For any kind of elaborate mailing, this probably won't suffice. But for simple one-off mail sending, it should work relatively well.
Parable PHP Framework 0.9.6
0.9.6
Bugfixes
\Parable\Routing\Route
now injects parameters correctly. This fixes a rare bug where a url with/a/{id}/b/{name}
would fail if both$id
and$name
had the same value.
Parable PHP Framework 0.9.5
0.9.5
Changes
- It should now be easier to build your own Console Commands. You can extend the
\Parable\Console\Command
class and implementrun()
. This will automatically get called. If there's norun()
defined, the base class will attempt to run the callback if it's defined. \Parable\Console\App
has gainedgetCommands()
, which will help when the\Parable\Console\Commands\Help
class lands, probably in 0.9.6.\Parable\Console\Input
has gainedgetHidden()
, which hides the characters the user types in. Only works on *nix systems.\Parable\Console\Input
has gainedgetYesNo(bool)
, to ask Y/n or y/N questions. 'Y/n' (passingtrue
) will returntrue
on either 'y' or an empty string. 'y/N' (passingfalse
) will only returntrue
on a 'y'.src/parable
has been updated to use the above logic.
Bugfixes
\Parable\Auth\Authentication
was unable to return the user upon authenticating. This was becauseinitialize()
actually loaded the User model, but was only called on construct.getUser()
now callsinitialize()
if there's no user set yet.
Parable PHP Framework 0.9.4
0.9.4
Changes
- Added
generatePasswordHash()
to\Parable\Auth\Authentication
.
Bugfixes
- Fixed issue in
\Parable\Auth\Authentication
where without authentication data, a non-existing array key was read. Now that's a reason to say someone isn't validated. This only happened when callingauthenticate
and the password validating correctly. \Parable\Framework\Dispatcher
can now handle nested namespaced controllers for default template files. SoController\Subnamespace\Home
will attempt to loadapp/view/Subnamespace/Home/action.phtml
.
0.9.3
Bugfixes
\Parable\Http\Values\GetSet
incorrectly set the local resource when usingsetAll()
.
Parable PHP Framework 0.9.2
0.9.2
Changes
- Parameters from a Route are now directly passed into actions. No more getting it from the Route through
getValue()
. See the new\Controller\Home
example action for how to use it. The first parameter is still the\Parable\Routing\Route
instance associated with the request. - Parameters passed to a Route can now be typecast in the url itself.
{param:int}
,{param:string}
,{param:float}
. Other types are, at the moment, all string values. - Methods for routes should now be passed as an array. Passing it as a string is allowed for now, but will be removed the next time the version is bumped to either 0.10.0 or 1.0.0, whichever happens first.
- Many public functions have been turned protected if public access wasn't required or desired.
\Parable\Routing\Route
has gained agetValues()
method.\Init\Example
has been expanded, showing a way to hook into the 404 event, as well as that DI is available as usual.
Bugfixes
- HTTP code 200 is now explicitly set on a successful dispatch.
- The full URL is now passed to the
parable_http_404
hook, rather than just the partial. - A bug in a file that's too embarrassing to mention.
Parable PHP Framework 0.9.1
0.9.1
Changes
\Parable\Console
now supports Options. Check\Parable\Console\Command::addOption(...)
for how to use it. You can use\Parable\Console\Parameter::getOption('string')
to get the Option's value. If it is passed but doesn't have a value given and no defaultValue, it'll returntrue
.
Bugfixes
\Parable\ORM\Database
now overwrites__debugInfo
so it won't bevar_dump
'ed/print_r
'ed into giving out database credentials.\Parable\ORM\Database::NULL_VALUE
has been added to set aNULL
value that'll actually set a SQL field toNULL
. Before the string value 'null' would do this, but that's unfair to all the people who have Null as their last name. Any other empty (but not 0) value will skip the field when saving to the database.
Parable PHP Framework 0.9.0
0.9.0
Note: This version might be incompatible with previous versions. If you've ever set specific ->select()
values on a \ORM\Query
object, you'll have to rewrite those calls to pass an array of items rather than a comma-separated string.
It is the intention for the 0.9.x branch to be the last pre-release branch before a 1.0.0 release. For this, the focus is on bug fixes and some refactors that will solve long-standing issues or shortcomings in Parable subsystems. 1.0.0 should be backwards-compatible with 0.9.0, unless bugs pop up which require backwards-compatibility-breaking changes.
The focus for a 1.0.0 release will be documentation and testing.
Changes
\ORM\Query
has been upgraded significantly:- It now requires an array with values for select, so they can all be prefixed with the table name and quoted appropriately.
- It no longer requires a database connection to build a query, but when no database is present, it does basic quoting instead of real quoting. Only for testing and dev purposes, not for production!
- All queries now have their table names added to the field names, to prevent ambiguity in joins. In join-less queries, it can't hurt.
\Cli
has been replaced by\Console
and everybody rejoiced. Seeparable.php
for a simple implementation. It still needs work, but it's a start.\DI\Container::store
now allows passing a custom name if you want to. This makes it possible to store a specific instance under a specific name (say, an interface name).- Config files no longer implement
\Parable\Framework\Interfaces\Config
but extend\Parable\Framework\Config\Base
. This serves the same purpose but takes away the need to redeclaregetSortOrder
every time. Routes.php
has been moved to\Routes\App.php
and is now in the namespace\Routes
. This satisfies PSR-2 requirements and looks nice. Also makes it possible to set up your routes in separate files and order them that way.- Package-specific
Exception
classes have been added toDI
,Framework
,ORM
andRouting
. array
type hints in method parameters have been consistently added where applicable.- Docblock type hints have been improved and, where needed, fixed.
Bugfixes
- Due to the changes in
\ORM\Query
, joins should now work properly.join()
has been replaced withinnerJoin()
, andleftJoin()
,rightJoin()
andfullJoin()
have been added. parable.php
was not copying theInit/Example.php
file, which isn't helpful. Fixed now.- There was one reference to
Query::select()
which was still passing a string. This has been altered to pass an array instead.