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

## Contents

Taylor Otwell committed
5 6
- [Laravel 3.2.5](#3.2.5)
- [Upgrading From 3.2.4](#upgrade-3.2.5)
Taylor Otwell committed
7 8
- [Laravel 3.2.4](#3.2.4)
- [Upgrading From 3.2.3](#upgrade-3.2.4)
Taylor Otwell committed
9 10
- [Laravel 3.2.3](#3.2.3)
- [Upgrading From 3.2.2](#upgrade-3.2.3)
Taylor Otwell committed
11 12
- [Laravel 3.2.2](#3.2.2)
- [Upgrading From 3.2.1](#upgrade-3.2.2)
Taylor Otwell committed
13 14
- [Laravel 3.2.1](#3.2.1)
- [Upgrading From 3.2](#upgrade-3.2.1)
15 16
- [Laravel 3.2](#3.2)
- [Upgrading From 3.1](#upgrade-3.2)
17 18
- [Laravel 3.1.9](#3.1.9)
- [Upgrading From 3.1.8](#upgrade-3.1.9)
19 20
- [Laravel 3.1.8](#3.1.8)
- [Upgrading From 3.1.7](#upgrade-3.1.8)
21 22
- [Laravel 3.1.7](#3.1.7)
- [Upgrading From 3.1.6](#upgrade-3.1.7)
23 24
- [Laravel 3.1.6](#3.1.6)
- [Upgrading From 3.1.5](#upgrade-3.1.6)
25 26
- [Laravel 3.1.5](#3.1.5)
- [Upgrading From 3.1.4](#upgrade-3.1.5)
Taylor Otwell committed
27 28
- [Laravel 3.1.4](#3.1.4)
- [Upgrading From 3.1.3](#upgrade-3.1.4)
29 30
- [Laravel 3.1.3](#3.1.3)
- [Upgrading From 3.1.2](#uprade-3.1.3)
31 32
- [Laravel 3.1.2](#3.1.2)
- [Upgrading From 3.1.1](#upgrade-3.1.2)
Taylor Otwell committed
33 34
- [Laravel 3.1.1](#3.1.1)
- [Upgrading From 3.1](#upgrade-3.1.1)
35 36 37
- [Laravel 3.1](#3.1)
- [Upgrading From 3.0](#upgrade-3.1)

Taylor Otwell committed
38
<a name="3.2.5"></a>
Jason Lewis committed
39

Taylor Otwell committed
40 41 42 43 44 45
- Revert nested where code back to 3.2.3 tag.

<a name="upgrade-3.2.5"></a>
## Upgrading From 3.2.4

- Replace the **laravel** folder.
Jason Lewis committed
46

Taylor Otwell committed
47 48 49 50
<a name="3.2.4"></a>
## Laravel 3.2.4

- Speed up many to many eager loading mapping.
51
- Tweak the Eloquent::changed() method.
Taylor Otwell committed
52
- Various bug fixes and improvements.
Taylor Otwell committed
53 54 55 56 57 58

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

- Replace the **laravel** folder.

Taylor Otwell committed
59 60
<a name="3.2.3"></a>
## Laravel 3.2.3
Taylor Otwell committed
61

Taylor Otwell committed
62
- Fixed eager loading bug in Eloquent.
Taylor Otwell committed
63 64
- Added `laravel.resolving` event for all IoC resolutions.

Taylor Otwell committed
65 66
<a name="upgrade-3.2.3"></a>
## Upgrading From 3.2.2
Taylor Otwell committed
67 68 69

- Replace the **laravel** folder.

Taylor Otwell committed
70 71 72 73
<a name="3.2.2"></a>
## Laravel 3.2.2

- Overall improvement of Postgres support.
Taylor Otwell committed
74
- Fix issue in SQL Server Schema grammar.
Taylor Otwell committed
75 76 77
- Fix issue with eager loading and `first` or `find`.
- Fix bug causing parameters to not be passed to `IoC::resolve`.
- Allow the specification of hostnames in environment setup.
Taylor Otwell committed
78
- Added `DB::last_query` method.
Taylor Otwell committed
79
- Added `password` option to Auth configuration.
Taylor Otwell committed
80 81 82 83 84 85

<a name="upgrade-3.2.2"></a>
## Upgrading From 3.2.1

- Replace the **laravel** folder.

Taylor Otwell committed
86 87 88 89
<a name="3.2.1"></a>
## Laravel 3.2.1

- Fixed bug in cookie retrieval when cookie is set on same request.
Taylor Otwell committed
90
- Fixed bug in SQL Server grammar for primary keys.
Taylor Otwell committed
91
- Fixed bug in Validator on PHP 5.4.
Taylor Otwell committed
92
- If HTTP / HTTPS is not specified for generated links, current protocol is used.
Taylor Otwell committed
93
- Fix bug in Eloquent auth driver.
Taylor Otwell committed
94
- Added `format` method to message container.
Taylor Otwell committed
95 96 97 98 99 100

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

- Replace the **laravel** folder.

101 102 103
<a name="3.2"></a>
## Laravel 3.2

Taylor Otwell committed
104 105 106
- [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).
107
- [Added `save` method to has\_many Eloquent relationship](/docs/database/eloquent#has-many-save).
108
- [Added `unless` structure to Blade template engine](/docs/views/templating#blade-unless).
109
- [Added Blade comments](/docs/views/templating#blade-comments).
Taylor Otwell committed
110
- [Added simpler environment management](/docs/install#environments).
111
- Added `Blade::extend()` method to define custom blade compilers.
Taylor Otwell committed
112
- Added `View::exists` method.
Taylor Otwell committed
113
- Use [Memcached](http://php.net/manual/en/book.memcached.php) API instead of older [Memcache](http://php.net/manual/en/book.memcache.php) API.
114
- Added support for bundles outside of the bundle directory.
Taylor Otwell committed
115
- Added support for DateTime database query bindings.
Taylor Otwell committed
116
- Migrated to the Symfony HttpFoundation component for core request / response handling.
117 118 119
- Fixed the passing of strings into the `Input::except` method.
- Fixed replacement of optional parameters in `URL::transpose` method.
- Improved `update` handling on `Has_Many` and `Has_One` relationships.
120
- Improved View performance by only loading contents from file once.
Taylor Otwell committed
121
- Fix handling of URLs beginning with hashes in `URL::to`.
Taylor Otwell committed
122
- Fix the resolution of unset Eloquent attributes.
Taylor Otwell committed
123
- Allows pivot table timestamps to be disabled.
124 125
- Made the `get_timestamp` Eloquent method static.
- `Request::secure` now takes `application.ssl` configuration option into consideration.
126
- Simplified the `paths.php` file.
127
- Only write file caches if number of minutes is greater than zero.
128
- Added `$default` parameter to Bundle::option method.
Taylor Otwell committed
129
- Fixed bug present when using Eloquent models with Twig.
Taylor Otwell committed
130
- Allow multiple views to be registered for a single composer.
Taylor Otwell committed
131
- Added `Request::set_env` method.
132
- `Schema::drop` now accepts `$connection` as second parameter.
133
- Added `Input::merge` method.
Taylor Otwell committed
134
- Added `Input::replace` method.
135
- Added saving, saved, updating, creating, deleting, and deleted events to Eloquent.
Taylor Otwell committed
136
- Added new `Sectionable` interface to allow cache drivers to simulate namespacing.
137 138
- Added support for `HAVING` SQL clauses.
- Added `array_pluck` helper, similar to pluck method in Underscore.js.
Taylor Otwell committed
139
- Allow the registration of custom cache and session drivers.
140
- Allow the specification of a separate asset base URL for using CDNs.
141
- Allow a `starter` Closure to be defined in `bundles.php` to be run on Bundle::start.
Taylor Otwell committed
142
- Allow the registration of custom database drivers.
Taylor Otwell committed
143
- New, driver based authentication system.
Taylor Otwell committed
144
- Added Input::json() method for working with applications using Backbone.js or similar.
145
- Added Response::json method for creating JSON responses.
146
- Added Response::eloquent method for creating Eloquent responses.
Taylor Otwell committed
147
- Fixed bug when using many-to-many relationships on non-default database connection.
148
- Added true reflection based IoC to container.
Taylor Otwell committed
149
- Added `Request::route()->controller` and `Request::route()->controller_action`.
Taylor Otwell committed
150
- Added `Event::queue`, `Event::flusher`, and `Event::flush` methods to Event class.
151
- Added `array_except` and `array_only` helpers, similar to `Input::except` and `Input::only` but for arbitrary arrays.
152 153 154 155

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

Taylor Otwell committed
156 157
- Add new `asset_url` and `profiler` options to application configuration.
- Replace **auth** configuration file.
Dayle Rees committed
158 159 160 161 162 163 164 165 166 167 168 169

Add the following entry to the `aliases` array in `config/application.php`..

	'Profiler'   => 'Laravel\\Profiling\\Profiler',

Add the following code above `Blade::sharpen()` in `application/start.php`..

	if (Config::get('application.profiler'))
	{
	    Profiler::attach();
	}

Taylor Otwell committed
170
- Upgrade the **paths.php** file.
171
- Replace the **laravel** folder.
Taylor Otwell committed
172

173 174 175 176 177 178 179 180 181 182
<a name="3.1.9"></a>
## Laravel 3.1.9

- Fixes cookie session driver bug that caused infinite loop on some occasions.

<a name="upgrade-3.1.9"></a>
## Upgrading From 3.1.8

- Replace the **laravel** folder.

183 184 185 186 187 188 189 190 191 192
<a name="3.1.8"></a>
## Laravel 3.1.8

- Fixes possible WSOD when using Blade's @include expression.

<a name="upgrade-3.1.8"></a>
## Upgrading From 3.1.7

- Replace the **laravel** folder.

193 194 195 196 197 198
<a name="3.1.7"></a>
## Laravel 3.1.7

- Fixes custom validation language line loading from bundles.
- Fixes double-loading of classes when overriding the core.
- Classify migration names.
Taylor Otwell committed
199 200 201 202 203

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

- Replace the **laravel** folder.
204

205 206 207 208 209 210 211 212 213 214
<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.

215 216 217 218 219 220 221 222 223 224
<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
225 226 227 228 229 230 231 232 233 234 235
<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.

236 237 238 239 240 241
<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
242
## Upgrade From 3.1.2
243 244 245

- Replace the **laravel** folder.

246 247 248 249 250 251 252 253 254
<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.
255

Taylor Otwell committed
256 257 258 259 260 261 262 263 264 265
<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.

266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
<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
297
- Added "before" and "after" validation checks for dates.
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315

<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
316
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".
317

Taylor Otwell committed
318 319 320 321
### 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
322
	'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
323
	'Blade' => 'Laravel\\Blade',
Taylor Otwell committed
324

325 326 327 328 329 330 331 332 333 334 335 336 337 338
### 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.

339 340 341 342 343 344 345 346 347 348 349 350
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
		),
351
	),