Skip to content

Commit

Permalink
Updating README, CHANGELOG and TESTING
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrrgn committed Oct 25, 2011
1 parent 1bc1061 commit 1e7e332
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 15 deletions.
75 changes: 75 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,80 @@
# Changelog

## v1.1

### System changes

* Deprication of `Request::show_404()`, replaced with `throw new HttpNotFoundException` that has a handle method to show the 404
* Support for `handle()` method that is run when an exception isn't caught before `Error::exception_handler()` catches it.
* Support for special `_404_` route now in `public/index.php` thus no longer part of the core but still supported as a 'official default'
* Closures are now also supported in routes, thus routing to a Closure instead of a controler/method uri. Also added support for any type of callable in Route extensions you write yourself.
* Closure support in all getters & setters: if you get a value and also input a default the default can also be a Closure and you'll get the result of that. For setters the input can also be a closure and the result of the Closure will be set. (except for `View::set()` as one might want to pass a closure to the View)
* Moved the Environment setting from the `app/config/config.php` file to the `app/bootstrap.php` file.
* All `factory()` methods have been renamed to `forge()`. This name better states the method's function. The `factory()` methods are still there for backwards compatibility, but are deprecated and will log warning messages when used.
* The `$this->response` Response object is now deprecated. Your action methods should return either a string, View object, ViewModel object or a Response object.
* Added the `fuel/app/vendor` directory to the default install.
* You can now have an unlimited number of sub-directories for your controllers. (e.g. `classes/controller/admin/users/groups.php` with a class name of `Controller_Admin_Users_Groups` would be at `site.com/admin/users/groups`)
* There is no longer a default controller for directories. It used to be that going to something like `site.com/admin` would bring up `Controller_Admin_Admin` in `classes/controller/admin/admin.php`. Now you must place that controller at it's expected location `classes/controller/admin.php` with a name of `Controller_Admin`.
* A `Controller::after()` method now gets passed the response of the controller, it must return that response (or modified) as well.
* Added new *function* `get_real_class()` to which you can pass a classname and it will return the actual class, to be used on classes of which you're not sure whether it is an alias or not.
* Module routes are prepended to the routes array when Fuel detects the fist URI segment as a module, therefor parsing them before an `(:any)` route in the app config.
* Config is now environment aware and allows partial/full overwriting of the base config from subdirectories in the config dir named after the environment.
* Added a new `Theme` class. It allows you to easily add Theme support to your applications.
* `Fuel_Exception` has been renamed to `FuelException`
* `Fuel::find_file()` and related methods are now deprecated. Use the `Finder` class instead (e.g. `Finder::search()`).
* Migrations are now supported in Modules and Packages
* Routing has 3 new shortcuts:
* `:almun` matches all utf-8 alphabetical and numeric characters
* `:num` matches all numeric characters.
* `:alpha` matches all utf-8 alphabetical characters
* Put the `Autoloader` class into `Fuel\Core` to allow extending it, it must now be required in the app bootstrap file which is also the location where you must require your own extension.

### Security related

* Added Fuel's own response object class `Fuel\Core\Response` to default whitelist in `app/config/config.php` of objects that aren't encoded on output by the View when passed.
* The `security.auto_encode_view_data` config option in `app/config/config.php` has been renamed to `security.auto_filter_output`.
* `stdClass` was part of the default whitelisted classes from output encoding, this was a bug and it has been removed.

### Specific classes

* __Arr__: Added methods `Arr::get()`, `Arr::set()` and `Arr::prepend()`.
* __Arr__: `Arr::element()` and `Arr::elements()` have been deprecated. Use the new `Arr::get()` instead.
* __Database__: Using transactions will no longer prevent exceptions, exceptions are thrown and should be handled by the dev. The `Database_Transaction` class has been deprecated as it has little use because of this change.
* __File__: `File::read_dir()` (and related methods on Area and Directory handler) now return dirnames with directory separator suffix
* __Fieldset_Field__: Parsing of validation rules has been moved from `Fieldset_Field::add_rule()` to `Validaton::_find_fule()`, from the outside the method still works the same but notices for inactive rules are now only shown when running the validation.
* __Form__: Added inline error reporting, which must first be switched on in config and will replace an `{error_msg}` tag
* __Form__: New default form template which puts it inside a table.
* __Fuel__: Added `Fuel::value()` which checks if the given value is a Closure, and returns the result of the Closure if it is, otherwise, simply the value.
* __Image__: No longer throws `Fuel_Exception` for any type of exception but instead `RuntimeException`, `InvalidArguementException` and `OutOfBoundsException` where appropriate.
* __Input__: `Input::post(null)` doesn't work to get full post array anymore, just `Input::post()` without params - same for all other Input methods
* __Input__: `Input::get_post()` has been deprecated and replaced by `Input::param()`. It now also includes PUT and DELETE variables.
* __Input / Uri__: `Uri::detect()` moved to `Input::uri()` as it is part of the input and thus should be part of the input class
* __Request__: You can now also do external requests through the Request class, for now only a curl driver: `Request::forge('http//url', 'curl')` or `Request::forge('http//url', array('driver' => 'curl', 'method' => 'post', 'params' => array())`.
* __Validation__: `Validation::errors()` is depricated and replaced by singular form `Validation::error()` to be more in line with other class methods
* __Validation__: New 3rd parameter added to `Validation::run()` that allows adding callables for the duration of the run.
* __View__: The view class has been refactored and works much better now. Output filtering is vastly improved.
* __View__: `View::capture()` has been split into two protected instance methods: `process_file()` and `get_data()`. You will need to update your View class extensions.
* __View__: `View::$auto_encode` has been removed. It has been replaced but auto_filter, which is per-view instance.
* __ViewModel__: Refactored the class internals to work more transparently with the `View`.
* __ViewModel__: Deprecated `$this->_template` and renamed it to `$this->_view`.
* __ViewModel__: Updated to work with the refactored `View` class. Added `$this->bind()`.
* __ViewModel__: Deprecated `$this->set_template()` and renamed it to `$this->set_view()`.
* __Html__: Removed (not deprecated) the following methods: `Html::h()`, `Html::br()`, `Html::hr()`, `Html::nbs()`, `Html::title()`, `Html::header()`. You should simply write the HTML yourself.
* __Config__: Added Config file drivers for PHP, INI, JSON and Yaml. They are detected by file extension (e.g. `Config::load('foo.yml')` will load and parse the Yaml).

### Packages

* __Auth__: Renamed default table name from `simpleusers` to `users`.
* __Auth__: Added config options for DB connection and table columns used for fetching the user.
* __Auth__: Removed default config for groups & roles in `simpleauth.php` config file, only commented out examples left.
* __Orm__: Lots of tweaks to `Observer_Validation` related to changes to `Validation` & `Fieldset_Field` classes. Also changed it to only save properties that are actually changed.
* __Orm__: The `ValidationFailed` thrown when the `Observer_Validation` fails now includes a reference to the Fieldset instance that failed: `$valfailed->get_fieldset();`
* __Orm__: Added support for changing the type of join used when fetching relations, example: `Model_Example::query()->related('something', array('join_type' => 'inner'))->get();`
* __Orm__: Observers are no longer singleton but one instance per model with per model settings, check docs for more info.
* __Parser__: Added Parser package to the default install.
* __Parser__: Mustache is now part of the Parser package by default. Version 0.7.1.
* __Email__: The Email package is added.

## v1.0

### Core
Expand Down
10 changes: 5 additions & 5 deletions README.md
@@ -1,10 +1,9 @@
#Fuel
#FuelPHP

* [Website](http://fuelphp.com/)
* [Documentation](http://fuelphp.com/docs) and in its own [git repo](https://github.com/fuel/docs)
* [Bugtracker & feature requests](http://dev.fuelphp.com)
* [Forums](http://fuelphp.com/forums) for comments, discussion and community support
* Version: 1.1-dev
* Version: 1.1-rc1

## Description

Expand All @@ -16,16 +15,17 @@ Fuel is a fast, lightweight PHP 5.3 framework. In an age where frameworks are a
* Jelmer Schreuder - Senior Developer ([http://jelmerschreuder.nl/](http://jelmerschreuder.nl/))
* Phil Sturgeon - Developer ([http://philsturgeon.co.uk](http://philsturgeon.co.uk))
* Harro Verton - Developer ([http://wanwizard.eu/](http://wanwizard.eu/))
* Frank de Jonge - Developer ([http://frenky.net/](http://frenky.net/))

##Downloading Fuel
##Downloading FuelPHP

Since Fuel uses Submodules and since GitHub Downloads don't support submodules, do not download Fuel using the Downloads link here.

We will be putting a "Download" section on <http://fuelphp.com> soon.

##Cloning Fuel

Fuel uses submodules for things like the **core** folder. After you clone the repository you will need to init and update the submodules.
FuelPHP uses submodules for things like the **core** folder. After you clone the repository you will need to init and update the submodules.

Here is the basic usage:

Expand Down
20 changes: 10 additions & 10 deletions TESTING.md
@@ -1,6 +1,6 @@
# Testing Fuel
# Testing FuelPHP

Fuel uses [PHPUnit](https://github.com/sebastianbergmann/phpunit/) for it's Unit Testing needs. It must be installed for the tests to run.
FuelPHP uses [PHPUnit](https://github.com/sebastianbergmann/phpunit/) for it's Unit Testing needs. It must be installed for the tests to run.

**NOTE: No code will be accepted without tests written.**

Expand All @@ -17,7 +17,7 @@ That's it! You can also tell it specific groups (which we will get into in minut
As you can see we've wrapped the phpunit command with our own Oil utility which will in time become more and more useful. If you wish to get right at the phpunit tests manually you can point it to our .xml configuration file:

$ phpunit -c fuel/core/phpunit.xml --group Core

This may break or change in future versions so it's suggested you stick with using Oil for your testing.

## Writing Tests
Expand All @@ -42,7 +42,7 @@ Some example names:
Tests_Arr in fuel/core/tests/arr.php
Tests_Image in fuel/core/tests/image.php
Tests_Fuel in fuel/core/tests/fuel.php

// Bad
Arrtests
Somestuff
Expand All @@ -55,28 +55,28 @@ Here is an example of a core class test with proper DocBlocks:

/**
* Arr class tests
*
*
* @group Core
* @group Arr
*/
class Tests_Arr extends TestCase {

/**
* Tests Arr::element()
*
*
* @test
*/
public function test_element()
{
// Test code here
}
}

All App tests should be in the **app** group.

### Namespaces

All **core** tests should be in the **Fuel\Core** namespace. This is so that we are sure we are testing the core classes,
All **core** tests should be in the **Fuel\Core** namespace. This is so that we are sure we are testing the core classes,
not any extensions that may be in *app*.

App tests can be in any namespace.
Expand All @@ -93,15 +93,15 @@ All tests should extend the **Fuel\Core\TestCase** class.

/**
* Arr class tests
*
*
* @group Core
* @group Arr
*/
class Tests_Arr extends TestCase {

/**
* Tests Arr::flatten_assoc()
*
*
* @test
*/
public function test_flatten_assoc()
Expand Down

0 comments on commit 1e7e332

Please sign in to comment.