changes.md 6.78 KB
Newer Older
Taylor Otwell committed
1
# Laravel Change Log
2 3 4

## Contents

5 6
- [Laravel 3.2](#3.2)
- [Upgrading From 3.1](#upgrade-3.2)
7 8
- [Laravel 3.1.6](#3.1.6)
- [Upgrading From 3.1.5](#upgrade-3.1.6)
9 10
- [Laravel 3.1.5](#3.1.5)
- [Upgrading From 3.1.4](#upgrade-3.1.5)
Taylor Otwell committed
11 12
- [Laravel 3.1.4](#3.1.4)
- [Upgrading From 3.1.3](#upgrade-3.1.4)
13 14
- [Laravel 3.1.3](#3.1.3)
- [Upgrading From 3.1.2](#uprade-3.1.3)
15 16
- [Laravel 3.1.2](#3.1.2)
- [Upgrading From 3.1.1](#upgrade-3.1.2)
Taylor Otwell committed
17 18
- [Laravel 3.1.1](#3.1.1)
- [Upgrading From 3.1](#upgrade-3.1.1)
19 20 21
- [Laravel 3.1](#3.1)
- [Upgrading From 3.0](#upgrade-3.1)

22 23 24
<a name="3.2"></a>
## Laravel 3.2

Taylor Otwell committed
25 26 27
- [Added `to_array` method to the base Eloquent model](/docs/database/eloquent#to-array).
- [Added `$hidden` static variable to the base Eloquent model](/docs/database/eloquent#to-array).
- [Added `sync` method to has\_many\_and\_belongs\_to Eloquent relationship](/docs/database/eloquent#sync-method).
28
- [Added `save` method to has\_many Eloquent relationship](/docs/database/eloquent#has-many-save).
Taylor Otwell committed
29
- Migrated to the Symfony HttpFoundation component for core request / response handling.
Taylor Otwell committed
30 31
- Fixed the passing of strings into the Input::except method.
- Fixed replacement of optional parameters in URL::transpose method.
32
- Improved View performance by only loading contents from file once.
33
- Fix handling of URLs beginning with has in URL::to.
Taylor Otwell committed
34
- Fix the resolution of unset Eloquent attributes.
Taylor Otwell committed
35
- Allows pivot table timestamps to be disabled.
36 37 38 39 40

<a name="upgrade-3.2"></a>
## Upgrading From 3.1

- Replace the **laravel** folder.
Taylor Otwell committed
41

42 43 44 45 46 47 48 49 50 51
<a name="3.1.6"></a>
## Laravel 3.1.6

- Fixes many-to-many eager loading in Eloquent.

<a name="upgrade-3.1.6"></a>
## Upgrading From 3.1.5

- Replace the **laravel** folder.

52 53 54 55 56 57 58 59 60 61
<a name="3.1.5"></a>
## Laravel 3.1.5

- Fixes bug that could allow secure cookies to be sent over HTTP.

<a name="upgrade-3.1.5"></a>
## Upgrading From 3.1.4

- Replace the **laravel** folder.

Taylor Otwell committed
62 63 64 65 66 67 68 69 70 71 72
<a name="3.1.4"></a>
## Laravel 3.1.4

- Fixes Response header casing bug.
- Fixes SQL "where in" (...) short-cut bug.

<a name="upgrade-3.1.4"></a>
## Upgrading From 3.1.3

- Replace the **laravel** folder.

73 74 75 76 77 78
<a name="3.1.3"></a>
## Laravel 3.1.3

- Fixes **delete** method in Eloquent models.

<a name="upgrade-3.1.3"></a>
Taylor Otwell committed
79
## Upgrade From 3.1.2
80 81 82

- Replace the **laravel** folder.

83 84 85 86 87 88 89 90 91
<a name="3.1.2"></a>
## Laravel 3.1.2

- Fixes Eloquent query method constructor conflict.

<a name="upgrade-3.1.2"></a>
## Upgrade From 3.1.1

- Replace the **laravel** folder.
92

Taylor Otwell committed
93 94 95 96 97 98 99 100 101 102
<a name="3.1.1"></a>
## Laravel 3.1.1

- Fixes Eloquent model hydration bug involving custom setters.

<a name="upgrade-3.1.1"></a>
## Upgrading From 3.1

- Replace the **laravel** folder.

103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
<a name="3.1"></a>
## Laravel 3.1

- Added events to logger for more flexibility.
- Added **database.fetch** configuration option.
- Added controller factories for injecting any IoC.
- Added **link_to_action** HTML helpers.
- Added ability to set default value on Config::get.
- Added the ability to add pattern based filters.
- Improved session ID assignment.
- Added support for "unsigned" integers in schema builder.
- Added config, view, and lang loaders.
- Added more logic to **application/start.php** for more flexibility.
- Added foreign key support to schema builder.
- Postgres "unique" indexes are now added with ADD CONSTRAINT.
- Added "Event::until" method.
- Added "memory" cache and session drivers.
- Added Controller::detect method.
- Added Cache::forever method.
- Controller layouts now resolved in Laravel\Controller __construct.
- Rewrote Eloquent and included in core.
- Added "match" validation rule.
- Fixed table prefix bug.
- Added Form::macro method.
- Added HTML::macro method.
- Added Route::forward method.
- Prepend table name to default index names in schema.
- Added "forelse" to Blade.
- Added View::render_each.
- Able to specify full path to view (path: ).
- Added support for Blade template inheritance.
Taylor Otwell committed
134
- Added "before" and "after" validation checks for dates.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152

<a name="upgrade-3.1"></a>
## Upgrading From 3.0

### Replace your **application/start.php** file.

The default **start.php** file has been expanded in order to give you more flexibility over the loading of your language, configuration, and view files. To upgrade your file, copy your current file and paste it at the bottom of a copy of the new Laravel 3.1 start file. Next, scroll up in the **start** file until you see the default Autoloader registrations (line 61 and line 76). Delete both of these sections since you just pasted your previous auto-loader registrations at the bottom of the file.

### Remove the **display** option from your **errors** configuration file.

This option is now set at the beginning of your **application/start** file.

### Call the parent controller's constructor from your controller.

Simply add a **parent::__construct();** to to any of your controllers that have a constructor.

### Prefix Laravel migration created indexes with their table name.

Taylor Otwell committed
153
If you have created indexes on tables using the Laravel migration system and you used to the default index naming scheme provided by Laravel, prefix the index names with their table name on your database. So, if the current index name is "id_unique" on the "users" table, make the index name "users_id_unique".
154

Taylor Otwell committed
155 156 157 158
### Add alias for Eloquent in your application configuration.

Add the following to the **aliases** array in your **application/config/application.php** file:

Taylor Otwell committed
159
	'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
160
	'Blade' => 'Laravel\\Blade',
Taylor Otwell committed
161

162 163 164 165 166 167 168 169 170 171 172 173 174 175
### Update Eloquent many-to-many tables.

Eloquent now maintains **created_at** and **updated_at** column on many-to-many intermediate tables by default. Simply add these columns to your tables. Also, many-to-many tables are now the singular model names concatenated with an underscore. For example, if the relationship is between User and Role, the intermediate table name should be **role_user**.

### Remove Eloquent bundle.

If you are using the Eloquent bundle with your installation, you can remove it from your bundles directory and your **application/bundles.php** file. Eloquent version 2 is included in the core in Laravel 3.1. Your models can also now extend simply **Eloquent** instead of **Eloquent\Model**.

### Update your **config/strings.php** file.

English pluralization and singularization is now automatic. Just completely replace your **application/config/strings.php** file.

### Add the **fetch** option to your database configuration file.

176 177 178 179 180 181 182 183 184 185 186 187
A new **fetch** option allows you to specify in which format you receive your database results. Just copy and paste the option from the new **application/config/database.php** file.

### Add **database** option to your Redis configuration.

If you are using Redis, add the "database" option to your Redis connection configurations. The "database" value can be zero by default.

	'redis' => array(
		'default' => array(
			'host' => '127.0.0.1',
			'port' => 6379,
			'database' => 0
		),
188
	),