Conversation
composer.json
Outdated
| "squizlabs/php_codesniffer": "^3.1", | ||
| "symfony/yaml": "~3.4|~4.0" | ||
| "symfony/phpunit-bridge": "^3.3|^4.0", | ||
| "symfony/yaml": "4.0.1" |
There was a problem hiding this comment.
This is just temporary hack to work around symfony/symfony#25405 on CI.
9ab6c3c to
68e7d06
Compare
lib/Doctrine/ORM/EntityManager.php
Outdated
| */ | ||
| public function flush($entity = null) | ||
| { | ||
| if (func_num_args() === 1) { |
There was a problem hiding this comment.
Isn't $entity !== null simpler? I mean, only the first argument is used anyway
There was a problem hiding this comment.
That would still allow flush(null) though. I'll change it to !== 0.
lib/Doctrine/ORM/EntityManager.php
Outdated
| */ | ||
| public function detach($entity) | ||
| { | ||
| @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0, please migrate to ' . self::class . '::clear().', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Also, EntityManager#clear() has a different behaviour... and I'm not even sure if we should point people to do partial cleaning of the UoW, it might have the very same issues we have with EntityManager#detach().
| */ | ||
| public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) | ||
| { | ||
| @trigger_error('YAML mapping driver is deprecated and will be removed in Doctrine 3.0, please migrate to annotation or XML driver.', E_USER_DEPRECATED); |
lcobucci
left a comment
There was a problem hiding this comment.
LGTM, just some minor comments.
We just need to keep in mind that our plan is to release 2.6 WITHOUT the deprecation notices. 2.7 would be the one adding them.
lib/Doctrine/ORM/EntityManager.php
Outdated
| */ | ||
| public function flush($entity = null) | ||
| { | ||
| if (func_num_args() === 1) { |
There was a problem hiding this comment.
Isn't $entity !== null simpler? I mean, only the first argument is used anyway
| * @author Roman Borschel <roman@code-factory.org> | ||
| * @since 2.0 | ||
| * | ||
| * @deprecated This class is deprecated and will be removed in Doctrine 3.0, proxies will no longer implement it. |
There was a problem hiding this comment.
Does it make sense to mention which interface should be used? So that people can already start preparing their stuff
There was a problem hiding this comment.
Not sure about this one, we would be referencing 3rd party code (ProxyManager) which is not required in Composer.
lib/Doctrine/ORM/EntityManager.php
Outdated
| */ | ||
| public function detach($entity) | ||
| { | ||
| @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0, please migrate to ' . self::class . '::clear().', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Also, EntityManager#clear() has a different behaviour... and I'm not even sure if we should point people to do partial cleaning of the UoW, it might have the very same issues we have with EntityManager#detach().
Well, the sooner we ship them, the better for users, but if there are other reasons, 2.7 is fine by me. |
68e7d06 to
ff822e0
Compare
|
Updated, added deprecations for codegen (#6870). |
93e5747 to
278edf9
Compare
|
I've also added deprecatons for:
Also partially imported UPGRADE notes from develop and reworded them (no mapping-related changes since it's unfinished). |
UPGRADE.md
Outdated
| @@ -1,3 +1,103 @@ | |||
| # Upgrade to 2.7 | |||
|
|
|||
| ## BC Break: Deprecated code generators and related console commands | |||
There was a problem hiding this comment.
Deprecations are not BC-breaks, are they?
| * | ||
| * @return string|null | ||
| * | ||
| * @deprecated |
There was a problem hiding this comment.
Why not also trigger a deprecation error?
There was a problem hiding this comment.
There is no replacement, it would be an error that cannot be muted/fixed, it would be just annoying without benefit.
f74c575 to
0be38dd
Compare
0be38dd to
5b775da
Compare
4caef22 to
4257a99
Compare
…ethod Deprecation of EntityManager copy method
4257a99 to
d3f80eb
Compare
|
Rebased. |
|
I think deprecations for named queries should be added as well. |
Based on UPGRADE document for 3.0.
Deprecations added for:
I have not added any notes about mapping/metadata changes here because it's still pretty unstable.
Tests marked as
@legacyuse any of the deprecated methods.Added explicit deprecation tests for deprecated methods.
I'd like to get these into 2.6, there is no reason to delay it.