Skip to content
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

Fix exception when configuration is used without doctrine/orm nor doctrine/common #881

Merged

Conversation

webnet-fr
Copy link
Contributor

@webnet-fr webnet-fr commented Nov 30, 2018

Q A
Branch? master
Bug fix? yes
New feature? no
Fixed tickets symfony/symfony#29390

Hi there is a ReflectionException Class Doctrine\Common\Proxy\AbstractProxyFactory does not exist when the DoctrineBundle is used without doctrine/common being installed.

Consider this scenario

  1. Here are deps in the composer.json of my project:
"require": {
    "php": "^7.1.3",
    "ext-ctype": "*",
    "ext-iconv": "*",
    "symfony/console": "4.2.*",
    "symfony/flex": "^1.1",
    "symfony/framework-bundle": "4.2.*",
    "symfony/yaml": "4.2.*"
},
  1. I install DoctrineBundle with require doctrine/doctrine-bundle.

  2. I activate DoctrineBundle in Kernel. This entails ReflectionException Class Doctrine\Common\Proxy\AbstractProxyFactory does not exist exception.

So when people only need doctrine/dbal and doctrine/doctrine-bundle in theirs projects are forced to install doctrine/common just to avoid this exctption.

This PR resolves the issue.

Cheers.

Copy link
Contributor

@Majkl578 Majkl578 left a comment

Choose a reason for hiding this comment

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

Looks good, can you please add a test?

@Majkl578 Majkl578 added the Bug label Dec 2, 2018
@kimhemsoe kimhemsoe added this to the 1.10.1 milestone Dec 2, 2018
@webnet-fr
Copy link
Contributor Author

Hi @Majkl578. It's done!

@Philipp91
Copy link

@webnet-fr Just in case GitHub didn't notify you: The unit test fails on Travis.

@kimhemsoe
Copy link
Member

Ready? :D

@SenseException SenseException changed the title Fix exception when configuraion is used without doctrine/orm nor doctrine/common Fix exception when configuration is used without doctrine/orm nor doctrine/common Dec 10, 2018
@webnet-fr
Copy link
Contributor Author

@kimhemsoe yep!

@kimhemsoe kimhemsoe self-assigned this Dec 11, 2018
@kimhemsoe
Copy link
Member

@Majkl578 ping :)

@alcaeus alcaeus changed the base branch from master to 1.10.x December 11, 2018 18:17
@alcaeus alcaeus force-pushed the configuration-without-common-package branch from 23367df to 8f33bf5 Compare December 11, 2018 18:20
@alcaeus
Copy link
Member

alcaeus commented Dec 11, 2018

I've squashed your commits and rebased on top of 1.10.x so this can go in as bugfix in the next patch release. Thanks for your contribution, @webnet-fr!

@kimhemsoe kimhemsoe merged commit fb62521 into doctrine:1.10.x Dec 11, 2018
@petrofcikmatus
Copy link

petrofcikmatus commented Jan 5, 2019

Will you please release 1.10.1 with this PR merged? It has been merged 24 days ago.

I created new symfony 4.2.x project today and I still got this exception. This might be frustrating for new developers.

cc @kimhemsoe

edit: I noticed there is PR #884 in 1.10.1 milestone, but without activity since 4th December.

@alcaeus
Copy link
Member

alcaeus commented Jan 5, 2019

I'll take time to release 1.10.1 on Monday 👍

alcaeus added a commit to alcaeus/DoctrineBundle that referenced this pull request Jan 7, 2019
…common-package

Fix exception when configuration is used without doctrine/orm nor doctrine/common
@alcaeus
Copy link
Member

alcaeus commented Jan 7, 2019

1.10.1 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants