<commit_before>Upgrade Guide
=============

Pre-2.0.0 -> 2.0.0
------------------

## Mapper changes

### Update overridden `insert` and `update` methods

Internally, `insert` and `update` call `insertRow` and `updateRow`, respectively, in order to perfom the actual database queries. Children who overrode `insert` or `update` previously may have called `insertRow` and `updateRow` internally. However, the logic that sets magic created/updated timestamp columns was moved from `insertRow` into `insert`. (Same for `updateRow` and `update`.)

```PHP
// Pre-2.0.0

use Synapse\Mapper;
use Synapse\Entity\AbstractEntity;

class FooMapper extends Mapper\AbstractMapper {
    use InserterTrait;

    public function insert(AbstractEntity $entity)
    {<commit_msg>Refs #137 - Add note to UPGRADE_GUIDE about changes.<commit_after>Upgrade Guide
=============

Pre-2.0.0 -> 2.0.0
------------------

## Controller changes

### Use `$this->getUser()` instead of `$this->user()` to get the logged in user

The old method alias in `SecurityAwareTrait` has been removed.

## Mapper changes

### Update overridden `insert` and `update` methods

Internally, `insert` and `update` call `insertRow` and `updateRow`, respectively, in order to perfom the actual database queries. Children who overrode `insert` or `update` previously may have called `insertRow` and `updateRow` internally. However, the logic that sets magic created/updated timestamp columns was moved from `insertRow` into `insert`. (Same for `updateRow` and `update`.)

```PHP
// Pre-2.0.0

use Synapse\Mapper;
use Synapse\Entity\AbstractEntity;

class FooMapper extends Mapper\AbstractMapper {
    use InserterTrait;

    public function insert(AbstractEntity $entity)
    {
{'fraction_non_alphanumeric': 0.1359167148640833, 'fraction_numerical': 0.012145748987854251, 'mean_word_length': 4.258358662613982, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2174088', 'n_tokens_mistral': 507, 'n_tokens_neox': 487, 'n_words': 187}