Skip to content

Releases: devvoh/parable

Parable PHP Framework 0.11.0

01 Jul 18:36
Compare
Choose a tag to compare
Pre-release

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

17 Apr 11:44
Compare
Choose a tag to compare
Pre-release

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 from Framework and Http.
  • \Parable\Auth\Rights has been moved to \Parable\Tool\Rights, since by itself it does not warrent an Auth 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 a GetSet implementation (\Parable\Mail\TemplateVariables) for its template variables and requires a full path for loadTemplate calls.
    • \Parable\Mail\Mailer has gained requiredHeader, to distinguish between headers it wants to enforce itself and ones set by the dev.
    • \Parable\Mail\Mailer has gained getSubject(), getBody(), getHeaders(), getRequiredHeaders().
    • \Parable\Mail\Mailer has gained resetMailData(), resetRecipients(), resetSender(), reset() (resets all but sender).
  • All classes previously using Routes as a namespace now use Routing 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 and Init.
    • 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 through setApp().
    • 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() and count().

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

08 Apr 12:44
Compare
Choose a tag to compare
Pre-release

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 an Init\Auth class to do so.

Parable PHP Framework 0.9.7

06 Apr 19:37
Compare
Choose a tag to compare
Pre-release

0.9.7

Changes

  • \Parable\Mail has been added, a very basic wrapper for the native mail() 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

06 Apr 15:13
Compare
Choose a tag to compare
Pre-release

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

05 Apr 21:54
Compare
Choose a tag to compare
Pre-release

0.9.5

Changes

  • It should now be easier to build your own Console Commands. You can extend the \Parable\Console\Command class and implement run(). This will automatically get called. If there's no run() defined, the base class will attempt to run the callback if it's defined.
  • \Parable\Console\App has gained getCommands(), which will help when the \Parable\Console\Commands\Help class lands, probably in 0.9.6.
  • \Parable\Console\Input has gained getHidden(), which hides the characters the user types in. Only works on *nix systems.
  • \Parable\Console\Input has gained getYesNo(bool), to ask Y/n or y/N questions. 'Y/n' (passing true) will return true on either 'y' or an empty string. 'y/N' (passing false) will only return true 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 because initialize() actually loaded the User model, but was only called on construct. getUser() now calls initialize() if there's no user set yet.

Parable PHP Framework 0.9.4

02 Apr 12:29
Compare
Choose a tag to compare
Pre-release

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 calling authenticate and the password validating correctly.
  • \Parable\Framework\Dispatcher can now handle nested namespaced controllers for default template files. So Controller\Subnamespace\Home will attempt to load app/view/Subnamespace/Home/action.phtml.

0.9.3

Bugfixes

  • \Parable\Http\Values\GetSet incorrectly set the local resource when using setAll().

Parable PHP Framework 0.9.2

12 Mar 21:17
Compare
Choose a tag to compare
Pre-release

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 a getValues() 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

22 Feb 21:20
Compare
Choose a tag to compare
Pre-release

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 return true.

Bugfixes

  • \Parable\ORM\Database now overwrites __debugInfo so it won't be var_dump'ed/print_r'ed into giving out database credentials.
  • \Parable\ORM\Database::NULL_VALUE has been added to set a NULL value that'll actually set a SQL field to NULL. 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

20 Feb 15:14
Compare
Choose a tag to compare
Pre-release

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. See parable.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 redeclare getSortOrder 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 to DI, Framework, ORM and Routing.
  • 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 with innerJoin(), and leftJoin(), rightJoin() and fullJoin() have been added.
  • parable.php was not copying the Init/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.