Skip to content

Commit

Permalink
Merge pull request doctrine#9196 from greg0ire/2.11.x
Browse files Browse the repository at this point in the history
Merge 2.10.x up into 2.11.x
  • Loading branch information
greg0ire authored Nov 20, 2021
2 parents 1e971d8 + ed642c7 commit 2488b4c
Show file tree
Hide file tree
Showing 32 changed files with 795 additions and 297 deletions.
11 changes: 7 additions & 4 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ Because of that, functionality that aims to do so has been deprecated:

# Upgrade to 2.10

## BC Break: `UnitOfWork` now relies on SPL object IDs, not hashes

When calling the following methods, you are now supposed to use the result of
`spl_object_id()`, and not `spl_object_hash()`:
- `UnitOfWork::clearEntityChangeSet()`
- `UnitOfWork::setOriginalEntityProperty()`

## BC Break: Removed `TABLE` id generator strategy

The implementation was unfinished for 14 years.
Expand All @@ -26,10 +33,6 @@ It is now deprecated to rely on:
- `Doctrine\ORM\Mapping\ClassMetadata::$tableGeneratorDefinition`;
- or `Doctrine\ORM\Mapping\ClassMetadata::isIdGeneratorTable()`.

## BC Break: Removed possibility to extend the doctrine mapping xml schema with anything

If you want to extend it now you have to provide your own validation schema.

## New method `Doctrine\ORM\EntityManagerInterface#wrapInTransaction($func)`

Works the same as `Doctrine\ORM\EntityManagerInterface#transactional()` but returns any value returned from `$func` closure rather than just _non-empty value returned from the closure or true_.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"doctrine/annotations": "^1.13",
"doctrine/coding-standard": "^9.0",
"phpbench/phpbench": "^0.16.10 || ^1.0",
"phpstan/phpstan": "0.12.99",
"phpstan/phpstan": "1.0.1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
"squizlabs/php_codesniffer": "3.6.1",
"symfony/cache": "^4.4 || ^5.2",
Expand Down
2 changes: 2 additions & 0 deletions docs/en/reference/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ in well defined units of work. Work with your objects and modify
them as usual and when you're done call ``EntityManager#flush()``
to make your changes persistent.

.. _unit-of-work:

The Unit of Work
~~~~~~~~~~~~~~~~

Expand Down
6 changes: 3 additions & 3 deletions docs/en/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ Or if you prefer YAML:

Inside the ``Setup`` methods several assumptions are made:

- If `$isDevMode` is true caching is done in memory with the ``ArrayCache``. Proxy objects are recreated on every request.
- If `$isDevMode` is false, check for Caches in the order APC, Xcache, Memcache (127.0.0.1:11211), Redis (127.0.0.1:6379) unless `$cache` is passed as fourth argument.
- If `$isDevMode` is false, set then proxy classes have to be explicitly created through the command line.
- If ``$isDevMode`` is true caching is done in memory with the ``ArrayCache``. Proxy objects are recreated on every request.
- If ``$isDevMode`` is false, check for Caches in the order APC, Xcache, Memcache (127.0.0.1:11211), Redis (127.0.0.1:6379) unless `$cache` is passed as fourth argument.
- If ``$isDevMode`` is false, set then proxy classes have to be explicitly created through the command line.
- If third argument `$proxyDir` is not set, use the systems temporary directory.

If you want to configure Doctrine in more detail, take a look at the :doc:`Advanced Configuration <reference/advanced-configuration>` section.
Expand Down
Loading

0 comments on commit 2488b4c

Please sign in to comment.