[DCOM-67] Introduce immutable DateTime with __toString() Created: 27/Aug/11 Updated: 29/Jan/12 |
|
| Status: | Reopened |
| Project: | Doctrine Common |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Comments |
| Comment by Benjamin Eberlei [ 27/Aug/11 ] |
|
Implemented |
| Comment by Koji Ando [ 11/Jan/12 ] |
|
Though it is implemented once on https://github.com/doctrine/common/commit/7140ad3ba0ba2a94238976dd7f310ff92b478c96, I think this issue must be reopened. |
| Comment by Benjamin Eberlei [ 11/Jan/12 ] |
|
Code was removed due to implementation problems. |
[DCOM-189] Doctrine Proxies may conflict with interfaced constructors Created: 03/May/13 Updated: 03/May/13 |
|
| Status: | Reopened |
| Project: | Doctrine Common |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Major |
| Reporter: | Harmen M | Assignee: | Marco Pivetta |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The Doctrine ProxyGenerator generates for a proxy a constructor. The documentation of Doctrine states that the constructor is never called. For a project, I created a group of entities with a interfaced constructor in order to enforce a common interface. This results in a incompatible proxy and so a fatal error. |
| Comments |
| Comment by Marco Pivetta [ 03/May/13 ] |
|
Cannot fix this - the constructor is required to override instantiation logic |
| Comment by Harmen M [ 03/May/13 ] |
|
Edit: added the correct description. I accidentially submitted the form before editing the description. |
| Comment by Marco Pivetta [ 03/May/13 ] |
|
Harmen M why do you have a constructor in an interface? That's a very bad practice, and it makes things quite hard to handle. I can think of a workaround, but I first want to be sure there's a real advantage in changing the current implementation to use unserialize() just to handle this specific use case. |
| Comment by Benjamin Eberlei [ 03/May/13 ] |
|
Adding __construct to an interface is an anti pattern and shouldn't be done. |
| Comment by Harmen M [ 03/May/13 ] |
|
Ok, then I change my implementation. But, maybe it is an idea to update the documentation of the ORM and state that constructor interfacing is not possible? |