[Known-issue] Doctrine entities could not be woven
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
The weaving engine generates proxy classes that break Doctrine metadata. Investigate the class-weaving logic in the framework's core, particularly where it generates the proxy and parent classes. Find where Doctrine metadata is read and how it interacts with woven classes. The solution requires making the weaving method configurable per class.
Written by the indexing model from the issue text.
Description
Doctrine entities can not be weaved - class metadata gets all messed up.
Engine generates Entity__AopProxied, which is copy of original class, and then generates class Entity that extends Entity__AopProxied and contains weaved methods/properties.
Issue is that Entity__AopProxied contains doctrine metadata, so Doctrine actually generates such metadata that Entity__AopProxied is main class and every relation is bound to that class, not Entity.
Side effects are that, per example, table name gets suffix "__aop_proixed", while relations gets all screwed up, so any join is broken because different aliases are generated with SQL walker. Lazy loading does not work as well.
Possible solution would be (in order to preserve BC compatibility) to provide possibility to specify different method of weaving for certain classes. Per example, in this case, in order to work as it should, Entity__AopProxied should not be generated and inherited, it should be generated only Entity class.
Yes, maybe we will loose nice debugging and breakpoints, however, for now, we can sacrifice that for working code.
- Dominant language
- PHP
- Stars
- 1.7k
- Forks
- 166
- Avg merge
- 10h
- Merged PRs (30d)
- 35
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from goaop/framework
-
Intercepting a method imported from a trait with #[\Override] fails: OriginalAlias "has #[\Override] attribute, but no matching parent method exists"Possibly taken @lisachenko claimed this today. OpenBug PHP8.4
Difficulty 3/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Several woven classes in one file: their proxies overwrite each other, all but the last class are lost (Class not found)Possibly taken @lisachenko claimed this today. OpenBug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Maintainers usually reply within 1 day
-
Proxy of a namespaced class extending a global class references the parent unqualified (Class "Ns\ArrayObject" not found)Possibly taken @lisachenko claimed this today. OpenBug
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Enhancement Performance
Difficulty 5/5 Over a week Newbie friendliness 35/100
goaop/framework#747 · 1 comment ·
Maintainers usually reply within 1 day
-
Performance: INTERCEPT_INCLUDES serves untransformed included files through php://filter in production (no opcache)Possibly taken @lisachenko claimed this 2 days ago. OpenEnhancement Performance
Difficulty 4/5 3-5 days Newbie friendliness 56/100
Maintainers usually reply within 1 day
Similar issues
-
Python 3.15 supportPossibly taken @amnesiaof claimed this today. OpenL: python L: python:uv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dependabot/dependabot-core#16524 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
crazy-goat/rabbit-stream#830 ·
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 70/100