<commit_before># Upgrade Guide

- [Upgrading To 5.1.0](#upgrade-5.1.0)
- [Upgrading To 5.0.16](#upgrade-5.0.16)
- [Upgrading To 5.0 From 4.2](#upgrade-5.0)
- [Upgrading To 4.2 From 4.1](#upgrade-4.2)
- [Upgrading To 4.1.29 From <= 4.1.x](#upgrade-4.1.29)
- [Upgrading To 4.1.26 From <= 4.1.25](#upgrade-4.1.26)
- [Upgrading To 4.1 From 4.0](#upgrade-4.1)

<a name="upgrade-5.1.0"></a>
## Upgrading To 5.1.0

### Update `bootstrap/autoload.php`

Update the `$compiledPath` variable in `bootstrap/autoload.php` to the following:

	$compiledPath = __DIR__.'/cache/compiled.php';

### Create `bootstrap/cache` Directory

Within your `bootstrap` directory, create a `cache` directory (`bootstrap/cache`). Place a `.gitignore` file in this directory with the following contents:

	*
	!.gitignore

This directory should be writable, and will be used by the framework to store temporary optimization files like `compiled.php`, `routes.php`, `config.php`, and `services.json`.

<a name="upgrade-5.0.16"></a>
## Upgrading To 5.0.16
<commit_msg>Upgrade notes for the collection class<commit_after># Upgrade Guide

- [Upgrading To 5.1.0](#upgrade-5.1.0)
- [Upgrading To 5.0.16](#upgrade-5.0.16)
- [Upgrading To 5.0 From 4.2](#upgrade-5.0)
- [Upgrading To 4.2 From 4.1](#upgrade-4.2)
- [Upgrading To 4.1.29 From <= 4.1.x](#upgrade-4.1.29)
- [Upgrading To 4.1.26 From <= 4.1.25](#upgrade-4.1.26)
- [Upgrading To 4.1 From 4.0](#upgrade-4.1)

<a name="upgrade-5.1.0"></a>
## Upgrading To 5.1.0

### Update `bootstrap/autoload.php`

Update the `$compiledPath` variable in `bootstrap/autoload.php` to the following:

	$compiledPath = __DIR__.'/cache/compiled.php';

### Create `bootstrap/cache` Directory

Within your `bootstrap` directory, create a `cache` directory (`bootstrap/cache`). Place a `.gitignore` file in this directory with the following contents:

	*
	!.gitignore

This directory should be writable, and will be used by the framework to store temporary optimization files like `compiled.php`, `routes.php`, `config.php`, and `services.json`.

### The collection class

#### The `groupBy` method now returns nested collections

If you need them to be actual arrays, `map` over them:

	$collection->groupBy('type')->map(function($item)
	{
		return $item->all();
	});

#### The `lists` method now returns a collection instance

If you need an actual array, you should call `all()` on the result:

	$collection->lists('id')->all();

<a name="upgrade-5.0.16"></a>
## Upgrading To 5.0.16

{'fraction_non_alphanumeric': 0.17022993142396128, 'fraction_numerical': 0.05486083098023396, 'mean_word_length': 4.11340206185567, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6087416', 'n_tokens_mistral': 980, 'n_tokens_neox': 879, 'n_words': 259}