Skip to content

Conversation

@peterrehm
Copy link
Contributor

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

Relates to #14825 and #14377. The behaviour was changed with #16681 so a not in the upgrade information makes sense to me.

Closed in favor of #16849 as this was opened against the wrong branch.

nicolas-grekas and others added 7 commits December 2, 2015 14:02
…rk, cause cache warm error (weaverryan)

This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16772).

Discussion
----------

Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error

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

This fixes a "Database not Found" error when using `doctrine/orm` 2.5 while warming up your cache under certain situations. Basically, if you use the `EntityUserProvider`, then during cache warmup, Twig requires the `security.authorization_checker` which eventually requires this `EntityUserProvider`, which previously caused Doctrine to calculate the metadata for your User class. If no database exists (and you haven't specified the platform), you'll get the error.

More broadly, this simply tries to do less work in the constructor. It's a "bug fix", only kind of, but as it's completely an internal refactoring, it should be quite safe.

Thanks!

Commits
-------

44a2861 Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error
* 2.3:
  Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error
* 2.7:
  Refactoring EntityUserProvider::__construct() to not do work, cause cache warm error
…grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Add context to FormFactory deprecations

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

Commits
-------

e2010d2 [Form] Add context to FormFactory deprecations
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