Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #48097 Fix search scope when performing fallback mapping driver d…
…etection (spideyfusion) This PR was merged into the 5.4 branch. Discussion ---------- Fix search scope when performing fallback mapping driver detection | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a When using `auto_mapping` inside `orm` configuration to enable automatic entity registration for all bundles that are used within your application, the fallback mechanism for determining which mapping driver should be used for extracting entity information has a wrong starting point. Instead of beginning its search from the `Entity` folder, the entire bundle root gets traversed recursively, which can lead to wrong mapping driver being selected or just plainly having a performance hit during development just because the potential list of files that need to be examined can get huge. We actually stumbled upon this bug because we noticed a big jump in memory usage during development (`850+ MB vs ~100 MB`) ever since we switched to using attributes for describing our entities. Turns out, the `DoctrineBridge` was scanning all files inside our `Resources` folder (and we had **a lot** of files in there). Commits ------- c305722 Fix search scope when performing fallback mapping driver detection
- Loading branch information