Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin de Graaf committed Apr 6, 2016
2 parents 932cb1e + d0c18b9 commit 73e2c56
Show file tree
Hide file tree
Showing 22 changed files with 419 additions and 85 deletions.
23 changes: 14 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Fluid PHP Framework Changelog
# Parable PHP Framework Changelog

### 0.3.5 - in progress
### 0.4.0

__Changes__
- Small one, but removed composer.json again. No use for Fluid, which will need an installer like symfony & laravel. For now just releases on github are enough. But I do know how to do it now, so that's something.
- Renamed Fluid to Parable. The reason is that the Flow PHP framework has a component called Fluid, which is their template parser. As such, it's become clear that this little project required a new name. As this renames all classes and even some directories, it breaks backwards compatibility. Given that parable is still pre-release software, semantic versioning isn't completely in play yet and it merely raises the version to 0.4.0.

### 0.3.5

__Changes__
- Small one, but removed composer.json again. No use for Parable, which will need an installer like symfony & laravel. For now just releases on github are enough. But I do know how to do it now, so that's something.

### 0.3.4

Expand All @@ -12,7 +17,7 @@ __Changes__
- Response no longer has a __destruct method. If you die/exit, it dies/exits without attempting to output the buffer.
- Moved App logic from index.php into App::run(), which used to be boot() but now also does the routing. Later on, split this into multiple functions.
- App::executeRoute now looks for the view parameter on a route definition regardless of closure or not. This allows overruling the auto-generated template or simply using a specific template if the auto-generated template doesn't exist.
- Added Fluid.php cli interpreter & \Devvoh\Fluid\Cli class to handle the logic behind Fluid.php, see app/modules/App/Cli/Index.php for current implementation (subject to change).
- Added Parable.php cli interpreter & \Devvoh\Parable\Cli class to handle the logic behind Parable.php, see app/modules/App/Cli/Index.php for current implementation (subject to change).
- Added some more information to the index view file.
- Added composer.json (experimental)

Expand Down Expand Up @@ -45,10 +50,10 @@ __Bugfixes__
- All references to ob_* output buffering functions have been moved into the Response object and are now called from there. This makes it clearer when output buffering is used and what type.
- Default output buffering has been changed from using ob_gzhandler to regular, since ob_gzhandler would cause flicker before first byte sometimes. I need to look into this before enabling it again.
- app\modules\Base has been renamed to app\modules\Core since it functions as a 'core' for completely standard functionality such as errors.
- Removed \Devvoh\Fluid\Controller as base since it'd be unwise to alter this as a developer building on top of Fluid. An update of Fluid would overwrite it or an annoying merging issue would arise. Replaced with user-alterable \Core\Controller\Base.
- Removed \Devvoh\Parable\Controller as base since it'd be unwise to alter this as a developer building on top of Parable. An update of Parable would overwrite it or an annoying merging issue would arise. Replaced with user-alterable \Core\Controller\Base.
- Added a number of currentModule-related functions to App, most important of which is getModuleFromPath, which is used by Routes.php to determine the module to set on all the routes instead of having to manually set it.
- Changed the 'magic' references to App in index.phtml to self:: instead of $this for consistency's sake.Both still work, to allow the developer to decide which one they'd prefer.
- \Devvoh\Fluid\App\View's _call magic method has been updated to use call_user_func_array to properly pass all parameters as they should.
- \Devvoh\Parable\App\View's _call magic method has been updated to use call_user_func_array to properly pass all parameters as they should.
- App::start() has been renamed to App::boot() because it looks nicer. For some reason this is important to me.
- Speaking of pretty things, redesigned the default 'hello' page to be more modern and playful.
- Many less important for the end user improvements (reworked almost all comments, cody style fixes, etc.)
Expand All @@ -61,12 +66,12 @@ __Bugfixes__

### 0.3.0

- Modules now use their own namespaces. app/modules/App/Controller/Home.php would use \App\Controller and Home as class.These are autoloaded by the same PSR-4 compatible autoloader that loads the Components and Fluid assets from vendor/.
- Modules now use their own namespaces. app/modules/App/Controller/Home.php would use \App\Controller and Home as class.These are autoloaded by the same PSR-4 compatible autoloader that loads the Components and Parable assets from vendor/.
- enableDebug() has been moved into App.php, to de-clutter index.php even more.

### 0.2.8

- App::redirect($url) will now look if the url is an absolute one, and if not, runs it through App::getUrl($relativeUrl) to get a proper fluid-relevant url. This allows for safe use of App::redirect('/');
- App::redirect($url) will now look if the url is an absolute one, and if not, runs it through App::getUrl($relativeUrl) to get a proper Parable-relevant url. This allows for safe use of App::redirect('/');
- Response content types can now be set by either the shorthand (js) or the full string (application/javascript).
- For those few App::methods() that take a parameter, which is always a maximum of 1, View now recognizes that and passes it as a single variable instead of the usual array.

Expand All @@ -77,6 +82,6 @@ __Bugfixes__

### 0.2.6

- Added Devvoh\Component\Validate and the required assets on Devvoh\Fluid\Entity
- Added Devvoh\Component\Validate and the required assets on Devvoh\Parable\Entity
- On Entity->save(), id is now added to the entity for updates/saves later on or to add to other entities
- Quoting table names due to common terms conflicting with sqlite
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Fluid PHP Framework
## Parable PHP Framework

Fluid is intended to be a tiny, fast and out-of-your-way PHP framework that just lets you get stuff done. To achieve
this, Fluid includes only what is needed to create small to medium-sized web applications, but allows any PSR-4
Parable is intended to be a tiny, fast and out-of-your-way PHP framework that just lets you get stuff done. To achieve
this, Parable includes only what is needed to create small to medium-sized web applications, but allows any PSR-4
compatible library to be added easily for extensibility.

So why build Fluid if there's so many perfectly valid PHP frameworks already out there? Partly to see if I could and
So why build Parable if there's so many perfectly valid PHP frameworks already out there? Partly to see if I could and
partly because I wanted something small, quick and comfortably to quickly build something on top of.

Fluid isn't by any means production-ready, secure or foolproof. So only try it if you feel like filing some bug reports!
Parable isn't by any means production-ready, secure or foolproof. So only try it if you feel like filing some bug reports!

## Requirements

Expand All @@ -17,17 +17,17 @@ Fluid isn't by any means production-ready, secure or foolproof. So only try it i
## Documentation & More

Documentation is currently non-existent, but I am more than willing and available to answer any questions. I am also very
open to suggestions and improvements. Fluid is what I personally need in a framework, and if it seems to fit what you
open to suggestions and improvements. Parable is what I personally need in a framework, and if it seems to fit what you
need as well 'except for these small things', I would love to hear from you to see if maybe we can't work it in somehow.

## Details

Fluid probably won't ever be truly done, but the basis that stands at this point will provide a good platform to build out
Parable probably won't ever be truly done, but the basis that stands at this point will provide a good platform to build out
from. Perhaps dependency injection, unit tests, documentation, etc. will all make their way into it at some point.

Any questions or constructive feedback? Find me at [devvoh.com](http://devvoh.com) or ask me a question by adding an
issue on github.

## License

Fluid PHP Framework is open-sourced software licensed under the MIT license.
Parable PHP Framework is open-sourced software licensed under the MIT license.
6 changes: 3 additions & 3 deletions app/config/config.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; fluid uses single-depth ini file by default but is configured to load sections as well
; Parable uses single-depth ini file by default but is configured to load sections as well

app_title = fluid demo data
app_title = Parable demo data
app_version = 0.0.1

storage_type = sqlite3
storage_location = app/storage/fluid.db
storage_location = app/storage/parable.db
storage_username =
storage_password =
storage_database =
Expand Down
2 changes: 1 addition & 1 deletion app/config/custom.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
app_title = fluid custom demo data
app_title = Parable custom demo data
debug_enabled = 1
4 changes: 2 additions & 2 deletions app/modules/App/Cli/Index.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* @package Fluid
* @package Parable
* @copyright 2015-2016, Robin de Graaf, devvoh webdevelopment
* @license MIT
* @author Robin de Graaf ([email protected])
*/

namespace App\Cli;

use \Devvoh\Fluid\App as App;
use \Devvoh\Parable\App as App;

class Index {

Expand Down
4 changes: 2 additions & 2 deletions app/modules/App/Controller/Home.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* @package Fluid
* @package Parable
* @copyright 2015-2016, Robin de Graaf, devvoh webdevelopment
* @license MIT
* @author Robin de Graaf ([email protected])
*/

namespace App\Controller;

use \Devvoh\Fluid\App as App;
use \Devvoh\Parable\App as App;

class Home extends \Core\Controller\Base {

Expand Down
8 changes: 4 additions & 4 deletions app/modules/App/Model/Users.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @package Fluid
* @package Parable
* @copyright 2015-2016, Robin de Graaf, devvoh webdevelopment
* @license MIT
* @author Robin de Graaf ([email protected])
Expand All @@ -16,16 +16,16 @@
* and it would be wise to leave 'unique' as last (for performance), since it'll make a database connection to check.
* 5) This is it. This is a working model. Note that the database column names should match these properties 1:1.
* 6) In case you do want to use different property names, there is a very basic (no error-checking) toMappedArray
* method in \Devvoh\Fluid\Entity, which will use $entity->getMapper() to get a from => to array with which to map
* method in \Devvoh\Parable\Entity, which will use $entity->getMapper() to get a from => to array with which to map
* the fields. You would use $entity->setUseMapper(true) to enable. This has NOT been tested yet, and is basically
* pseudo-code. Will be tested and implemented properly later.
*/

namespace App\Model;

use \Devvoh\Fluid\App as App;
use \Devvoh\Parable\App as App;

class Users extends \Devvoh\Fluid\Entity {
class Users extends \Devvoh\Parable\Entity {

protected $tableName = 'users';
protected $tableKey = 'id';
Expand Down
4 changes: 2 additions & 2 deletions app/modules/App/Routes.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/**
* @package Fluid
* @package Parable
* @copyright 2015-2016, Robin de Graaf, devvoh webdevelopment
* @license MIT
* @author Robin de Graaf ([email protected])
*/

use \Devvoh\Fluid\App as App;
use \Devvoh\Parable\App as App;

$routes['index'] = [
'method' => 'GET',
Expand Down
10 changes: 6 additions & 4 deletions app/modules/App/View/Home/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Hello from Fluid PHP Framework <?=self::getVersion();?></title>
<title>Hello from Parable PHP Framework <?=self::getVersion();?></title>

<!-- Raleway font from google fonts -->
<link href='https://fonts.googleapis.com/css?family=Raleway:100,400' rel='stylesheet' type='text/css'>
Expand Down Expand Up @@ -43,8 +43,10 @@
font-size: 4rem;
}
.container aside {
font-size: 0.9rem;
font-size: 0.82rem;
margin-top: -1.3rem;
letter-spacing: 3px;
margin-left: 3px;
}
@keyframes fade-in {
from {opacity: 0;}
Expand All @@ -58,12 +60,12 @@

<article class="container">
<header>
Fluid <?=self::getVersion();?>
Parable <?=self::getVersion();?>
</header>
<aside>
PHP framework by <a href="http://devvoh.com">devvoh</a>
-
<a href="https://github.com/devvoh/Fluid">github page</a>
<a href="https://github.com/devvoh/parable">github page</a>
</aside>
</article>

Expand Down
4 changes: 2 additions & 2 deletions app/modules/Core/Controller/Base.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* @package Fluid
* @package Parable
* @copyright 2015-2016, Robin de Graaf, devvoh webdevelopment
* @license MIT
* @author Robin de Graaf ([email protected])
*/

namespace Core\Controller;

use \Devvoh\Fluid\App as App;
use \Devvoh\Parable\App as App;

class Base {
}
Loading

0 comments on commit 73e2c56

Please sign in to comment.