Skip to content

[3.0][DoctrineBridge] Removed deprecated features #15900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Sep 26, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

*
* @throws UnexpectedTypeException
*/
public function __construct($queryBuilder, $manager = null, $class = null)
public function __construct(QueryBuilder $queryBuilder)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this means that people will get a PHP fatal error instead of an UnexpectedTypeException, but I guess that is not a problem?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not an issue: Symfony usage of this class is already validating the type earlier (in EntityType) anyway

@stof
Copy link
Member

stof commented Sep 26, 2015

tests are broken

@stof
Copy link
Member

stof commented Sep 26, 2015

Status: needs work

@wouterj wouterj force-pushed the doctrine_bridge-deprecations branch 2 times, most recently from 9ee907d to 349d928 Compare September 26, 2015 17:50
@wouterj
Copy link
Member Author

wouterj commented Sep 26, 2015

Fixed.

Status: Needs review

@stof
Copy link
Member

stof commented Sep 26, 2015

@wouterj I don't agree with you. Half of the tests of the bridge are still throwing exceptions instead of running properly.

Status: needs work

@wouterj
Copy link
Member Author

wouterj commented Sep 26, 2015

@stof agreed. Fixed some more things and made the tests pass locally. Should be ready (hopefully).

Status: Needs review

@@ -140,7 +147,6 @@ public function configureOptions(OptionsResolver $resolver)
$options['em'],
$options['class'],
$qbParts,
$options['loader'],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as the loader is now returned from *Type::getLoader(), it'll always be the same. I don't think it makes sense to include it in the cache hash anymore.

This was also causing caching to become useless, as the object returned from getLoader() always was a new instance, resulting in another hash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was not making caching useless, as $options['loader'] was set only in case the option was used explicitly (not the case by default.

I agree that the loader returned by getLoader does not belong to the cache key: the other parts of the cache key are what determine this loader, and this is why they are here

@wouterj wouterj force-pushed the doctrine_bridge-deprecations branch from 26179d5 to f813e36 Compare September 27, 2015 09:33
@wouterj
Copy link
Member Author

wouterj commented Sep 27, 2015

Fixed the comments

@fabpot
Copy link
Member

fabpot commented Oct 1, 2015

Broken tests are not related to this PR. Anything else before merging?

@wouterj
Copy link
Member Author

wouterj commented Oct 1, 2015

Afaik, no.

@fabpot
Copy link
Member

fabpot commented Oct 1, 2015

Thank you @wouterj.

fabpot added a commit that referenced this pull request Oct 1, 2015
…terJ)

This PR was squashed before being merged into the 3.0-dev branch (closes #15900).

Discussion
----------

[3.0][DoctrineBridge] Removed deprecated features

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

6dc3cf9 [3.0][DoctrineBridge] Removed deprecated features
@fabpot fabpot closed this Oct 1, 2015
@wouterj wouterj deleted the doctrine_bridge-deprecations branch October 1, 2015 14:25
@fabpot fabpot mentioned this pull request Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants