[DCOM-165] Entities seems not be recognized by AnnotationDriver Created: 02/Sep/12  Updated: 03/Dec/13

Status: Awaiting Feedback
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.2, 2.3
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Maarten de Keizer Assignee: Marco Pivetta
Resolution: Unresolved Votes: 0
Labels: annotationdriver, realpath, symlink, windows
Environment:

Windows 7 Profesional, Enterprise and Windows Server 2003 and 2008; Common: 2.2.3 DBAL: 2.2.2 ORM: 2.2.3; PHP 5.4.5 and 5.3.5



 Description   

Problem:
--------
"$em->getMetadataFactory()->getAllMetadata()"
Will result in an empty array. The entitiy manager is correctly configured and the entities files are loaded (echo's in the files will be displayed).

Debug steps:
------------
Looking in the code for the problem I created the following debug points first:

file AnnotationDriver.php method getAllClassNames()
after the line: "$includedFiles[] = $sourceFile;"
add: "echo $sourceFile . ' is loaded' . PHP_EOL;"

file AnnotationDriver.php method getAllClassNames()
after the line: "$sourceFile = $rc->getFileName();"
add: "echo $className . ' is loaded from: ' . $sourceFile . ' in the includedFiles array? ' . (in_array($sourceFile, $includedFiles) ? 'YES' : 'not found ') . PHP_EOL;"

the following output will be displayed:
...
f:\workspace\nl.markei.posto-2.3\lib\relaties\Contact.php is loaded
...
nl\markei\posto\relaties\Contact is loaded from: F:\workspace\nl.markei.posto-2.3\lib\relaties\Contact.php in the includedFiles array? not found

It seems that Doctrine includes the file from f: but ReflectionClass say it is loaded from F:. The in_array() will fail and Doctrine will not recognized the entity.

But this is not the full problem. I created a new debug point:

file AnnotationDriver.php method getAllClassNames()
after the line: "foreach ($this->_paths as $path) {"
add: "echo 'path: ' . $path . ' after realpath: ' . realpath($path) . PHP_EOL;"

This will result in the following output:
"path: F:\domains\markei.nl\lib\nl.markei.posto\ after realpath: f:\workspace\nl.markei.posto-2.3\lib"

So the conversion of the F: to f: is done by realpath; its look like

A simple fix should be in AnnotationDriver.php / getAllClassNames()
replace: "$sourceFile = $rc->getFileName();"
by: "$sourceFile = realpath($rc->getFileName());"

After I did that, the problem still exists. So I add to echo's (one with realpath and one without at the part of the code). And both echo's result in a path starting with "F:".

So my first reaction was freaky!

After some frustrating hours I found the problem in the symlink I used.
"F:\domains\markei.nl\lib\nl.markei.posto" was a symlink to "f:\workspace\nl.markei.posto-2.3\lib" and realpath will not convert the driver char in the target of the symlink for some freaky reason. After changing the symlink target to "F:\workspace...." everything works fine.

Summary:
--------
realpath results are not consistent on Windows. This will resulting in problems under Windows.

Possible solutions:
-------------------
Saying "this is a PHP bug".
It is possible that there are more case sensitive problems hidding here on Windows. Maybe it is better to use (for Windows only!) a case insensitive in_array-alternative in AnnotationDriver.php getAllClassNames() (or convert all paths for to lowercase for Windows)



 Comments   
Comment by Marco Pivetta [ 23/Jan/13 ]

Maarten de Keizer looks like the issue is still there in doctrine/annotations. Are you able to come up with a failing test case?





[DCOM-9] Annotation mapper tries to parse PHPDocblock annotations Created: 16/Jun/10  Updated: 16/Jun/10  Resolved: 16/Jun/10

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.0.0-BETA2
Fix Version/s: 2.0.0-BETA3

Type: Bug Priority: Blocker
Reporter: Antoine Hedgecock Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None
Environment:

OS: Ubuntu, PHP version: 5.3.2



 Description   

In the upgrade from DC2 beta1 to beta2 the annonation mapper now starts to try and parse a some of the PHPDocblock annotations such as @package @subpackage but also the email adress in @author

Example of docblock

/**
 * @author Antoine Hedgecock <antoine@pmg.se>
 * @version 1.0.0
 */


/**
 * @package Models
 * @subpackage Default
 * 
 * @Entity(repositoryClass="Default_Model_Mapper_Category")
 * @Table(name="categories")
 * @InheritanceType("SINGLE_TABLE")
 * @DiscriminatorColumn(name="type", type="smallint")
 * @DiscriminatorMap({
 *  "0" = "Project_Model_Category"
 * })
 */

will cause it to try and load

Doctrine/ORM/Mapping/package.php
Doctrine/ORM/Mapping/subpackage.php
Doctrine/ORM/Mapping/pmg.php

note pmg because its in the email of the author annotation



 Comments   
Comment by Roman S. Borschel [ 16/Jun/10 ]

Please try with the latest version of Doctrine Common http://github.com/doctrine/common

See also DCOM-8

Comment by Antoine Hedgecock [ 16/Jun/10 ]

After comparing the source code version i found the following changes that could cause the issue

Line 249 in Beta2

$this->lexer->lookahead != null && ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && ! ClassLoader::classExists($name)
Comment by Roman S. Borschel [ 16/Jun/10 ]

Fixed in the beta3 release that is already out now.





[DCOM-198] [GH-281] DCOM-194 Created: 10/Jun/13  Updated: 10/Jun/13  Resolved: 10/Jun/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/281

Message:

Cleaned up version of #278



 Comments   
Comment by Marco Pivetta [ 10/Jun/13 ]

Duplicate of DCOM-194

Comment by Doctrine Bot [ 10/Jun/13 ]

A related Github Pull-Request [GH-281] was closed:
https://github.com/doctrine/common/pull/281





[DCOM-196] [GH-278] [DCOM-194] Fixed proxying magic getter with reference Created: 06/Jun/13  Updated: 10/Jun/13  Resolved: 10/Jun/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Majkl578:

Url: https://github.com/doctrine/common/pull/278

Message:

This is a proposal for a fix for DCOM-194(http://doctrine-project.org/jira/browse/DCOM-194) (and GH issue #276). This issue is important for us to be solved before 2.4.0 is out, since the base object class of Nette Framework, Nette\Object, uses this behavior, see https://github.com/nette/nette/blob/04e4e4b3ee36551fe99e63f91d9a839f7edc72ee/Nette/common/Object.php#L124-133.



 Comments   
Comment by Doctrine Bot [ 10/Jun/13 ]

A related Github Pull-Request [GH-278] was closed:
https://github.com/doctrine/common/pull/278

Comment by Marco Pivetta [ 10/Jun/13 ]

Duplicate of DCOM-194





[DCOM-176] [GH-256] Refactored AnnotationDriver to handle only required classes Created: 01/Mar/13  Updated: 01/Mar/13  Resolved: 01/Mar/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of mattcockayne:

Url: https://github.com/doctrine/common/pull/256

Message:

Whilst debugging an issue I was having I found that the AnnotationDriver uses get_declared_classes() and iterates over the result to identify classes that should be handled.

This seems like a ridiculous overhead especially as it then instantiated a ReflectionClass for each declared class. As an example my current project was iterating over 522 items when it needed to only handle 6.

I've kept the alterations to a minimum but it now takes a snapshot of the declared classes before and after the require for the files and then uses array_diff to get only the classes we are targeting.



 Comments   
Comment by Marco Pivetta [ 01/Mar/13 ]

Patch breaks logic when files where already included

Comment by Benjamin Eberlei [ 01/Mar/13 ]

A related Github Pull-Request [GH-256] was closed
https://github.com/doctrine/common/pull/256





[DCOM-178] [GH-258] Add an prefix to ApcCache Created: 03/Mar/13  Updated: 03/Mar/13  Resolved: 03/Mar/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of NoUseFreak:

Url: https://github.com/doctrine/common/pull/258

Message:

In shared hosting I ran into cache-collision. This gives users the option to avoid this problem.



 Comments   
Comment by Benjamin Eberlei [ 03/Mar/13 ]

A related Github Pull-Request [GH-258] was closed
https://github.com/doctrine/common/pull/258





[DCOM-177] [GH-257] Add an prefix to ApcCache Created: 03/Mar/13  Updated: 03/Mar/13  Resolved: 03/Mar/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of NoUseFreak:

Url: https://github.com/doctrine/common/pull/257

Message:

In shared hosting I ran into cache-collision. This gives users the option to avoid this problem.



 Comments   
Comment by Benjamin Eberlei [ 03/Mar/13 ]

A related Github Pull-Request [GH-257] was closed
https://github.com/doctrine/common/pull/257





[DCOM-174] [GH-255] Hotfix/dcom 173 tests Created: 18/Feb/13  Updated: 19/Feb/13  Resolved: 18/Feb/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/255

Message:

This PR introduces tests to avoid epic fails such as #254 and #253



 Comments   
Comment by Marco Pivetta [ 18/Feb/13 ]

Handled in DCOM-173

Comment by Benjamin Eberlei [ 19/Feb/13 ]

A related Github Pull-Request [GH-255] was closed
https://github.com/doctrine/common/pull/255





[DCOM-164] @type phpdoc annotations are not ignored (@type == @var) Created: 22/Jan/13  Updated: 06/Dec/13  Resolved: 06/Dec/13

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Matthieu Napoli Assignee: Guilherme Blanco
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

phpDocumentor guys wrote their own PSR to define how to use phpdoc properly (https://github.com/phpDocumentor/phpDocumentor2/blob/develop/docs/PSR.md).

They deprecate the @var annotation and recommend using @type instead.

The @type (phpdoc) annotation is not blacklisted/ignored by the AnnotationReader. Code that uses this annotation raises errors with Doctrine/Annotations.

@type should be blacklisted/ignored, but may that create BC breaks for users?



 Comments   
Comment by Matthieu Napoli [ 22/Jan/13 ]

PR: https://github.com/doctrine/annotations/pull/2

Comment by Guilherme Blanco [ 06/Dec/13 ]

Will not fix as phpDoc2 does not use @type anymore.





[DCOM-156] [GH-238] fix to solve fatal error: apc_exist() does not exist Created: 04/Jan/13  Updated: 02/Nov/13  Resolved: 10/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of uran1980:

Url: https://github.com/doctrine/common/pull/238

Message:

Hi, folks. I'm running *Zend Server CE 5.6.0 5.6.0 SP4* with *PHP Version 5.3.14* and APC builtin:
![2013-01-04-15-15-sshot-1](https://f.cloud.github.com/assets/1616795/43026/86d0516e-5668-11e2-8342-10972e9bb214.png)

Now when I run in my project based on Symfony 2.1.6 comand:
```
console doctrine:fixtures:load --verbose
```
I am stack with fatal error:
```
Fatal error: Call to undefined function Doctrine\Common\Cache\apc_exists()
```

![2013-01-04-15-20-sshot-1](https://f.cloud.github.com/assets/1616795/43037/742fe1f4-5669-11e2-815b-dccc9a0f4fb4.png)

*Possible solution are in my pull request.*

As I descovered I am not alone with this problem: http://stackoverflow.com/questions/9125904/apc-exist-does-not-exist(http://stackoverflow.com/questions/9125904/apc-exist-does-not-exist)



 Comments   
Comment by Benjamin Eberlei [ 10/Jan/13 ]

A related Github Pull-Request [GH-238] was closed
https://github.com/doctrine/common/pull/238

Comment by Marco Pivetta [ 10/Jan/13 ]

This issue affects older versions of APC. If a fix is needed, a legacy APC cache class shall be implemented.

Comment by Doctrine Bot [ 02/Nov/13 ]

A related Github Pull-Request [GH-238] was closed:
https://github.com/doctrine/dbal/pull/238





[DCOM-150] [GH-232] [DocParser] Don't check class exists if annotation name is ignored Created: 10/Dec/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Stroitel:

Url: https://github.com/doctrine/common/pull/232

Message:

DocParser checks for the exist of all the annotation names even if they are ignored. Maybe this is feature , but i don't sure.



 Comments   
Comment by Benjamin Eberlei [ 10/Dec/12 ]

A related Github Pull-Request [GH-232] was closed
https://github.com/doctrine/common/pull/232

Comment by Marco Pivetta [ 14/Jan/13 ]

Superseded by DCOM-151





[DCOM-139] [GH-220] replaced silence operator by is_file() check Created: 16/Nov/12  Updated: 21/Feb/13  Resolved: 21/Feb/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of jakoch:

Url: https://github.com/doctrine/common/pull/220

Message:






[DCOM-137] [GH-218] hotfix cache Created: 16/Nov/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of jakoch:

Url: https://github.com/doctrine/common/pull/218

Message:

a) replaced silence operator by is_file() check.
If there is a lock or permission problem while unlinking a file, the error should pop up.
b) replaced little typo in constant name (availiable => available)



 Comments   
Comment by Benjamin Eberlei [ 16/Nov/12 ]

A related Github Pull-Request [GH-218] was closed
https://github.com/doctrine/common/pull/218

Comment by Marco Pivetta [ 14/Jan/13 ]

Moved to DCOM-138 and DCOM-139





[DCOM-134] [GH-213] Added sort option for array collection Created: 11/Nov/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of andrewtarry:

Url: https://github.com/doctrine/common/pull/213

Message:

I have added a sorter class and sortBy method for the ArrayCollection class. It gives the option to reorder the ArrayCollection after someone has gotten it from the database, e.g. from a relationship. It takes an array of method names to sort by in order to priority and it takes an optional boolean to set the order to ascending. Here is an example:

`$arraycollection->sortBy(array('getName()', 'getAddress()'));`

It will recursively loop the collection change the order. Each time it will look to see if the previous matching option is the same as for the previous element and then store those elements in list to be reordered.

Once it has looped all the elements it will reorder the elements it has matched and if there is another option to reorder by it will loop only the elements it matched last time so it is not looping the whole array each time.



 Comments   
Comment by Marco Pivetta [ 14/Jan/13 ]

Can't change because of BC, and the performance impact is too high





[DCOM-135] [GH-214] [WIP] [Cache] Move cache ID namespacing to CacheNamespace class Created: 12/Nov/12  Updated: 21/Feb/13  Resolved: 21/Feb/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Incomplete Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of CHH:

Url: https://github.com/doctrine/common/pull/214

Message:






[DCOM-132] [GH-211] Cache interface fix Created: 01/Nov/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of szicsu:

Url: https://github.com/doctrine/common/pull/211

Message:

The CacheProvider contained more public methods,
which were not defined in the Cache interface.



 Comments   
Comment by Benjamin Eberlei [ 09/Nov/12 ]

A related Github Pull-Request [GH-211] was closed
https://github.com/doctrine/common/pull/211





[DCOM-124] [GH-203] Added deleteByPregix, deleteBySuffix, deleteByRegex in CacheProvider Created: 16/Oct/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of masarliev:

Url: https://github.com/doctrine/common/pull/203

Message:

I found that this feature is missing.






[DCOM-119] [GH-196] Make getNamespacedId protected instead of private Created: 02/Oct/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of jnonon:

Url: https://github.com/doctrine/common/pull/196

Message:

We want to extend the cache class provider MemcacheCache.php in order to set a custom namespace. However, because getNamespacedId is a private method, basically a complete rewrite and code duplication of the class is needed.
Is there any reason for this method to be private instead of protected?
Thanks in advace,

--JN



 Comments   
Comment by Benjamin Eberlei [ 02/Oct/12 ]

A related Github Pull-Request [GH-196] was closed
https://github.com/doctrine/common/pull/196





[DCOM-117] [GH-194] If that $element exists give it back Created: 28/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of seltzlab:

Url: https://github.com/doctrine/common/pull/194

Message:

I think it would very useful to get back the element that matched



 Comments   
Comment by Benjamin Eberlei [ 01/Oct/12 ]

A related Github Pull-Request [GH-194] was closed
https://github.com/doctrine/common/pull/194





[DCOM-112] [GH-188] Test new3 Created: 24/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of beberlei:

Url: https://github.com/doctrine/common/pull/188

Message:

trying against 2.3



 Comments   
Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-188] was closed
https://github.com/doctrine/common/pull/188

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-188] was reopened
https://github.com/doctrine/common/pull/188

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-188] was closed
https://github.com/doctrine/common/pull/188

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-188] was reopened
https://github.com/doctrine/common/pull/188

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-188] was closed
https://github.com/doctrine/common/pull/188

Comment by Marco Pivetta [ 14/Jan/13 ]

Was a test for the GH bot





[DCOM-113] [GH-189] Test new3 Created: 24/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of beberlei:

Url: https://github.com/doctrine/common/pull/189

Message:

last test i hope



 Comments   
Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-189] was closed
https://github.com/doctrine/common/pull/189

Comment by Marco Pivetta [ 14/Jan/13 ]

Was a test for the GH bot





[DCOM-114] [GH-190] Test new3 Created: 24/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of beberlei:

Url: https://github.com/doctrine/common/pull/190

Message:

something master test?



 Comments   
Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-190] was closed
https://github.com/doctrine/common/pull/190

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-190] was reopened
https://github.com/doctrine/common/pull/190

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-190] was closed
https://github.com/doctrine/common/pull/190

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-190] was reopened
https://github.com/doctrine/common/pull/190

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-190] was closed
https://github.com/doctrine/common/pull/190

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-190] was reopened
https://github.com/doctrine/common/pull/190

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-190] was closed
https://github.com/doctrine/common/pull/190

Comment by Marco Pivetta [ 14/Jan/13 ]

Was a test for the GH bot





[DCOM-110] [GH-186] Test new2 Created: 24/Sep/12  Updated: 21/Nov/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of beberlei:

Url: https://github.com/doctrine/common/pull/186

Message:

new pull test



 Comments   
Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-186] was closed
https://github.com/doctrine/common/pull/186

Comment by Marco Pivetta [ 14/Jan/13 ]

Was a test for the GH bot

Comment by Doctrine Bot [ 21/Nov/13 ]

A related Github Pull-Request [GH-186] was closed:
https://github.com/doctrine/dbal/pull/186





[DCOM-111] [GH-187] Test new3 Created: 24/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of beberlei:

Url: https://github.com/doctrine/common/pull/187

Message:

test 3



 Comments   
Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-187] was closed
https://github.com/doctrine/common/pull/187

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-187] was reopened
https://github.com/doctrine/common/pull/187

Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-187] was closed
https://github.com/doctrine/common/pull/187

Comment by Marco Pivetta [ 14/Jan/13 ]

Was a test for the GH bot





[DCOM-109] [GH-185] Test new Created: 24/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of beberlei:

Url: https://github.com/doctrine/common/pull/185

Message:

test



 Comments   
Comment by Benjamin Eberlei [ 24/Sep/12 ]

A related Github Pull-Request [GH-185] was closed
https://github.com/doctrine/common/pull/185

Comment by Marco Pivetta [ 14/Jan/13 ]

Was a test for the GH bot





[DCOM-108] [GH-184] Fix bug in classExists when using multiple autoloaders (i.e. ZF2) Created: 17/Sep/12  Updated: 20/Dec/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of bramstroker:

Url: https://github.com/doctrine/common/pull/184

Message:

The autoloading routine in the classExists method makes the assumption the autoload method always returns a value (i.e. no void) when the autoloading of a class is succesfull. When you have multiple autoloaders registered to the spl stack this can lead to problems. In my case I'm using ZF2 ClassmapAutoloader and StandardAutoloader as fallback. The classmapAutoloader returns nothing so the autoload method in the StandardAutoloader is called as well, because the for loop is continued. This results in a second include, and a fatal error "Cannot redeclare class" is triggered.



 Comments   
Comment by Benjamin Eberlei [ 17/Sep/12 ]

A related Github Pull-Request [GH-184] was closed
https://github.com/doctrine/common/pull/184

Comment by Benjamin Eberlei [ 18/Sep/12 ]

A related Github Pull-Request [GH-184] was reopened
https://github.com/doctrine/common/pull/184

Comment by Marco Pivetta [ 14/Jan/13 ]

Handled in DCOM-136

Comment by Doctrine Bot [ 20/Dec/13 ]

A related Github Pull-Request [GH-184] was closed:
https://github.com/doctrine/dbal/pull/184





[DCOM-107] [GH-183] Fix bug in classExists when using multiple autoloaders (i.e. ZF2) Created: 17/Sep/12  Updated: 14/Jan/13  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of bramstroker:

Url: https://github.com/doctrine/common/pull/183

Message:

The autoloading routine in the classExists method makes the assumption the autoload method always returns a value (i.e. no void) when the autoloading of a class is succesfull. When you have multiple autoloaders registered to the spl stack this can lead to problems. In my case I'm using ZF2 ClassmapAutoloader and StandardAutoloader as fallback. The classmapAutoloader returns nothing so the autoload method in the StandardAutoloader is called as well, because the for loop is continued. This results in a second include, and a fatal error "Cannot redeclare class" is triggered.



 Comments   
Comment by Benjamin Eberlei [ 17/Sep/12 ]

A related Github Pull-Request [GH-183] was closed
https://github.com/doctrine/common/pull/183

Comment by Marco Pivetta [ 14/Jan/13 ]

Handled in DCOM-136





[DCOM-105] Common base exception class Created: 27/Aug/12  Updated: 21/Feb/13  Resolved: 21/Feb/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Till Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

Per our discussion on IRC/Twitter.

It would be nice if all exceptions thrown had a common base, so something like this is possible to catch all exceptions from Doctrine:

try {
    // some code here
} catch (\Doctrine\Common\BaseException $e) {
    // something in Doctrine threw an exception, handle it here
}

(The name is just an example.)

For reference:
https://wiki.php.net/pear/rfc/pear2_exception_policy



 Comments   
Comment by Christophe Coevoet [ 27/Aug/12 ]

Instead of a base class (which forbids extending the SPL exception), I would go the same way than Symfony2 and ZF: using an interface.

Comment by Till [ 27/Aug/12 ]

That's basically what the PEAR2 RFC is doing.

Comment by Marco Pivetta [ 21/Feb/13 ]

Duplicate of DCOM-80





[DCOM-99] Variable Support in DQL Created: 25/Apr/12  Updated: 03/Mar/14  Resolved: 14/Jan/13

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Masoud Mazarei Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

sometimes in complex queries need to use variable,
but DQL not support Variable,



 Comments   
Comment by Marco Pivetta [ 07/Jun/12 ]

Could you please provide more information to this? Otherwise, this issue is quite invalid...

Comment by Ton Sharp [ 03/Mar/14 ]

It means Mysql User-Defined Variables
Doctrine throws "QueryException: [Syntax Error] line 0, col 10: Error: Expected IdentificationVariable | ScalarExpression | AggregateExpression | FunctionDeclaration | PartialObjectExpression | "(" Subselect ")" | CaseExpression, got '@'"

Comment by Marco Pivetta [ 03/Mar/14 ]

Yes, I've marked the issue as invalid.





[DCOM-97] phpParser.php and 'use' keyword in anonymous functions Created: 13/Feb/12  Updated: 30/Mar/12  Resolved: 30/Mar/12

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.1.4
Fix Version/s: 2.2

Type: Bug Priority: Major
Reporter: Thomas Lecarpentier Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

php 5.3, Symfony2, linux



 Description   

When i use the keyword 'use' in anonymous function (like describe in page http://php.net/manual/en/functions.anonymous.php)

Exemple :
...

/**
*

  • Extract event from all events for this day
  • @param int $year
  • @param int $month
  • @param int $day
  • @return ArrayCollection
    */
    public function getEventsForDate($year, $month, $day)
    Unknown macro: { $extractEvents = null; // check if date of item is inside day given $extractEvents = $this->events->filter( function ($item) use ($year, $month, $day) { $leftDate = new \DateTime($year.'-'.$month.'-'.$day.' 00:00'); $rigthDate = new \DateTime($year.'-'.$month.'-'.$day.' +1 day 00:00'); return ( ( $leftDate <= $item->getDateStart() ) && ( $item->getDateStart() < $rigthDate ) ); } ); return $extractEvents; }

...

The phpParser generate error

[ErrorException]
Notice: Undefined offset: -1 in /home/ent/project/Symfony/vendor/doctrine-common/lib/Doctrine/Common/Annotations/PhpParser.php line 117

It try to parse 'use ($year, $month, $day)' as Class



 Comments   
Comment by Fabio B. Silva [ 25/Mar/12 ]

I think this is fixed on the php parser rewrite. (2.2)

Comment by Fabio B. Silva [ 25/Mar/12 ]

Coverage added : https://github.com/doctrine/common/commit/7ec510dbb2279f76a00ecf3f911298879c6ba1a1

I think this could be closed..

Comment by Fabio B. Silva [ 30/Mar/12 ]

Fixed on php parser rewrite. (2.2)





[DCOM-86] k-fish Created: 09/Dec/11  Updated: 30/Dec/11  Resolved: 30/Dec/11

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Karsten Dambekalns Assignee: Fabio B. Silva
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

When parsing a class the DocParser uses class_exists() to check for annotation classes (this triggers autoloading) - only afterwards the annotation is ignored if it should be ignored.

At least for simple unqualified names the check against the ignored annotations could be done earlier. This already goes a long way:

----- DocParser.php, at about line 555 -----
// only process names which are not fully qualified, yet
// fully qualified names must start with a \
$originalName = $name;
if ('
' !== $name[0]) {
// check early and return before further inspections
if (isset($this->ignoredAnnotationNames[$name]))

{ return FALSE; }

$alias = (false === $pos = strpos($name, '
'))? $name : substr($name, 0, $pos);

----- DocParser.php, at about line 555 -----



 Comments   
Comment by Fabio B. Silva [ 30/Dec/11 ]

Other explanations : https://github.com/doctrine/common/pull/90#issuecomment-3313175





[DCOM-72] Change CommonException to interface and use it everywhere! Created: 22/Oct/11  Updated: 21/Feb/13  Resolved: 21/Feb/13

Status: Closed
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: Duplicate Votes: 0
Labels: None


 Comments   
Comment by Benjamin Eberlei [ 22/Oct/11 ]

This is also necessary for everything else that accepts a class name, we should compile a list of the most important methods.

Comment by Marco Pivetta [ 21/Feb/13 ]

See DCOM-80





[DCOM-48] Autoloading with a namespace is very restricted Created: 08/Apr/11  Updated: 17/Jul/11  Resolved: 17/Jul/11

Status: Closed
Project: Doctrine Common
Component/s: Class Loading
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Matthieu Napoli Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

Sorry for the vague title of the issue, but here is the problem:

$classLoader = new ClassLoader('Tests', '/basePath/tests');

If I want to autoload \Tests\Class1, it will look for /basePath/tests/Tests/Class1.php.

I would like it to load: /basePath/tests/Class1.php. i.e., the namespace registered is removed from the path.

Do you see what I mean ? Zend Framework autoloader allow this behavior, I am surprised the Doctrine autoloader doesn't allow that.

Thanks



 Comments   
Comment by Matthieu Napoli [ 29/Apr/11 ]

Hi, any news on this ?

I'd like to know if this is going to be corrected some day, or if I should not wait for it and find another solution ?

Thank you

Comment by Guilherme Blanco [ 17/Jul/11 ]

Hi,

Zend Framework (v1) does not follow PSR-0 (http://groups.google.com/group/php-standards/web/psr-0-final-proposal) so it does whatever it wants.
Second version of Zend Framework is PSR-0 compliant, so your wish will probably fail too.

Let me explain what is the deal: Every single project, no matter what it is, can be contained in a package (aka. namespace in PHP). This means that:

library
- Controller.php
- Controller/
  - Action.php

Is plain wrong. Why? Because it's part of a project (Your app (Application), Zend, Doctrine, Symfony, etc).
Due to this, PSR-0 stricts that it only loads namespaced classes, and nothing else. It was an agreement between 18 big PHP projects, including ZF, Symfony, Lithium, CodeIgniter, etc.

Cheers,

Comment by Benjamin Eberlei [ 17/Jul/11 ]

You can use any autoloader you want for your own classes, the Doctrine one is just focused on namespaces becuse Doctrine only uses namespaces.





[DCOM-36] Declare annotation namespaces in the class' doc comment Created: 10/Feb/11  Updated: 15/Feb/11  Resolved: 15/Feb/11

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Kris Wallsmith Assignee: Guilherme Blanco
Resolution: Can't Fix Votes: 0
Labels: None


 Description   

I would like to declare my default annotation namespace and namespace aliases in my class' doc comment. This will ensure my class can be understood by the annotation reader regardless of its configuration.

An example of how I would use this:
https://gist.github.com/821412



 Comments   
Comment by Jonathan H. Wage [ 11/Feb/11 ]

I don't think implementing this is possible in any easy way.

Comment by Guilherme Blanco [ 15/Feb/11 ]

This cannot be done without adding a lot of WTF factor to Doctrine codebase.

For individual docblocks there's a simple way, but it is impossible to make they interchange definitions (like declare namespace on class docblock and take advantage of it on method docblock).

Marking it as can't fix, since our structure cannot support it without a complete rewrite (which would collide with our current interests).





[DCOM-35] Change AnnotationReader cache salt Created: 01/Feb/11  Updated: 15/Feb/11  Resolved: 15/Feb/11

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.0.1
Fix Version/s: 2.0.2

Type: Bug Priority: Major
Reporter: Guilherme Blanco Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

Our current AnnotationReader::$_CACHE_SALT conflicts with Symfony2 Console.

The solution is to change the CACHE_SALT from:

private static $CACHE_SALT = '@<Annot>';

To:

private static $CACHE_SALT = '@[Annot]';


 Comments   
Comment by Guilherme Blanco [ 15/Feb/11 ]

Fixed





[DCOM-34] calling setAutoloadAnnotationClasses on doctrine annotations reader causes fatal error Created: 08/Jan/11  Updated: 15/Feb/11  Resolved: 15/Feb/11

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.0.0
Fix Version/s: 2.0.2

Type: Bug Priority: Major
Reporter: Hash Panak Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

Snow leopard, intel



 Description   

When I try to set setAutoloadAnnotationClasses(true) gives me a fatal error, call to undefined method

PHP Fatal error: Call to undefined method Doctrine\Common\Annotations\AnnotationReader::setAutoloadAnnotationClasses()



 Comments   
Comment by Guilherme Blanco [ 15/Feb/11 ]

The correct method name is: setAutoloadAnnotations

We need to fix the documentation of Common package.

Comment by Guilherme Blanco [ 15/Feb/11 ]

Fixed





[DCOM-30] Documentation Bug regarding setAnnotationNamespaceAlias Created: 12/Nov/10  Updated: 15/Feb/11  Resolved: 15/Feb/11

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Timo A. Hummel Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

In the documentation on http://www.doctrine-project.org/projects/common/2.0/docs/reference/annotations/en#setup-and-configuration:namespace-aliases I'm given the following example:

$reader->setAnnotationNamespaceAlias('MyCompany\Annotations', 'my');

However, this only works here if I do it that way:

$reader->setAnnotationNamespaceAlias('MyCompany\Annotations\\', 'my');

If the latter one is correct, it should be documented as such.



 Comments   
Comment by Guilherme Blanco [ 15/Feb/11 ]

Already fixed in documentation.





[DCOM-22] Cache should support an array of options. Created: 19/Aug/10  Updated: 30/Aug/10  Resolved: 30/Aug/10

Status: Closed
Project: Doctrine Common
Component/s: Caching
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Guilherme Blanco Assignee: Guilherme Blanco
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Currently the overall code to instantiate Cache drivers cannot be generic.
This can be noticed when you compare APCCache and MemcacheCache drivers.

The first one is simply a no argument instantiation. The second, even after isntantiation, it still requires you to call a method (->setMemcache) in order to work.
This is not optimal for generic approaches, creating unreliable conditional situations. Also it is not extendable, allowing user to build his own driver.

Please consider these sample codes:
http://pastie.org/1103439
http://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php#L419

A suggested approach could be a CacheManager as a fatory.
Another one would be Cache interface assigning a contract to receive an array of options.

Anyway, this should be fixed VERY soon.



 Comments   
Comment by Roman S. Borschel [ 21/Aug/10 ]

After our discussion yesterday, can we close this?

Comment by Guilherme Blanco [ 30/Aug/10 ]

As discussed, we won't fix this.





[DCOM-16] Doctrine\Cache\Cache\AbstractCache::deleteByPrefix() vs. cache namespace Created: 05/Aug/10  Updated: 31/Aug/10  Resolved: 31/Aug/10

Status: Closed
Project: Doctrine Common
Component/s: Caching
Affects Version/s: 2.0.0-BETA2, 2.0.0-BETA3, 2.0.0-BETA4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: xlite Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None
Environment:

PHP 5.3.0 + memcache + xdebug; FreeBSD 6.4-RELEASE-p



 Description   

The methods deleteByPrefix() / deleteByRegExp() / deleteBySuffix() are based on the method getIds(), which returns unique identifiers with an added namespace in the front. That is why to be able to delete cells using these three methods, you have to know the namespace.
Example:

$cacheDriver->setNamespace('ns');
$cacheDriver->save('data', 'name');
$cacheDriver->deleteByPrefix('data');

In this example the cell will not be deleted.



 Comments   
Comment by Guilherme Blanco [ 31/Aug/10 ]

In commit: http://github.com/doctrine/common/commit/a2238b871c13cf0e195fa18f0b8744e38baabf48
I committed a fix to this issue.

Thanks for reporting that!





[DCOM-14] Exclude @throws annotation from parsing. Created: 21/Jul/10  Updated: 31/Aug/10  Resolved: 31/Aug/10

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jan Obrátil Assignee: Roman S. Borschel
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

Ubuntu Linux 10.04 LTS Server, standard lamp instalation from repositories
w$ php -v
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:01:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies



 Description   

CLI doctrine tool fails when parsing entity sources (for example: doctrine orm:validate-schema) by following error:
Fatal error: Class 'throws\MemberAccessException' not found in /usr/share/php/Doctrine/Common/Annotations/Parser.php on line 272
exception 'FatalErrorException' with message 'Class 'throws\MemberAccessException' not found' in /usr/share/php/Doctrine/Common/Annotations/Parser.php:272

This error appears when @HasLifecycleCallbacks annotation is added into entity.

The solution is adding "@throws" annotation into strippedTags into Doctrine/Common/Annotations/Parser.php



 Comments   
Comment by Roman S. Borschel [ 26/Aug/10 ]

Can you confirm that this is still a problem with the latest code?

Comment by Jan Obrátil [ 27/Aug/10 ]

I'm using the latest Doctrine2 available thru pear:

Installed packages, channel pear.doctrine-project.org:
======================================================
Package Version State
DoctrineCommon 2.0.0BETA4 beta
DoctrineDBAL 2.0.0BETA3 beta
DoctrineORM 2.0.0BETA3 beta

I still have to alter Parser.php

Comment by Guilherme Blanco [ 31/Aug/10 ]

This ticket is invalid. I added coverage to it on commit:

http://github.com/doctrine/common/commit/7e7a06e9878a1a41a72a062fa18d71d6c64a600a

Seems you have a @throws definition that is connected to the returned class, and this is then considered an annotation.





[DCOM-10] The annotation parser isn't EBNF compliant Created: 04/Jul/10  Updated: 16/Feb/11  Resolved: 16/Feb/11

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.0.0-BETA4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Bernhard Schussek Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None
Environment:

PHP 5.3.2, Linux Ubuntu 10.04



 Description   

The EBNF allows passing multiple comma-separated annotations to an annotation:

Annotation ::= "@" AnnotationName ["(" [Values] ")"]
Values ::= Array | Value {"," Value}*
Value ::= PlainValue | FieldAssignment
PlainValue ::= integer | string | float | boolean | Array | Annotation

Therefore the following should be possible.

/** @Name(@Foo, @Bar) */

This results in an error though.

IMO,

/** @Name(@Foo, @Bar) */

should be equivalent to

/** @Name({@Foo, @Bar}) */

just like

/** @Name(foo = "foo", bar = "bar") */

is equivalent to

/** @Name({foo = "foo", bar = "bar"}) */


 Comments   
Comment by Bernhard Schussek [ 04/Jul/10 ]

Fixed in http://github.com/bschussek/doctrine-common/tree/DCOM-10

Comment by Bernhard Schussek [ 04/Jul/10 ]

As I've just noticed, the statement that

/** @Name(foo = "foo", bar = "bar") */

equals

/** @Name({foo = "foo", bar = "bar"}) */

is wrong. The first does field assignments, the second stores the array in the "value" field.

Nevertheless, either Doctrine's implementation (as per my commit) or the EBNF have to be updated.

Comment by Guilherme Blanco [ 15/Feb/11 ]

Your branch added another vulnerability, so I cannot merge.

The problem appears when you do this:

@Name(@Foo, {bar="bar"})

What would you expect on this situation? I'd imagine this:

array(
    0 => object<Foo>,
    1 => array(
        'bar' => 'bar'
    )
)

But with your patch, the actual result is:

array(
    0 => object<Foo>,
    'bar' => 'bar'
)

There's a way to fix it by changing how FieldAssignment returns. Instead of returning an array, it should return return an stdClass.
Then we could only update the Values grammar accordingly.

I'll assign this issue to me, so I can work on it to be EBNF compatible. Too bad it took so many time for us to look at it. =(

Comment by Bernhard Schussek [ 16/Feb/11 ]

Yes, I'd expect the first result. Thanks for looking into this, I completely forgot about this issue.

Comment by Guilherme Blanco [ 16/Feb/11 ]

This issue was fixed in: https://github.com/doctrine/common/commit/4210fbd8b261c000c793461c4f815b4d43bcc362

Thanks a lot for the bug report.
EBNF and Code are now compliant with each other. Took some time to be fixed, but here it is. =)





[DCOM-8] Annotation Parser tries to Load Classes that don't exist Created: 14/Jun/10  Updated: 14/Jun/10  Resolved: 14/Jun/10

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.0.0-BETA2
Fix Version/s: 2.0.0-BETA3

Type: Bug Priority: Major
Reporter: Marc Neuhaus Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File Error.txt     File Possible Solution.diff     File Tag.php    

 Description   

If i add the Annotation Tag @ignore to my model the Parser tries to load the Mapping class for that property. Since this class doesn't exist it fails with a fatal error.

I attached the stripped down Entity with the @ignore annotation, the Error Text and a Possible Solution

Greetings Marc



 Comments   
Comment by Roman S. Borschel [ 14/Jun/10 ]

Fixed in http://github.com/doctrine/common/commit/f34d581f646b3d9b5f06c6c081ac3e568d8496ff





[DCOM-4] Cannot use namespace separator and namespace alias at the same time for annotations Created: 09/May/10  Updated: 24/May/10  Resolved: 24/May/10

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0-BETA2

Type: Improvement Priority: Major
Reporter: Tim Nagel Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None


 Description   

In the function Annotation() in \Doctrine\Common\Annotations\Parser.php (~line 225)

There is a check for how many $nameParts there are, and the doctrine code will only append the namespace aliases if there are no namespace separators.

There is also an argument against modification since the user of the code could just define more namespace aliases, but I feel that it should be able to cope with a namespace alias and a namespace separator at the same time.



 Comments   
Comment by Benjamin Eberlei [ 09/May/10 ]

From our discussion on IRC, the problems here are:

  • Annotations that don't have classes don't really throw an appropriate exception (error message)
  • The \ separator inside an annotation does not throw an appropriate exception.
Comment by Tim Nagel [ 24/May/10 ]

Proposed solution to the namespace separators: http://github.com/merk/common/commit/b31166c6a85235e03935a4b41f5a54aa478f6c6b

I am unsure about throwing exception messages or doing anything too fancy in this area since there will be instances where other annotations are used for other purposes (phpdoc, etc) where you only want to ignore them.





[DCOM-2] Annotation and autoloading Created: 20/Apr/10  Updated: 14/Jun/10  Resolved: 14/Jun/10

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0-BETA3

Type: Improvement Priority: Major
Reporter: Kirill chEbba Chebunin Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None


 Description   

The problem is that we need to load all annnotation classes before we read annotations from the target class.
So we need to require_once them at target class source, or just before reading.
It's not cool.

The reason of this, is a fix of bug #77
http://www.doctrine-project.org/jira/browse/DDC-77
and class_exists(..., false).

Solutions:
1. Filter DocBlockTags, and think that all other @foo string is annotations (don't check with class_exists)
2. Use class_exists(..., true) but supress warnings with @ and try/catch operators.

May be there are some another, better solutions.



 Comments   
Comment by Roman S. Borschel [ 22/Apr/10 ]

The class_exists check can maybe be removed altogether since is_subclass_of is no longer used.

Comment by Tim Nagel [ 24/May/10 ]

Would removing the second parameter to class_exists solve the problem sufficiently?

I would thing you would have to leave the class_exists check in, otherwise it will try to parse annotations that do not resolve to class names?

Comment by Tim Nagel [ 27/May/10 ]

Changed:

http://github.com/merk/common/commit/152fdecf11b7999262df0410b5584951de5191b3

Comment by Roman S. Borschel [ 27/May/10 ]

The fundamental problem with class_exists($blub) (which is the same as class_exists($blub, true) is that it basically requires a class loader / autoloader that fails silently when a class file does not exist, which means it must use costly file_exists checks before loading any class. The Doctrine\Common\ClassLoader does (on purpose) not check for file existance. If the class loader is responsible for a particular class and it is requested to load it, failing to do so is (and should be) a fatal error.

We consider the fact that two responsibilities are mixed here, a) (auto)loading a class file and b) checking for the existance of a class (file), to be a design flaw in class_exists / autoloading. It means that you are required to check for file existance in a class loader and fail silently if the file does not exist which is completely unnecessary in 99% of the cases. Compare how many times class_exists(..., true) is usually used in a single request and how many classes, in total, are usually loaded per request. So just for the case that some code might use an occasional class_exists(..., true) check you have to check each single file for existance before loading it (and you must fail silently, it might be a class_exists check!).

Even more, in a case where you really only want to check for class (file) existance, but you dont actually want to load it, you can't! class_exists(..., true) when the class file exists results in loading the class file, even if its completely unnecessary.

We are planning to come up with a better approach that separates the 2 concerns.

This is related to DCOM-7.

Comment by Roman S. Borschel [ 27/May/10 ]

The recommended approach for annotations by the way, (recommended by me), is to load them manually via a require call. The ORM does exactly this. If you rely on class_exists(..., true) and silently failing autoloaders, this becomes costly considering how often class_exists would be invoked while parsing annotations.





[DCOM-75] remove leading backslash from class name before comparing to namespace in annotation autoloading Created: 03/Nov/11  Updated: 06/Dec/13  Resolved: 06/Dec/13

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.1.2
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Guillaume ORIOL Assignee: Guilherme Blanco
Resolution: Invalid Votes: 0
Labels: None
Environment:

not relevant



 Description   

I am figuring a problem with Symfony Validator constraints (I use annotations to define the constraint rules).

As I don't use Symfony's framework, I create the validator service by myself.
Somewhere in its factory, I put the following code:

         
AnnotationRegistry::registerAutoloadNamespaces(array(
    '\Symfony\Component\Validator\Constraints' => APPLICATION_ROOT . '/library'
));

Then, in my entities, I have annotations such as:

use Symfony\Component\Validator\Constraints as Assert;

class Author {
    /**
     * @Assert\NotBlank()
     */
    protected $name;
}

In this configuration, I get the following error:

[Semantical Error] The annotation "@Symfony\Component\Validator\Constraints\NotBlank"
in property Domain\Entity\Author::$name does not exist, or could not be auto-loaded.

I was able to trace it down to the Doctrine\Common\Annotations\AnnotationRegistry#loadAnnotationClass($class) where we can find the following test:

    if (strpos($class, $namespace) === 0) {
        require ...;
    }

which means "if the namespace can be found at the beginning of the FQCN, require it".
But those namespaces come from "use" statements where there is no leading backslash.
That's why the test fails.

Christophe Coevoet answered:

you should remove the leading backslash. Fully qualified class names used as string don't include it in PHP.

Benjamin Eberlei suggested to remove the leading backslash before comparing the class to the namespace.
I would follow Benjamin suggestion and would like to add a comment about leading backslashes:

When I add a use statement to my code for a class, I can then use its alias to get an instance of that class.

use Doctrine\ORM\Mapping\ClassMetadata;
...
$metadata = new ClassMetadata();

The same is true with:

use Doctrine\ORM\Mapping as Foo;
...
$metadata = new Foo\ClassMetadata();

This is not a fully qualified class name.
In that sense, I do understand such an annotation: @ORM\Entity.

But I find the syntax of a fully-qualified annotation (@My\Annotation\Whatever) erroneous (or at least counter-intuitive) as it doesn't start with a backslash.



 Comments   
Comment by Guilherme Blanco [ 06/Dec/13 ]

Your referred problem is an internal namespace => directory mapping.
Strings in PHP already represent FQCN and that's why you shouldn't have a leading backslash in your string.

This has nothing to do with annotations.





[DCOM-24] Documentation about Default Namespace has error. Created: 25/Sep/10  Updated: 15/Feb/11  Resolved: 15/Feb/11

Status: Closed
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.0.0-RC1
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Margus Sipria Assignee: Guilherme Blanco
Resolution: Invalid Votes: 0
Labels: None


 Description   

$reader->setDefaultAnnotationNamespace('Doctrine\Common\Annotations');

I used above code to test annotations without namespaces just to find out that there there is missing \ (or 2 if you count escaping) at the end of that string.

This works: $reader->setDefaultAnnotationNamespace('Doctrine\\Common\\Annotations
');

reference guide where I found error is here: http://www.doctrine-project.org/projects/common/2.0/docs/reference/annotations/en#setup-and-configuration:default-namespace



 Comments   
Comment by Guilherme Blanco [ 15/Feb/11 ]

Already fixed on documentation.





[DCOM-7] Slight Refactor of ClassLoader Created: 06/May/10  Updated: 13/Jun/10  Resolved: 13/Jun/10

Status: Closed
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0-BETA2

Type: Improvement Priority: Minor
Reporter: Michael Ridgway Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None

Attachments: File patch.diff    

 Description   

This is a rather trivial issue: I'd like to add a function to the Common\ClassLoader called getClassPath($className) or something named similarly so that we are able to find where an autoloader will look for the specified class. The autoloader doesn't check for file existence normally (as it shouldn't) but there are cases where the developer does need to make sure that the file exists before a class is attempted to be loaded.

I've attached a patch for the changes that I'm proposing.



 Comments   
Comment by Roman S. Borschel [ 06/May/10 ]

We have another idea for these issues (basically for the issue of using class_exists(..., true) and your new method may even complement this nicely. I will let you know what I mean here soon.

Comment by Roman S. Borschel [ 13/Jun/10 ]

There is now ClassLoader#classExists as well as ClassLoader#getClassLoader available.





[DCOM-42] Sort in ArrayCollection Created: 22/Mar/11  Updated: 17/Jul/11  Resolved: 17/Jul/11

Status: Closed
Project: Doctrine Common
Component/s: Collections
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Thomas Lundquist Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Needed a sort function in ArrayCollection, made it. Simple but works for me at least.

Pull request: https://github.com/doctrine/common/pull/12



 Comments   
Comment by Guilherme Blanco [ 17/Jul/11 ]

As per github comment.





[DCOM-173] Add test assets and tests for proxy generators Created: 18/Feb/13  Updated: 21/Feb/13  Due: 18/Feb/13  Resolved: 21/Feb/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.4
Fix Version/s: 2.4

Type: Bug Priority: Blocker
Reporter: Marco Pivetta Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

Need to add tests assets to check __isset __get __set, etc. Currently only code generation for proxies inheriting __sleep is tested.



 Comments   
Comment by Marco Pivetta [ 18/Feb/13 ]

See https://github.com/doctrine/common/pull/255

Comment by Marco Pivetta [ 21/Feb/13 ]

Merged





[DCOM-84] Improve Proxy Naming Created: 01/Dec/11  Updated: 13/Dec/11  Resolved: 12/Dec/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2

Type: Improvement Priority: Blocker
Reporter: Johannes Schmitt Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

see https://gist.github.com/b493493ecdb22c21590e



 Comments   
Comment by Benjamin Eberlei [ 12/Dec/11 ]

Implemented in https://github.com/doctrine/common/pull/83

Comment by Benjamin Eberlei [ 13/Dec/11 ]

This issue is referenced in Github Pull-Request GH-83
https://github.com/doctrine/common/pull/83





[DCOM-61] Class annotation is not setting annotation properties Created: 18/Aug/11  Updated: 25/Aug/11  Resolved: 25/Aug/11

Status: Resolved
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: James Reed Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None
Environment:

Windows 7 64-bit, PHP v5.3.1



 Description   

My annotations were working fine with v2.0.5. Once I upgraded to v2.1 they stopped working. Using this condensed code based on the v2.1 documentation on Annotations (http://www.doctrine-project.org/docs/common/2.1/en/reference/annotations.html):

require 'c:/dev/library/doctrine-orm/Doctrine/Common/ClassLoader.php';

$classLoader = new \Doctrine\Common\ClassLoader('Doctrine', 'c:/dev/library/doctrine-orm');
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', 'c:/dev/library/doctrine-orm/Doctrine');
$classLoader->register();

$reader = new \Doctrine\Common\Annotations\AnnotationReader();
$reader->setIgnoreNotImportedAnnotations(true);
$reader->setEnableParsePhpImports(false);
$className = 'User';
$reflectionClass = new \ReflectionClass($className);

$classAnnotations = $reader->getClassAnnotations($reflectionClass);
echo "Class Annotations - $className:\n";
print_r($classAnnotations);

/**
* @Annotation
*/
class Foo {
    public $bar;
}

/**
* @Foo(bar="foo")
*/
class User {
    
}

The result is:

Class Annotations - User:
Array
(
    [0] => Foo Object
        (
            [bar] =>
        )

)

Why is bar empty? If I remove the @Foo annotation from the docblock for the User class, then the result is an empty array. So it's clearly detecting the annotation, it's just not setting the annotation property.



 Comments   
Comment by James Reed [ 25/Aug/11 ]

This is blocking me from upgrading to v2.1

Comment by James Reed [ 25/Aug/11 ]

Got the same result with v2.0.6. Must be something I'm missing here.





[DCOM-242] [GH-322] 2.4 do not serialize static properties Created: 21/May/14  Updated: 21/May/14  Resolved: 21/May/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4.2

Type: Task Priority: Blocker
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 1
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of dantleech:

Url: https://github.com/doctrine/common/pull/322

Message:

The master branch does not serialize static properties, 2.4 does.

When we upgraded to Doctrine ORM 2.4 the proxy generation was moved to Doctrine Common (I think) and subsequently all the proxy entities which has static properties caused errors on __sleep



 Comments   
Comment by Doctrine Bot [ 21/May/14 ]

A related Github Pull-Request [GH-322] was closed:
https://github.com/doctrine/common/pull/322





[DCOM-194] Creating Proxy class failure for own __get method Created: 22/May/13  Updated: 08/Sep/13  Resolved: 10/Jun/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.4
Fix Version/s: 2.4

Type: Bug Priority: Critical
Reporter: Jan Pecek Assignee: Marco Pivetta
Resolution: Fixed Votes: 1
Labels: proxy
Environment:

using Nette framework ( http://nette.org ), PHP 5.4



 Description   

Nette framework (http://nette.org) has got own Nette\Object as a base of other objects. It also rewrite the default __get method in PHP object but it uses definition with pointer:

public function &__get($name)

Doctrine Common creates Proxy classes with __get method too but not with reference. It causes an error using strict warning:

Declaration of Proxy\__CG__\MyEntityObject::__get() should be compatible with & Nette\Object::__get($name)

The problem is in ProxyGenerator. Locally I've patched it in my Doctrine repository clone but don't know how to resolve it globally.



 Comments   
Comment by Marco Pivetta [ 22/May/13 ]

https://github.com/doctrine/common/blob/2.4.0-RC2/lib/Doctrine/Common/Proxy/ProxyGenerator.php#L386-L403 could be patched to verify if the method is byref/byval.

Comment by Christophe Coevoet [ 03/Jun/13 ]

This should probably be checked for all proxied methods, not only for magic ones

Comment by Marco Pivetta [ 03/Jun/13 ]

Christophe Coevoet I think I already check proxied methods, but didn't apply that logic for magic methods.

edit: indeed, there's a test for that: https://github.com/doctrine/common/blob/2.4.0-RC3/tests/Doctrine/Tests/Common/Proxy/LazyLoadableObject.php#L101-L106

Comment by Michael Moravec [ 06/Jun/13 ]

Hello, I've patched ProxyGenerator::generateMagicGet method to support reference, see Github PR #278.
Jan Pecek, could you confirm it fixes the problem?

Comment by Jan Pecek [ 06/Jun/13 ]

Michael Moravec: Yes, this is ok. Now, proxy classes are generated well.

Comment by Marco Pivetta [ 10/Jun/13 ]

Cleaned and re-submitted at https://github.com/doctrine/common/pull/281

Please review and then I'll merge.

Comment by Marco Pivetta [ 10/Jun/13 ]

Merged at https://github.com/doctrine/common/commit/d658ec7a03f6475eff0dd1eb940bdedd862e4b96





[DCOM-69] [APC Cache] doFlush does not clear user cache Created: 27/Sep/11  Updated: 03/Oct/11  Resolved: 03/Oct/11

Status: Resolved
Project: Doctrine Common
Component/s: Caching
Affects Version/s: 2.2
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Jérôme Forêt Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

lib\Doctrine\Common\Cache\ApcCache.php

The function "doFlush" only clears opcode cache.
The user cache is never cleared.

To correct it, one solution should be :

protected function doFlush()
{
    $res = false;    
    $bool1 = apc_clear_cache();
    $bool2 = apc_clear_cache('user');
    if ($bool1 && $bool2)
    {
        $res = true;
    }
    return $res;
}


 Comments   
Comment by Guilherme Blanco [ 03/Oct/11 ]

Fixed in https://github.com/doctrine/common/commit/d6e4c8b22af9800db4fd9d679ce98538da028168





[DCOM-27] Method Next from ArrayCollection needs to return something! Created: 11/Oct/10  Updated: 31/Oct/10  Resolved: 31/Oct/10

Status: Resolved
Project: Doctrine Common
Component/s: Collections
Affects Version/s: 2.0.0-RC1
Fix Version/s: 2.0.0-RC2

Type: Bug Priority: Critical
Reporter: Henrique Girardi dos Santos Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

I think this method needs to return something...

/**

  • Moves the internal iterator position to the next element.
    *
  • @return mixed
    */
    public function next() { next($this->_elements); }

doctrine-common/lib/Doctrine/Common/Collections/ArrayCollection.php



 Comments   
Comment by Benjamin Eberlei [ 31/Oct/10 ]

resolved





[DCOM-25] method setAutoloadAnnotationClasses-fails Created: 25/Sep/10  Updated: 31/Oct/10  Resolved: 31/Oct/10

Status: Resolved
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.0.0-RC1
Fix Version/s: 2.0.0-RC2

Type: Bug Priority: Critical
Reporter: Margus Sipria Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

$reader = new Doctrine\Common\Annotations\AnnotationReader();
$reader->setAutoloadAnnotationClasses(true);

above code is trying use default parser's setAutoloadAnnotationClasses-method, which isn't found, instead parser has setAutoloadAnnotations.



 Comments   
Comment by Benjamin Eberlei [ 31/Oct/10 ]

fixed.





[DCOM-240] FileCacheReader requires write access, even when it isn't writing Created: 16/Apr/14  Updated: 16/Apr/14  Resolved: 16/Apr/14

Status: Resolved
Project: Doctrine Common
Component/s: Caching
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Chris Sedlmayr Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: cache


 Description   

Within the constructor of Doctrine\Common\Annotations\FileCacheReader, it checks if the $cacheDir is writable, and if not, it throws an exception.
As this class performs read and write operations, it makes sense to only perform that check when it needs to write, maybe as part of the saveCacheFile method.

We are warming all parts of our cache during application build process, so on production servers we have no writable directories, this code means that can't happen.



 Comments   
Comment by Chris Sedlmayr [ 16/Apr/14 ]

Fixed by https://github.com/doctrine/annotations/pull/30





[DCOM-236] @Target isn't properly bitmasked Created: 03/Mar/14  Updated: 03/Mar/14  Resolved: 03/Mar/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Joshua Thijssen Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

The @target annotation can be used for adding annotation-targets. However, adding multiple targets results in unwanted behaviour, as the targets aren't OR'ed together, but simply added.

For instance: @target(

{METHOD, METHOD}

) results in an annotation that can only be added to properties (2 + 2 = 4), instead of the wanted 2, and other weirdness.



 Comments   
Comment by Marco Pivetta [ 03/Mar/14 ]

Merged: https://github.com/doctrine/annotations/commit/c1a38760a6cfeec627ed66f9192db2acce1cb9e0

Note: no assigned fix version since doctrine/annotation versioning diverges from doctrine/common versioning.

Likely fixed with doctrine/annotations:1.1.3





[DCOM-235] [GH-317] Implemented an ObjectPersisterInterface for entity/object storage Created: 21/Feb/14  Updated: 24/Feb/14  Resolved: 24/Feb/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by DDC-2994 [GH-959] Implemented an ObjectPersist... Resolved

 Description   

This issue is created automatically through a Github pull request on behalf of iltar:

Url: https://github.com/doctrine/common/pull/317

Message:

      1. Why is this useful?
        Instead of using the ```repositoryClass```, we use 'Repository as a Service'. This means that we inject our repository service instead of doing ```$em->getRepository('MyEntity')```, this provides typehinting and autocomplete in IDEs. This introduces a minor inconvenience, we need to inject an ```EntityManagerInterface``` to provide persist/flush. We don't want the entire ```EntityManagerInterface``` capabilities just to store an object.

Using the ```ObjectPersisterInterface``` we can "hide" the ```EntityManagerInterface``` and only let the code know we have the persist and flush methods available. By default this is implemented on the ```EntityManager```, but is also possible to be mocked or replaced by a custom implementation (rotating entity managers?).

        1. Example
          ``` php

class MyService
{
private $op;
private $es;

public function __construct(ObjectPersisterInterface $op, MyEntityService $es)

{ $this->op = $op; $this->es = $es; }

public function doSomething($value)

{ $entity = $this->es->findByValue($value)->setValue('something'); $this->op->flush(); }

public function doSomethingElse()

{ $entity = new MyEntity(); $this->op->persist($entity); $this->op->flush(); }

}

```



 Comments   
Comment by Doctrine Bot [ 24/Feb/14 ]

A related Github Pull-Request [GH-317] was closed:
https://github.com/doctrine/common/pull/317





[DCOM-228] [GH-312] Improve UnexpectedValueException error message Created: 19/Dec/13  Updated: 19/Dec/13  Resolved: 19/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.0

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of JamesGuthrie:

Url: https://github.com/doctrine/common/pull/312

Message:

UnexpectedValueException::proxyDirectoryNotWritable() provides
information as to which directory was unwritable.



 Comments   
Comment by Doctrine Bot [ 19/Dec/13 ]

A related Github Pull-Request [GH-312] was closed:
https://github.com/doctrine/common/pull/312

Comment by Marco Pivetta [ 19/Dec/13 ]

Merged: https://github.com/doctrine/common/commit/a4e2629e0a3ab57e4a70fa49ec556a44414ffb27





[DCOM-223] [GH-308] fix the optimize regex and adapt the tests to actually test classAnnotat... Created: 12/Dec/13  Updated: 12/Jan/14  Resolved: 12/Jan/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.0

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of dawehner:

Url: https://github.com/doctrine/common/pull/308

Message:

There has been several problems

  • Even we enabled classAnnotationOptimized we expected a different behavior: You cannot parse properties any longer (fixed that by expecting an exception). Therefore moved the test data into a provider so you can check the exception on each of them.
  • Once done I realized that DeeperNamespaceParent had the wrong className
  • Additional I added a test to check that the regex matched.


 Comments   
Comment by Doctrine Bot [ 12/Jan/14 ]

A related Github Pull-Request [GH-308] was closed:
https://github.com/doctrine/common/pull/308

Comment by Marco Pivetta [ 12/Jan/14 ]

Merged: https://github.com/doctrine/common/commit/a45d110f71c323e29f41eb0696fa230e3fa1b1b5





[DCOM-222] [GH-306] DCOM-162 - Returning the dumped value in `Doctrine\Common\Util\Debug::dump()` Created: 03/Dec/13  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/306

Message:

This is a replacement for DCOM-162 (issue #244) - rebased and cleaned



 Comments   
Comment by Marco Pivetta [ 03/Dec/13 ]

Duplicate of DCOM-162

Comment by Doctrine Bot [ 03/Dec/13 ]

A related Github Pull-Request [GH-306] was closed:
https://github.com/doctrine/common/pull/306





[DCOM-220] [GH-304] fix typo Created: 19/Nov/13  Updated: 19/Nov/13  Resolved: 19/Nov/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.0

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of samsonasik:

Url: https://github.com/doctrine/common/pull/304

Message:



 Comments   
Comment by Doctrine Bot [ 19/Nov/13 ]

A related Github Pull-Request [GH-304] was closed:
https://github.com/doctrine/common/pull/304





[DCOM-219] [GH-301] fix hasPublicMethod implementations for abstract functions in ReflectionService Created: 10/Oct/13  Updated: 03/Feb/14  Resolved: 03/Feb/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4.2

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of kmohrf:

Url: https://github.com/doctrine/common/pull/301

Message:

Since php >=5.4.8 the method is_callable returns false for
abstract functions. As the documentation for the
hasPublicMethod method states that it is sufficient
for the class to have a public method with that name it���s
not necessary to check whether the method is abstract or not.

The mentioned method is currently used in the doctrine2-orm
project where it helps with the validation of lifecycle callbacks.
As lifecycle callbacks must be callable but considering the fact
that abstract functions can only be used in abstract classes it
should be OK to rely on php for the assumption that the method
is in fact not abstract when it is called because php would be
unable to instantiate abstract classes.

this fixes DDC-2708.

there are currently no tests in this pull request. i���d volunteer for writing one or two (one for common, one for orm) but i would like to talk to someone first .



 Comments   
Comment by Doctrine Bot [ 03/Feb/14 ]

A related Github Pull-Request [GH-301] was closed:
https://github.com/doctrine/common/pull/301





[DCOM-218] [GH-299] Allow root namespaces for Entities Created: 19/Sep/13  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of haroldiedema:

Url: https://github.com/doctrine/common/pull/299

Message:

Allow root namespaces for entities to be "valid" since a prefix in symfony2 cannot be empty.



 Comments   
Comment by Doctrine Bot [ 20/Sep/13 ]

A related Github Pull-Request [GH-299] was closed:
https://github.com/doctrine/common/pull/299





[DCOM-216] [GH-298] Silence E_NOTICE warning: "Undefined index". Created: 16/Sep/13  Updated: 16/Sep/13  Resolved: 16/Sep/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.0

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None

Sub-Tasks:
Key
Summary
Type
Status
Assignee
DCOM-217 Merge DCOM-216 into 2.4.x Sub-task Resolved Guilherme Blanco  

 Description   

This issue is created automatically through a Github pull request on behalf of fredrik-w:

Url: https://github.com/doctrine/common/pull/298

Message:

Running PHP with error reporting on for E_NOTICE this bit me. Fix is simple and straightforward, check if key is defined and use that value if so, otherwise use null.



 Comments   
Comment by Doctrine Bot [ 16/Sep/13 ]

A related Github Pull-Request [GH-298] was closed:
https://github.com/doctrine/common/pull/298

Comment by Marco Pivetta [ 16/Sep/13 ]

Merged: https://github.com/doctrine/common/commit/d9dea98243c733ff589aab10e321de4f14a63ab4





[DCOM-212] [GH-296] Proxies shouldn't serialize static properties in __sleep() Created: 11/Sep/13  Updated: 11/Sep/13  Resolved: 11/Sep/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.4, 2.4.1
Fix Version/s: 2.5.0

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: proxy

Sub-Tasks:
Key
Summary
Type
Status
Assignee
DCOM-213 Merge DCOM-212 back into 2.4.x Sub-task Resolved Guilherme Blanco  

 Description   

This issue is created automatically through a Github pull request on behalf of mnapoli:

Url: https://github.com/doctrine/common/pull/296

Message:

This PR contains a test and a fix for the following bug: Proxies did serialize static properties.

I believe this is a regression in 2.4 since I've never met this bug before.

Given the class:

class StaticPropertyClass
{
    protected static $protectedStaticProperty;
}

Before the fix, proxies would contain the following `__sleep` method:

    public function __sleep()
    {
        if ($this->__isInitialized__) {
            return array('__isInitialized__', 'protectedStaticProperty');
        }

        return array('__isInitialized__', 'protectedStaticProperty');
    }

With the fix:

    public function __sleep()
    {
        if ($this->__isInitialized__) {
            return array('__isInitialized__');
        }

        return array('__isInitialized__');
    }


 Comments   
Comment by Doctrine Bot [ 11/Sep/13 ]

A related Github Pull-Request [GH-296] was closed:
https://github.com/doctrine/common/pull/296

Comment by Marco Pivetta [ 11/Sep/13 ]

Merged: https://github.com/doctrine/common/commit/4233262c8a94b2f22189ce3e5972dae25aa6764b





[DCOM-211] [GH-295] Patch to support entity's static property. Created: 01/Sep/13  Updated: 01/Sep/13  Resolved: 01/Sep/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of liverbool:

Url: https://github.com/doctrine/common/pull/295

Message:

Entity contains association mapping have trouble to debug with dumping object (entity) because association field will invoke proxy entity, in additional the association field can make as static and static can solve in this case. This patch make to support static member of the fields.

This pull to review.



 Comments   
Comment by Doctrine Bot [ 01/Sep/13 ]

A related Github Pull-Request [GH-295] was closed:
https://github.com/doctrine/common/pull/295





[DCOM-208] [GH-290] Fixed html_errors overwriting Created: 17/Aug/13  Updated: 17/Aug/13  Resolved: 17/Aug/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of horsik:

Url: https://github.com/doctrine/common/pull/290

Message:

html_errors configuration option is being overwritten instead of switched on temporarily.
Especially annoying when using xdebug extension which relies on html_errors
>By default Xdebug overloads var_dump() with its own improved version for displaying variables when the html_errors php.ini setting is set to 1.



 Comments   
Comment by Doctrine Bot [ 17/Aug/13 ]

A related Github Pull-Request [GH-290] was closed:
https://github.com/doctrine/common/pull/290

Comment by Marco Pivetta [ 17/Aug/13 ]

Merged: https://github.com/doctrine/common/commit/f28a39065d455b6df1c989ea6590e971a1f0256d





[DCOM-209] [GH-291] [DDC-717] Add eval() and FILE_NOT_EXISTS strategies for proxy generation Created: 20/Aug/13  Updated: 22/Dec/13  Resolved: 20/Aug/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of beberlei:

Url: https://github.com/doctrine/common/pull/291

Message:



 Comments   
Comment by Doctrine Bot [ 20/Aug/13 ]

A related Github Pull-Request [GH-291] was closed:
https://github.com/doctrine/common/pull/291

Comment by Doctrine Bot [ 22/Dec/13 ]

A related Github Pull-Request [GH-291] was closed:
https://github.com/doctrine/dbal/pull/291





[DCOM-210] ProxyFactory: Modes for NEVER, FILE_NOT_EXISTS, ALWAYS Created: 07/Aug/13  Updated: 09/Sep/13  Resolved: 25/Aug/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by Marco Pivetta [ 25/Aug/13 ]

Implemented in https://github.com/doctrine/common/pull/291 - ( DCOM-209 )

Comment by Matthieu Napoli [ 09/Sep/13 ]

Any docs?

It seems that it can't be used with Doctrine\ORM\Configuration

Comment by Marco Pivetta [ 09/Sep/13 ]

I think this should work in v2.4.0: see https://github.com/doctrine/doctrine2/blob/v2.4.0/lib/Doctrine/ORM/EntityManager.php#L163

I'll open an issue to document these new flags

Comment by Marco Pivetta [ 09/Sep/13 ]

Created DDC-2664

Comment by Matthieu Napoli [ 09/Sep/13 ]

Actually found it, it's not documented and not really foolproof:

$doctrineConfig = new Doctrine\ORM\Configuration();
$doctrineConfig->setAutoGenerateProxyClasses(AbstractProxyFactory::AUTOGENERATE_EVAL);

However it will not work if the proxy autoloader is registered (which was necessary before, so if you forget to remove it, you'll get confusing errors that the proxy file can't be found), and you need to set a proxy dir else there's an exception:

exception 'Doctrine\Common\Proxy\Exception\InvalidArgumentException' with message 'You must configure a proxy directory. See docs for details'
$doctrineConfig->setProxyDir('/tmp/proxies');

The docs needs updating, both in code and on the website. If I find some time today I'll try to do it.

Comment by Matthieu Napoli [ 09/Sep/13 ]

Woops, commented at the same time, will copy my comment to the other ticket for better tracking.

Comment by Doctrine Bot [ 09/Sep/13 ]

A related Github Pull-Request [GH-783] was closed:
https://github.com/doctrine/doctrine2/pull/783

Comment by Doctrine Bot [ 09/Sep/13 ]

A related Github Pull-Request [GH-782] was closed:
https://github.com/doctrine/doctrine2/pull/782





[DCOM-202] [GH-285] Fixed getting wrong manager with getManagerForClass() when using multipl... Created: 20/Jun/13  Updated: 22/Dec/13  Resolved: 20/Jun/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of itze88:

Url: https://github.com/doctrine/common/pull/285

Message:

...e document managers

Please reply if an example is needed



 Comments   
Comment by Doctrine Bot [ 20/Jun/13 ]

A related Github Pull-Request [GH-285] was closed:
https://github.com/doctrine/common/pull/285

Comment by Doctrine Bot [ 22/Dec/13 ]

A related Github Pull-Request [GH-285] was closed:
https://github.com/doctrine/dbal/pull/285





[DCOM-204] AnnotationDriver cannot find classes inside Phar files Created: 25/Jun/13  Updated: 03/Feb/14  Resolved: 03/Feb/14

Status: Resolved
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.3
Fix Version/s: 2.4.2

Type: Bug Priority: Major
Reporter: Johan Groth Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

If an application is packaged inside a Phar file, the annotation driver cannot find any classes. The problem is in the method AnnotationDriver::getAllClassNames()

AnnotationDriver.php
 
foreach ($iterator as $file) {
    $sourceFile = realpath($file[0]);

    require_once $sourceFile;

    $includedFiles[] = $sourceFile;
}

$iterator will hold all paths to the files found, however realpath() will return false since the files are inside a phar file.

I have solved this locally in my application with the following, however I'm not sure if this is the right approach to solve the problem.

AnnotationDriver.php
$sourceFile = str_replace('\\', '/', $file[0]);
if (!preg_match('#^phar://#i', $sourceFile)) {
    $sourceFile = realpath($sourceFile);
}





[DCOM-201] [GH-284] Adding failing test demonstrating DCOM-175 Created: 19/Jun/13  Updated: 30/Jul/13  Resolved: 19/Jun/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/284

Message:

Private properties of parent classes are not serialized correctly, therefore PHP throws a notice during serialization



 Comments   
Comment by Marco Pivetta [ 19/Jun/13 ]

Duplicate of DCOM-175

Comment by Doctrine Bot [ 30/Jul/13 ]

A related Github Pull-Request [GH-284] was closed:
https://github.com/doctrine/common/pull/284





[DCOM-200] [GH-283] Add a test on the ReflexionClass to call implementsInterface on an interface Created: 18/Jun/13  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Incomplete Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of manuquentin:

Url: https://github.com/doctrine/common/pull/283

Message:



 Comments   
Comment by Doctrine Bot [ 03/Dec/13 ]

A related Github Pull-Request [GH-283] was closed:
https://github.com/doctrine/common/pull/283





[DCOM-199] [GH-282] Fixing failing test Created: 11/Jun/13  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of nonlux:

Url: https://github.com/doctrine/common/pull/282

Message:

This fix https://github.com/doctrine/common/commit/a111f1c18d833d4c7a12a3ea059a022f5363e188 for 2.2 branch



 Comments   
Comment by Doctrine Bot [ 18/Aug/13 ]

A related Github Pull-Request [GH-282] was closed:
https://github.com/doctrine/common/pull/282





[DCOM-195] [GH-277] graceful classloader Created: 04/Jun/13  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Tim-Erwin:

Url: https://github.com/doctrine/common/pull/277

Message:

Right now if the Doctrine class loader is asked to load a class that it is actually not responsible for (because my class loader is later in the list) it fails with a fatal error. This patch only requires a file if it exists. Other class loaders in the list can still try to load the class.



 Comments   
Comment by Doctrine Bot [ 20/Aug/13 ]

A related Github Pull-Request [GH-277] was closed:
https://github.com/doctrine/common/pull/277





[DCOM-193] [GH-275] Improve code to throw exception getting parents class instead of php warning Created: 09/May/13  Updated: 09/May/13  Resolved: 09/May/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of entering:

Url: https://github.com/doctrine/common/pull/275

Message:

Related to https://github.com/doctrine/common/pull/274



 Comments   
Comment by Doctrine Bot [ 09/May/13 ]

A related Github Pull-Request [GH-275] was closed:
https://github.com/doctrine/common/pull/275





[DCOM-190] [GH-273] Added visibility in the methods Interfaces Created: 06/May/13  Updated: 08/Sep/13  Resolved: 21/May/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of ramonornela:

Url: https://github.com/doctrine/common/pull/273

Message:

This adjustment aims to bring to the default PSR2.
I see more alerts and warnings this is only a part.

Thanks,
Ramon



 Comments   
Comment by Doctrine Bot [ 21/May/13 ]

A related Github Pull-Request [GH-273] was closed:
https://github.com/doctrine/common/pull/273

Comment by Marco Pivetta [ 21/May/13 ]

merged





[DCOM-188] [GH-272] MappingDriverChain: the default driver wasn't called for getAllClassNames() Created: 16/Apr/13  Updated: 08/Sep/13  Resolved: 16/Apr/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of mnapoli:

Url: https://github.com/doctrine/common/pull/272

Message:

`MappingDriverChain::getAllClassNames()` would call and merge sub-drivers `getAllClassNames()` results, but not for the default driver.

I added a test that reproduced the problem, and then fixed it.



 Comments   
Comment by Doctrine Bot [ 16/Apr/13 ]

A related Github Pull-Request [GH-272] was closed:
https://github.com/doctrine/common/pull/272

Comment by Marco Pivetta [ 16/Apr/13 ]

Merged





[DCOM-186] [GH-269] ProxyGenerator eval() proxy code when $autoGenerate is true Created: 28/Mar/13  Updated: 25/Aug/13  Resolved: 25/Aug/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of mnapoli:

Url: https://github.com/doctrine/common/pull/269

Message:

ProxyGenerator eval() proxy code instead of writing it to disk when $autoGenerate is true.

Related to DDC-2210(http://www.doctrine-project.org/jira/browse/DDC-2210)

The idea of eval() the proxy code was suggested by @ocramius in response to the fact that in dev environment, concurrent file writes create errors.

This would also simplify the setup for a dev environment: no more proxy directory to create and make writeable.



 Comments   
Comment by Doctrine Bot [ 20/Aug/13 ]

A related Github Pull-Request [GH-269] was closed:
https://github.com/doctrine/common/pull/269

Comment by Marco Pivetta [ 25/Aug/13 ]

Will be handled in DDC-2597 instead





[DCOM-187] [GH-270] Allow empty arrays in annotations Created: 29/Mar/13  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of kitsunet:

Url: https://github.com/doctrine/common/pull/270

Message:

an empty array so far is impossible as it either results in a parse error if you just do the obvious {} or if you try

{""}

it will create an empty entry which in turn will cause errors depending on the annotation.



 Comments   
Comment by Doctrine Bot [ 20/Aug/13 ]

A related Github Pull-Request [GH-270] was closed:
https://github.com/doctrine/common/pull/270

Comment by Marco Pivetta [ 03/Dec/13 ]

Won't be fixed in 2.3 - master already has the fix in doctrine/annotations





[DCOM-183] [GH-262] Fixed travis build Created: 11/Mar/13  Updated: 08/Sep/13  Resolved: 11/Mar/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3, 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of pborreli:

Url: https://github.com/doctrine/common/pull/262

Message:

since composer/composer#1005 composer updates --dev by default.



 Comments   
Comment by Benjamin Eberlei [ 11/Mar/13 ]

A related Github Pull-Request [GH-262] was closed
https://github.com/doctrine/common/pull/262





[DCOM-182] [GH-261] Fixed typos Created: 11/Mar/13  Updated: 08/Sep/13  Resolved: 11/Mar/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of pborreli:

Url: https://github.com/doctrine/common/pull/261

Message:



 Comments   
Comment by Benjamin Eberlei [ 11/Mar/13 ]

A related Github Pull-Request [GH-261] was opened
https://github.com/doctrine/common/pull/261

Comment by Benjamin Eberlei [ 11/Mar/13 ]

A related Github Pull-Request [GH-261] was closed
https://github.com/doctrine/common/pull/261





[DCOM-181] [GH-260] Hotfix/issue #259 Created: 07/Mar/13  Updated: 08/Sep/13  Resolved: 08/Mar/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/260

Message:

Hotfix for doctrine/common#259



 Comments   
Comment by Benjamin Eberlei [ 07/Mar/13 ]

A related Github Pull-Request [GH-260] was closed
https://github.com/doctrine/common/pull/260





[DCOM-172] [GH-254] Update lib/Doctrine/Common/Proxy/ProxyGenerator.php Created: 18/Feb/13  Updated: 08/Sep/13  Resolved: 19/Feb/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of mmarksnippety:

Url: https://github.com/doctrine/common/pull/254

Message:

Added missed semicolon



 Comments   
Comment by Benjamin Eberlei [ 18/Feb/13 ]

A related Github Pull-Request [GH-254] was opened
https://github.com/doctrine/common/pull/254

Comment by Benjamin Eberlei [ 18/Feb/13 ]

A related Github Pull-Request [GH-254] was closed
https://github.com/doctrine/common/pull/254

Comment by Marco Pivetta [ 19/Feb/13 ]

Continuing in DCOM-173

Comment by Benjamin Eberlei [ 19/Feb/13 ]

A related Github Pull-Request [GH-255] was closed
https://github.com/doctrine/common/pull/255





[DCOM-171] [GH-253] Proxy Generation Bug Created: 16/Feb/13  Updated: 08/Sep/13  Resolved: 16/Feb/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of odiaseo:

Url: https://github.com/doctrine/common/pull/253

Message:

Added missing semi colon and removed backslashes previously used to escape function arguments



 Comments   
Comment by Benjamin Eberlei [ 16/Feb/13 ]

A related Github Pull-Request [GH-253] was closed
https://github.com/doctrine/common/pull/253





[DCOM-170] [GH-250] Adding export attributes Created: 27/Jan/13  Updated: 16/Apr/13  Resolved: 16/Apr/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/250

Message:



 Comments   
Comment by Doctrine Bot [ 16/Apr/13 ]

A related Github Pull-Request [GH-250] was closed:
https://github.com/doctrine/common/pull/250

Comment by Marco Pivetta [ 16/Apr/13 ]

No good positive feedback - no need to force it in





[DCOM-167] [GH-248] Hotfix/doctrine/common#247 fixes Created: 26/Jan/13  Updated: 21/Dec/13  Resolved: 26/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/248

Message:

Includes fixes suggested for #247 (plus a weird fix on a failure with `array_map` on PHP <5.4)



 Comments   
Comment by Benjamin Eberlei [ 26/Jan/13 ]

A related Github Pull-Request [GH-248] was closed
https://github.com/doctrine/common/pull/248

Comment by Doctrine Bot [ 21/Dec/13 ]

A related Github Pull-Request [GH-248] was closed:
https://github.com/doctrine/dbal/pull/248





[DCOM-169] [GH-249] Namespaced the PR246 test case Created: 27/Jan/13  Updated: 08/Sep/13  Resolved: 29/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/common/pull/249

Message:

Sorry, I've forgot the namespace in the test case of my previous PR, which has just been merged.



 Comments   
Comment by Benjamin Eberlei [ 29/Jan/13 ]

A related Github Pull-Request [GH-249] was closed
https://github.com/doctrine/common/pull/249





[DCOM-166] [GH-246] Undefined variable fix Created: 25/Jan/13  Updated: 08/Sep/13  Resolved: 26/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/common/pull/246

Message:



 Comments   
Comment by Benjamin Eberlei [ 26/Jan/13 ]

A related Github Pull-Request [GH-246] was closed
https://github.com/doctrine/common/pull/246





[DCOM-163] [GH-245] Documentation fixes Created: 20/Jan/13  Updated: 11/Feb/14  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of BenMorel:

Url: https://github.com/doctrine/common/pull/245

Message:

Documentation fixes, continuing the work done on [ORM](https://github.com/doctrine/doctrine2/pull/528) and [DBAL](https://github.com/doctrine/dbal/pull/243).

  • Missing docblocks
  • Missing / incorrect `@param` / `@return` / `@throws` annotations
  • Missing newlines between annotations
  • Incorrect vertical alignment of `@param` annotations
  • Incorrect doctrine-project.org links
  • SVN leftovers cleanup
  • Licensing (LGPL => MIT)


 Comments   
Comment by Doctrine Bot [ 21/Jun/13 ]

A related Github Pull-Request [GH-245] was closed:
https://github.com/doctrine/common/pull/245

Comment by Doctrine Bot [ 21/Jun/13 ]

A related Github Pull-Request [GH-243] was closed:
https://github.com/doctrine/dbal/pull/243

Comment by Marco Pivetta [ 03/Dec/13 ]

Merged: https://github.com/doctrine/common/commit/c4255b9fbd63ee1fe52697839318af5937fced9b

Comment by Doctrine Bot [ 23/Dec/13 ]

A related Github Pull-Request [GH-243] was closed:
https://github.com/doctrine/common/pull/243

Comment by Doctrine Bot [ 11/Feb/14 ]

A related Github Pull-Request [GH-245] was closed:
https://github.com/doctrine/dbal/pull/245





[DCOM-162] [GH-244] return parameter for debug method Created: 14/Jan/13  Updated: 05/Dec/13  Resolved: 05/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.0

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of sethunath:

Url: https://github.com/doctrine/common/pull/244

Message:

Added $return as 4th parameter to specify whether to return the debug text or print it. It works similar to print_r function



 Comments   
Comment by Doctrine Bot [ 03/Dec/13 ]

A related Github Pull-Request [GH-244] was closed:
https://github.com/doctrine/common/pull/244

Comment by Marco Pivetta [ 05/Dec/13 ]

Merged: https://github.com/doctrine/common/commit/ba2ad8a7db24adb37a33ff52ee64b02d59ccfee0





[DCOM-159] [GH-241] Minor performance optimization for lookups of `ArrayCollection#contains()` Created: 08/Jan/13  Updated: 08/Sep/13  Resolved: 08/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/241

Message:



 Comments   
Comment by Benjamin Eberlei [ 08/Jan/13 ]

A related Github Pull-Request [GH-241] was closed
https://github.com/doctrine/common/pull/241





[DCOM-158] [GH-240] [Cache/CouchbaseCache] Return false instead of null for compat. Created: 07/Jan/13  Updated: 08/Sep/13  Resolved: 07/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of daschl:

Url: https://github.com/doctrine/common/pull/240

Message:

This changeset fixes and verifies that instead of null, false is returned
from the fetch method. This fixes a bug which causes CouchbaseCache not
to work in combination with the ORM library. Test added.



 Comments   
Comment by Benjamin Eberlei [ 07/Jan/13 ]

A related Github Pull-Request [GH-240] was closed
https://github.com/doctrine/common/pull/240





[DCOM-157] [GH-239] Update lib/Doctrine/Common/Cache/Cache.php Created: 06/Jan/13  Updated: 20/Dec/13  Resolved: 06/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of lmammino:

Url: https://github.com/doctrine/common/pull/239

Message:

Typo in interface documentation



 Comments   
Comment by Benjamin Eberlei [ 06/Jan/13 ]

A related Github Pull-Request [GH-239] was closed
https://github.com/doctrine/common/pull/239

Comment by Doctrine Bot [ 20/Dec/13 ]

A related Github Pull-Request [GH-239] was closed:
https://github.com/doctrine/dbal/pull/239





[DCOM-155] [GH-237] Update tests/Doctrine/Tests/Common/Annotations/Fixtures/NamespaceWithClo... Created: 03/Jan/13  Updated: 08/Sep/13  Resolved: 10/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of vincequeiroz:

Url: https://github.com/doctrine/common/pull/237

Message:

...sureDeclaration.php

Statement duplicate

$var = 1;
function () use ($var) {};



 Comments   
Comment by Benjamin Eberlei [ 10/Jan/13 ]

A related Github Pull-Request [GH-237] was closed
https://github.com/doctrine/common/pull/237





[DCOM-154] [GH-236] Adding Support for Couchbase as Caching Infrastructure. Created: 20/Dec/12  Updated: 06/Jan/13  Resolved: 06/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of daschl:

Url: https://github.com/doctrine/common/pull/236

Message:

This changeset brings in support for Couchbase Server 2.0 as
the caching layer. The interface is identical to the memcached
one, but using ext/couchbase allows to take advantage of the
automatic cluster discovery and failover functionality provided.






[DCOM-153] [GH-235] Improve performance of if key exists in the array Created: 17/Dec/12  Updated: 08/Sep/13  Resolved: 18/Dec/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of basico:

Url: https://github.com/doctrine/common/pull/235

Message:

So, here are few indications:
http://php.net/manual/en/function.array-key-exists.php#107786
http://php.net/manual/en/function.array-key-exists.php#104474



 Comments   
Comment by Benjamin Eberlei [ 18/Dec/12 ]

A related Github Pull-Request [GH-235] was closed
https://github.com/doctrine/common/pull/235





[DCOM-149] [GH-231] Fixing CS Created: 04/Dec/12  Updated: 08/Sep/13  Resolved: 14/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of ruian:

Url: https://github.com/doctrine/common/pull/231

Message:



 Comments   
Comment by Benjamin Eberlei [ 04/Dec/12 ]

A related Github Pull-Request [GH-231] was closed
https://github.com/doctrine/common/pull/231





[DCOM-148] [GH-229] Decorator base class for object manager decorators Created: 25/Nov/12  Updated: 20/Jan/13  Resolved: 20/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of lstrojny:

Url: https://github.com/doctrine/common/pull/229

Message:

As discussed on IRC, the first PR for decorator base classes. This time for ObjectManager.






[DCOM-147] [GH-227] [DDC-2160] Smart Pluralize/Singularize support for Doctrine/Common/Util/Inflector Created: 23/Nov/12  Updated: 08/Sep/13  Resolved: 14/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of jbergler:

Url: https://github.com/doctrine/common/pull/227

Message:

Doctrine/ORM/Tools/EntityGenerator should pluralize/signularize correctly.

This PR adds functionality to Doctrine/Common/Util/Inflector to singularize/pluralize. The code is largely borrowed from a similar class in the CakePHP project - I'm not sure if the updates to the class doc covers the requirements for this.

Test coverage also added.






[DCOM-146] [GH-226] Added error suppression to unlink() calls Created: 22/Nov/12  Updated: 08/Sep/13  Resolved: 22/Nov/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 1
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of SalmanPK:

Url: https://github.com/doctrine/common/pull/226

Message:

Added error suppression to unlink() calls in the getPropertyAnnotations and getMethodAnnotations methods to be consistent with the getClassAnnotations method.



 Comments   
Comment by Benjamin Eberlei [ 22/Nov/12 ]

A related Github Pull-Request [GH-226] was closed
https://github.com/doctrine/common/pull/226

Comment by Fabio B. Silva [ 22/Nov/12 ]

Merged : https://github.com/doctrine/common/commit/a836c86c13e964051549e234250cf665a5f5a190





[DCOM-145] [GH-225] Replace file_exists() calls with is_file() where it is needed Created: 20/Nov/12  Updated: 08/Sep/13  Resolved: 21/Nov/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of fruit:

Url: https://github.com/doctrine/common/pull/225

Message:

The function `file_exists()` checks whether file or directory exists. And `is_file()` checks only files for the existence. All places, where `file_exists()` is replaced with `is_file()` needs only to check for file existence.



 Comments   
Comment by Benjamin Eberlei [ 20/Nov/12 ]

A related Github Pull-Request [GH-225] was closed
https://github.com/doctrine/common/pull/225





[DCOM-142] [GH-222] make Base LifecycleEventArgs usable in orm and odm Created: 19/Nov/12  Updated: 08/Sep/13  Resolved: 05/Dec/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of docteurklein:

Url: https://github.com/doctrine/common/pull/222

Message:

Pull requests are to come for both orm and odm to make use of this.

The main goal is to make more abstract listeners, compatible with both orm and odm.



 Comments   
Comment by Florian Klein [ 05/Dec/12 ]

@Benjamin Eberlei, any news on this ?





[DCOM-144] [GH-224] Use preg_quote() to escape text before inserting into regexp Created: 20/Nov/12  Updated: 08/Sep/13  Resolved: 21/Nov/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of fruit:

Url: https://github.com/doctrine/common/pull/224

Message:

PHP has build-in function `preg_quote()` in order to escape strings witch are dynamically inserted into regular expression.



 Comments   
Comment by Benjamin Eberlei [ 21/Nov/12 ]

A related Github Pull-Request [GH-224] was closed
https://github.com/doctrine/common/pull/224





[DCOM-143] [GH-223] Fix for DCOM-106 Created: 20/Nov/12  Updated: 08/Sep/13  Resolved: 21/Nov/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of nemekzg:

Url: https://github.com/doctrine/common/pull/223

Message:

Both fixme and TODO become ignored.



 Comments   
Comment by Benjamin Eberlei [ 20/Nov/12 ]

A related Github Pull-Request [GH-223] was closed
https://github.com/doctrine/common/pull/223





[DCOM-141] [GH-221] strip invalid characters Created: 17/Nov/12  Updated: 08/Sep/13  Resolved: 14/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of FabioBatSilva:

Url: https://github.com/doctrine/common/pull/221

Message:

This patch is proposal to fix #180
by replace invalid characters and hashing the filename as sub directories to create a unique path.






[DCOM-138] [GH-219] BC breaking constant name fix Created: 16/Nov/12  Updated: 20/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of jakoch:

Url: https://github.com/doctrine/common/pull/219

Message:

fixed typo on constant name (STATS_MEMORY_AVAILIABLE => STATS_MEMORY_AVAILABLE)



 Comments   
Comment by Doctrine Bot [ 03/Dec/13 ]

A related Github Pull-Request [GH-219] was closed:
https://github.com/doctrine/common/pull/219

Comment by Marco Pivetta [ 03/Dec/13 ]

Merged - see https://github.com/doctrine/cache/commit/eec7544f6788dc28b2b8f18395c273bb65bfed7c

Comment by Doctrine Bot [ 20/Dec/13 ]

A related Github Pull-Request [GH-219] was closed:
https://github.com/doctrine/dbal/pull/219





[DCOM-136] [GH-216] Adding failing test for silent autoloaders Created: 15/Nov/12  Updated: 08/Sep/13  Resolved: 10/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/216

Message:

Fixing support for silent autoloaders






[DCOM-133] [GH-212] Issue/gh #135 Created: 09/Nov/12  Updated: 08/Sep/13  Resolved: 08/Sep/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/common/pull/212

Message:

Fixes #135



 Comments   
Comment by Benjamin Eberlei [ 09/Nov/12 ]

A related Github Pull-Request [GH-212] was closed
https://github.com/doctrine/common/pull/212





[DCOM-131] [GH-210] MappingDriverChain::getAllClassNames should load all classes from the defaultDriver Created: 27/Oct/12  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Duplicate Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of rnijveld:

Url: https://github.com/doctrine/common/pull/210

Message:

I actually tried working around this by adding a driver using an empty string as the namespace, only to find out that `strpos()` doesn't accept an empty delimiter.

Anyway, this makes sure that all loadable classes for the defaultDriver are actually returned by MappingDriverChain as well.



 Comments   
Comment by Doctrine Bot [ 03/Dec/13 ]

A related Github Pull-Request [GH-210] was closed:
https://github.com/doctrine/common/pull/210

Comment by Marco Pivetta [ 03/Dec/13 ]

Already solved in 2.4 at https://github.com/doctrine/common/commit/f7cdf27f04c27ce02e2c14a18ff9064cc37f7284





[DCOM-125] [GH-204] Bad function call in Debug::toString() Created: 17/Oct/12  Updated: 22/Dec/13  Resolved: 14/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of touki653:

Url: https://github.com/doctrine/common/pull/204

Message:

Fixed an (obviously) over used function which were calling [method_exists](http://php.net/method_exists) function the wrong way.

In `Doctrine\Common\Util\Debug::toString($obj)`
From `method_exists('__toString',$obj)`
To `method_exists($obj,'__toString')`



 Comments   
Comment by Benjamin Eberlei [ 17/Oct/12 ]

A related Github Pull-Request [GH-204] was closed
https://github.com/doctrine/common/pull/204

Comment by Doctrine Bot [ 22/Dec/13 ]

A related Github Pull-Request [GH-204] was closed:
https://github.com/doctrine/dbal/pull/204





[DCOM-127] [GH-206] Debug::export ArrayIterator dumps the internal storage variable Created: 19/Oct/12  Updated: 08/Sep/13  Resolved: 14/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Slamdunk:

Url: https://github.com/doctrine/common/pull/206

Message:

Following my previous PR https://github.com/doctrine/common/pull/191 I found also ArrayIterator needs special behaviour.






[DCOM-126] [GH-205] Fixed a typo in PHPdoc Created: 17/Oct/12  Updated: 08/Sep/13  Resolved: 14/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of michaelperrin:

Url: https://github.com/doctrine/common/pull/205

Message:

A unnecessary new line was inserted in ClassLoader.php



 Comments   
Comment by Benjamin Eberlei [ 17/Oct/12 ]

A related Github Pull-Request [GH-205] was closed
https://github.com/doctrine/common/pull/205





[DCOM-122] [GH-200] ClassMetadataFactory child classes can now filter the metadata when calling getAllMetadata Created: 07/Oct/12  Updated: 07/Oct/12  Resolved: 07/Oct/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of theUniC:

Url: https://github.com/doctrine/common/pull/200

Message:

This is due mainly, because we have found performance issues when trying to generate a complete schema (annotation based) from a legacy database with tons of tables with the ConvertMapping command.

This will let filter table names to the ```Doctrine\ORM\Mapping\Driver\DatabaseDriver::getAllClassNames``` and ```Doctrine\ORM\Mapping\Driver\DatabaseDriver::loadMetadataForClass``` methods, and extract class metadata from a smaller subset of classes (I'm doing another PR for this in the ORM repository).



 Comments   
Comment by Benjamin Eberlei [ 07/Oct/12 ]

A related Github Pull-Request [GH-200] was closed
https://github.com/doctrine/common/pull/200





[DCOM-123] [GH-202] Add sqlite cache driver Created: 08/Oct/12  Updated: 23/May/13  Resolved: 23/May/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Incomplete Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Baachi:

Url: https://github.com/doctrine/common/pull/202

Message:



 Comments   
Comment by Doctrine Bot [ 23/May/13 ]

A related Github Pull-Request [GH-202] was closed:
https://github.com/doctrine/common/pull/202





[DCOM-121] [GH-198] [DCOM-118] fix for issue #195 Created: 03/Oct/12  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Marco Pivetta
Resolution: Incomplete Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of pscheit:

Url: https://github.com/doctrine/common/pull/198

Message:

I'm sorry, i have no idea why i got here now 23 commits .. i tried but no success.



 Comments   
Comment by Doctrine Bot [ 03/Dec/13 ]

A related Github Pull-Request [GH-198] was closed:
https://github.com/doctrine/common/pull/198

Comment by Marco Pivetta [ 03/Dec/13 ]

Ported to https://github.com/doctrine/annotations/pull/17





[DCOM-120] [GH-197] Avoid a critical error when parsed class is not found Created: 03/Oct/12  Updated: 08/Sep/13  Resolved: 08/Sep/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of alphalemon:

Url: https://github.com/doctrine/common/pull/197

Message:

Found a bug that returns a critical error when parsed class is not found. The new test explains exactly the situation found.

This issue was found running this test suite: https://github.com/alphalemon/AlphaLemonCmsBundle, running the following test; phpunit Tests/Functional/Controller/SecuryControllerTest.php



 Comments   
Comment by Benjamin Eberlei [ 07/Oct/12 ]

A related Github Pull-Request [GH-197] was closed
https://github.com/doctrine/common/pull/197





[DCOM-116] [GH-193] Optimize autoload prefix in composer.json Created: 28/Sep/12  Updated: 08/Sep/13  Resolved: 14/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Slamdunk:

Url: https://github.com/doctrine/common/pull/193

Message:

By having more specific autoload prefixes it is possible to reduce the number of stat calls made.



 Comments   
Comment by Benjamin Eberlei [ 28/Sep/12 ]

A related Github Pull-Request [GH-193] was closed
https://github.com/doctrine/common/pull/193





[DCOM-115] [GH-191] Debug::export ArrayObject dumps the internal storage variable Created: 27/Sep/12  Updated: 20/Dec/13  Resolved: 01/Oct/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of Slamdunk:

Url: https://github.com/doctrine/common/pull/191

Message:

Until now, exporting `ArrayObject` hid the internal storage variable, but `print_r` and `var_dump` show it.

With this PR the `ArrayObject::storage` variable is exported too.



 Comments   
Comment by Benjamin Eberlei [ 01/Oct/12 ]

A related Github Pull-Request [GH-191] was closed
https://github.com/doctrine/common/pull/191

Comment by Doctrine Bot [ 20/Dec/13 ]

A related Github Pull-Request [GH-191] was closed:
https://github.com/doctrine/dbal/pull/191





[DCOM-102] Updates for Fedora packaging Created: 07/Jul/12  Updated: 28/Dec/13  Resolved: 28/Dec/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.3
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Shawn Iwinski Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

PEAR, Fedora, RHEL


Issue Links:
Reference
relates to DBAL-300 Updates for Fedora packaging Resolved
is referenced by DDC-1913 Updates for Fedora packaging Resolved

 Description   

I am packaging the DoctrineDBAL PEAR package for Fedora and would like to have the following updates:

  • package.xml role for LICENSE changed from "data" to "doc"


 Comments   
Comment by Steve Müller [ 28/Dec/13 ]

See DBAL-300





[DCOM-101] Implement FilesystemCache Created: 08/Jun/12  Updated: 25/Jun/12  Resolved: 25/Jun/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3

Type: New Feature Priority: Major
Reporter: Guilherme Blanco Assignee: Fabio B. Silva
Resolution: Fixed Votes: 0
Labels: None


 Description   

Implement FilesystemCache, storing var exported pieces that could be loaded on demand.



 Comments   
Comment by Fabio B. Silva [ 25/Jun/12 ]

Fixed By : https://github.com/doctrine/common/commit/8df9cdf3b921a3b59bbba51d5ba9063509ef6a1a





[DCOM-98] Fix bug with memcache/memcached and 0 as expire Created: 30/Mar/12  Updated: 30/Mar/12  Resolved: 30/Mar/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2.2

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None





[DCOM-175] Proxies return private properties in __sleep, which is not supported by PHP. Created: 27/Mar/12  Updated: 02/Dec/13  Resolved: 30/Jul/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.4
Fix Version/s: 2.5.0

Type: Bug Priority: Major
Reporter: Ryan Mauger Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None

Sub-Tasks:
Key
Summary
Type
Status
Assignee
DCOM-221 Merge DCOM-175 into 2.4 Sub-task Resolved Guilherme Blanco  

 Description   

__sleep should not return private parent property names (see http://php.net/__sleep) this raises notices, and also results in the value of the property being 'N' (null) instead of keeping its value.

I am unfortunately stuck having to serialize proxies in my revision tracking, as doctrine seems to be currently ignoring the fetch="EAGER" I set on the related properties.

Proxies should use the Serializable interface, and not __sleep, or not return parent property names which are private, it serves no purpose, and is not supported by PHP itself anyway.

Also, if you keep __sleep, but do not return the parent property names, then it will only include the items you return, so it would be better to simply drop the __sleep method, I cannot actually see any useful purpose it serves.



 Comments   
Comment by Ryan Mauger [ 27/Mar/12 ]

just updated the issue body, realised that I worded something badly.

Comment by Marco Pivetta [ 23/Jan/13 ]

Ryan Mauger I think that's a limitation we have. We use `__sleep` to avoid serializing fields like the initializers and the persisters of course.

Even by implementing serializable, it would only work if the end user implemented it in the parent class.

Tempted to mark it as "can't fix"

Comment by Marco Pivetta [ 24/Jan/13 ]

I think there's a solution by having something like following:

class SomeGeneratedProxyName extends RealName implements \Serializable
{
    public function unserialize($data)
    {
        $reflectionClass = new ReflectionClass($this);
        foreach ($reflectionClass->getProperties(ReflectionProperty::IS_PRIVATE) as $privateProp) {
            $privateProp->setAccessible(true);
            $privateProp->setValue($this, $data[$privateProp->getName()]);
        }
        // ... other props ...
    }

    public function serialize()
    {
        $data = array();
        $reflectionClass = new ReflectionClass($this);
        foreach ($reflectionClass->getProperties(ReflectionProperty::IS_PRIVATE) as $privateProp) {
            $privateProp->setAccessible(true);
            $data[$privateProp->getName()] = $privateProp->getValue($this);
        }
        // ... other props ...
        return $data;
    }
}
Comment by Marco Pivetta [ 23/Feb/13 ]

Ryan Mauger I started implementing this one at https://github.com/Ocramius/common/compare/hotfix;DCOM-175 and so far it looks promising.

The only doubts so far are with handling cases like following:

class MyEntity implements Serializable
{
    public function serialize()
    {
        // [...]
    }

    public function unserialize($serialized)
    {
        // [...]
    }

    public function __sleep()
    {
        // [...]
    }

    public function __wakeup()
    {
        // [...]
    }
}

So far I didn't get to write tests that demonstrate the exact behaviour for this case, but it looks like when `Serializable` is implemented, `_sleep` and `_wakeup` are ignored. Any thoughts on this?

Comment by Marco Pivetta [ 19/Apr/13 ]

A possible solution is to use something like http://eval.in/16806, and thus exploiting the ability of php to retrieve an object's private properties by using the special

chr(0) . 'Foo' . chr(0) . 'bar'

trick.

This can be abstracted by using

array_keys((array) $object);

, which retrieves also those special keys

Comment by Marco Pivetta [ 19/Jun/13 ]

Provided a fix at https://github.com/doctrine/common/pull/284

Comment by Marco Pivetta [ 30/Jul/13 ]

Solved at https://github.com/doctrine/common/commit/9c6b8615a988117dec83bdbb0fad80afef23eab8





[DCOM-96] Extract a common ProxyFactory Created: 12/Feb/12  Updated: 10/Jan/13  Resolved: 10/Jan/13

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4

Type: New Feature Priority: Major
Reporter: Christophe Coevoet Assignee: Marco Pivetta
Resolution: Fixed Votes: 1
Labels: None


 Description   

Currently, each Doctrine project implements its own ProxyFactory. But the most part of the logic is simply copy-pasted from the ORM implementation (or from an older version of the ORM implementation). Extracting the common code would be a good idea to avoid having to maintain 4 places (or even more) containing the same logic



 Comments   
Comment by Marco Pivetta [ 22/Oct/12 ]

I have a working implementation of public properties lazy loading at https://github.com/Ocramius/doctrine2/compare/master...DCOM-96-restarted

I am still trying to figure out performance issues, since this PR adds 5% overhead on top of Hydrators/Persisters/UnitOfWork, since it turned out that

$reflectionProperty->getValue($object);

actually triggers PHP's magic __get method.
I've worked this around by assuming nulls when values are not set, but this adds some conditionals that obviously slow down all the extraction of values process.





[DCOM-93] Add Reflection Abstraction Created: 28/Dec/11  Updated: 03/Jan/12  Resolved: 02/Jan/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2

Type: New Feature Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Reference
is referenced by DDC-1577 Remove static Reflection dependency f... Resolved

 Description   

The Reflection code in ClassMetadata(Info*)s is getting out of control.

I want to remove the dependency by introducing a ReflectionService interface:

interface ReflectionService
{
    public function getClassShortName($class);
    public function getClassNamespace($class);
    public function getClass($class);
    public function getAccessibleProperty($class, $property);
    public function hasPublicMethod($class, $method);
}

The reflection methods are specifically allowed to return NULL, so that we can create a StaticReflectionService that works without the classes actually existing.



 Comments   
Comment by Benjamin Eberlei [ 28/Dec/11 ]

This issue is referenced in Github Pull-Request GH-89
https://github.com/doctrine/common/pull/89

Comment by Benjamin Eberlei [ 29/Dec/11 ]

Related Pull Request was closed: https://github.com/doctrine/common/pull/89

Comment by Benjamin Eberlei [ 02/Jan/12 ]

Implemented





[DCOM-91] GH-87: typos Created: 23/Dec/11  Updated: 16/Jan/12  Resolved: 16/Jan/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

Pull-Request was automatically synchronized: https://github.com/doctrine/common/pull/87



 Comments   
Comment by Guilherme Blanco [ 16/Jan/12 ]

Fixed as per PR resolution





[DCOM-90] GH-86: class_exists is great, use it. Created: 21/Dec/11  Updated: 16/Jan/12  Resolved: 16/Jan/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Invalid Votes: 0
Labels: None


 Description   

Pull-Request was automatically synchronized: https://github.com/doctrine/common/pull/86



 Comments   
Comment by Guilherme Blanco [ 16/Jan/12 ]

As per PR's resolution





[DCOM-89] GH-85: php annotations Created: 15/Dec/11  Updated: 09/Jun/12  Resolved: 09/Jun/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

Pull-Request was automatically synchronized: https://github.com/doctrine/common/pull/85

Hello all,

This patch add support for php annotations, I think that is very useful to collect class metadata.
This patch support just 3 annotations ```@var, @param, @return```. but any annotation could be added.

@schmittjoh can you take a look please ?

Any suggestion are welcome.

Thanks



 Comments   
Comment by Guilherme Blanco [ 09/Jun/12 ]

Synchronizing with PR. It was closed.





[DCOM-88] GH-84: Fixed phpdoc for the persistence interfaces Created: 13/Dec/11  Updated: 16/Jan/12  Resolved: 16/Jan/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

Pull-Request was automatically synchronized: https://github.com/doctrine/common/pull/84



 Comments   
Comment by Guilherme Blanco [ 16/Jan/12 ]

Fixed since https://github.com/doctrine/common/commit/52c3882633b3cf11a694f2e8d9aaacb449bf5c6c





[DCOM-87] Add a method to retrieve the identifier values in the Common interfaces Created: 12/Dec/11  Updated: 02/Jan/12  Resolved: 02/Jan/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Christophe Coevoet Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Currently, https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php is tied to the ORM, forcing bundle integrating other Doctrine projects to reimplement it.

The only place which is not (or cannot be) implemented using only methods from the Common interfaces is retrieving the current id. `getIdentifierValues` is now implemented by the ClassMetadata in all ORM, MongoDB and CouchDB but not in the interface.

Note that the tricky point about adding it is the fact that the DisconnectedMetadataFactory (used when generating entities) returns a ClassMetadataInfo instead, which does not contain this method (as it relies on the existence of the class) but implements the interface.



 Comments   
Comment by Benjamin Eberlei [ 02/Jan/12 ]

This was implemented





[DCOM-85] GH-81: Add Proxy#__load() Created: 03/Dec/11  Updated: 12/Dec/11  Resolved: 12/Dec/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Pull-Request was automatically synchronized: https://github.com/doctrine/common/pull/81



 Comments   
Comment by Benjamin Eberlei [ 12/Dec/11 ]

Implemented in https://github.com/doctrine/common/pull/83





[DCOM-82] Fix composer.json in 2.1.x releases missing autoloader Created: 26/Nov/11  Updated: 26/Nov/11  Resolved: 26/Nov/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.1.3
Fix Version/s: 2.1.4

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None





[DCOM-81] Attempt to create Annotation File Cache directory Created: 23/Nov/11  Updated: 23/Nov/11  Resolved: 23/Nov/11

Status: Resolved
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Fabio B. Silva
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by Fabio B. Silva [ 23/Nov/11 ]

Fixed : https://github.com/doctrine/common/pull/77





[DCOM-78] ZendDataCache, Can't use method return value in write context Created: 19/Nov/11  Updated: 19/Nov/11  Resolved: 19/Nov/11

Status: Resolved
Project: Doctrine Common
Component/s: Caching
Affects Version/s: 2.2
Fix Version/s: 2.2

Type: Bug Priority: Major
Reporter: Matti Niemelä Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

On line 70, empty($this->getNamespace()).

empty() works only with variables so you need to assign the namespace to something before using empty().

Fatal error: Can't use method return value in write context in Doctrine/Common/Cache/ZendDataCache.php on line 70



 Comments   
Comment by Benjamin Eberlei [ 19/Nov/11 ]

Fixed





[DCOM-79] Move Lifecycle Events into Doctrine\Common\Persistence\Events Created: 19/Nov/11  Updated: 12/Dec/11  Resolved: 12/Dec/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by Benjamin Eberlei [ 12/Dec/11 ]

Implemented in 29dbb7070058c8e7bb81bc5f9ef79d877b058887





[DCOM-76] switch license to MIT Created: 09/Nov/11  Updated: 09/Jun/12  Resolved: 09/Jun/12

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Lukas Kahwe Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

since common was mostly written by a small group of people and not based on Doctrine 1.x it seems possible to switch the license which imho would really boost the use cases.



 Comments   
Comment by Guilherme Blanco [ 09/Jun/12 ]

Successfully migrated to MIT!!! \o/





[DCOM-70] [CacheProvider] missing functions Created: 27/Sep/11  Updated: 06/Mar/12  Resolved: 03/Oct/11

Status: Resolved
Project: Doctrine Common
Component/s: Caching
Affects Version/s: 2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jérôme Forêt Assignee: Guilherme Blanco
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Why delete functions in CacheProvider like deleteByPrefix deleteByPostfix deleteByRegex ?
DeleteAll and FlushAll do not replace them. Please revert for these functions.



 Comments   
Comment by Guilherme Blanco [ 03/Oct/11 ]

The deleteBy*() aswell as getIds() methods cannot be brought back.
Some drivers do not support the getIds(), because (and I agree with) they consider the keys retrieval as a security issue.

Since we keep the Least Common Multiple (LCM) in our Cache platform, these drivers started to be affected in latest *NIX releases (like for example, Memcache 1.6.5+ that does not bring cachedump anymore).

We started to have many reports here because cache was not working, or they were not clearing or even they were getting partially cleared. So we re-worked on Cache package to bring the LCM again.

Based on that, individual drivers like APC may still support the cache Id retrieval, but our approach differed and we can't bring this back. You may override into your own driver (composition) extending our ApcCache and implemented your desired functions.

Marking the ticket as won't fix.

Cheers,

Comment by Peter Mitchell [ 06/Mar/12 ]

The documentation still refers to these deprecated elements which is a little confusing as there is no indication of this in the Abstract Classes/Interfaces

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html





[DCOM-68] Add @codeCoverageIgnoreStart and @codeCoverageIgnoreEnd to annotation ignore map Created: 25/Sep/11  Updated: 25/Sep/11  Resolved: 25/Sep/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.1.1
Fix Version/s: 2.1.2

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by Benjamin Eberlei [ 25/Sep/11 ]

Done





[DCOM-71] Add save get_class() to Debug Util Created: 22/Oct/11  Updated: 23/Oct/11  Resolved: 23/Oct/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by Benjamin Eberlei [ 23/Oct/11 ]

Added.





[DCOM-66] Github-PR-55 by shesek: Use stream_resolve_include_path Created: 25/Aug/11  Updated: 28/Aug/11  Resolved: 28/Aug/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.2

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of

{username}

:

Url: https://github.com/doctrine/common/pull/55

Message:

`Doctrine\Common\ClassLoader::fileExistsInIncludePath` behaves the same as `stream_resolve_include_path`, use that instead when available (PHP >= 5.3.2). It should be faster than doing that manually.



 Comments   
Comment by Guilherme Blanco [ 28/Aug/11 ]

Fixed in trunk.





[DCOM-62] Github-PR-53 by shawndellysse: ArrayCollection#join Created: 21/Aug/11  Updated: 14/Sep/11  Resolved: 14/Sep/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.1.2

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of

{username}

:

Url: https://github.com/doctrine/common/pull/53

Message:

Added the `join` method to `ArrayCollection`.



 Comments   
Comment by Guilherme Blanco [ 14/Sep/11 ]

This can't be easily implemented by ORM because join() would require more than a single delimiter.
Marking ticket as won't fix. If you have a better solution, please reopen the issue with more details about how would you like to achieve it.





[DCOM-60] SimpleAnnotationReader get*Annotations Created: 12/Aug/11  Updated: 28/Aug/11  Resolved: 28/Aug/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ryan Hutchison Assignee: Guilherme Blanco
Resolution: Invalid Votes: 0
Labels: None


 Description   

<br />
<b>Notice</b>: Undefined variable: class in <b>/usr/home/gym/doctrine2-common/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php</b> on line <b>45</b><br />
<br />
<b>Fatal error</b>: Call to a member function getName() on a non-object in <b>/usr/home/gym/doctrine2-common/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php</b> on line <b>45</b><br />

Doctrine/Common/Annotations/SimpleAnnotationReader.php
    public function getMethodAnnotations(\ReflectionMethod $method)
    {
-        return $this->parser->parse($method->getDocComment(), 'method '.$class->getName().'::'.$method->getName().'()');
+        return $this->parser->parse($method->getDocComment(), 'method '.$method->getName().'::'.$method->getName().'()');
    }

    public function getPropertyAnnotations(\ReflectionProperty $property)
    {
-        return $this->parser->parse($property->getDocComment(), 'property '.$class->getName().'::$'.$property->getName());
+        return $this->parser->parse($property->getDocComment(), 'property '.$property->getName().'::$'.$property->getName());
    }


 Comments   
Comment by Guilherme Blanco [ 28/Aug/11 ]

This issue is already fixed in master. Closing the ticket.





[DCOM-57] Doctrine\Common\Cache\AbstractCache::deleteAll() does not take the namespace into account Created: 14/Jul/11  Updated: 08/Sep/11  Resolved: 27/Aug/11

Status: Resolved
Project: Doctrine Common
Component/s: Caching
Affects Version/s: 2.1
Fix Version/s: 2.1.2

Type: Bug Priority: Major
Reporter: Eric Durand-Tremblay Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None
Environment:

Memcached



 Description   

The deleteAll() function delete all keys with no respect of the namespace.

Using orm:clear-cache:metadata with memcache result in the deletion of all memcache keys. (including keys unrelated to the orm)



 Comments   
Comment by Eric Durand-Tremblay [ 14/Jul/11 ]

See pull request : https://github.com/doctrine/common/pull/46

I think the best way to fix this problem is to check for the namespace in the getIds() function.

Unfortunately, that would break the interface of AbstractCache

Split the function in getIds() and abstract _getIds(). Do the namespace check in getIds()

I can do pull request on github if necessary.

NOTE
I checked on master branch and the probleme is not fixed by commit
786deeae264ae03061d6aa92c681afa4344f18b9 : Fixed AbstractCache where delete* functions were incorrectly being prepended by namespace if any is defined. This was causing a double p

Comment by Guilherme Blanco [ 27/Aug/11 ]

Fixed in master since this commit: https://github.com/doctrine/common/commit/486169851ea87b3e14ed45d5bfd7d07b1d41af65

Comment by Benjamin Eberlei [ 08/Sep/11 ]

Merged into 2.1.x for next release





[DCOM-56] Remote autoloading from annotations completly, replacing it with its own loading mechanism Created: 01/Jul/11  Updated: 02/Jul/11  Resolved: 02/Jul/11

Status: Resolved
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This is a mail from me to the symfony-dev mailing-list:

I am sorry it is very late to bring this up again, but given the nasty problems I faced today with the way annotationreader works with autoload = true I have to share them (and blow of some steam). While i guess its to late to change this again before 2.0, we might still have to discuss to go away from autoload = true for 2.1. Now for the reasons:

AnnotationReader with autoload = true (which Symfony2 uses) will not only require a silent autoloader, it requires ALL autoloaders used to be silent. While this is the case for the Symfony Universal loader its not the case for the Doctrine one, and not for many others - and its not even a PSR-0 requirement. For a simple reason: Supporting silent failure means using file_exists, means a file stat, which means apc.stat = 0 is useless. While I don't care so much about it in Doctrine context, because the AnnotationReader default is NOT to autoload annotations this will cause problems for Symfony: Not every library in any Symfony2 app will be included through a silent autoloader. That means given the context users might run into problems using annotations that they have absolutely no way of fixing. And since the AnnotationReader does not know this upfront, potential failures become very real issue.

Example: I use SecurityExtraBundle and happen to have my SuperDuperLibrary XYZ. That library was developed by my company and contains tons of important business logic but unfortunately uses a non-silent autoloader (for whatever reasons). However i use Symfony to secure access to it by generating secure proxies. Now what happens if an annotation reader runs over that library? Because the current namespace is always considered, for every @var _NAMESPACE."
var" is class_exists'ed and then your code fatal errors. I didn't see this problem before, because i don't use annotations myself so much and always in the BC Doctrine 2.0.x way and that slipped my mind. Same goes for Validation with Annotations on external code, or maybe in the future services definitions through annotations.

All this trouble we are getting into with autoloading annotations is just because we wanted to validate that the annotations used actually exist. But since we changed to a use/import approach rather then re-using namespaces we don't even have the clashing problem anymore that got us into the trouble with class_exists before. The autoloading however also got us and users into other problems:

1. We have to maintain a rather large map of "blacklisted" annotations that never throw failure exceptions because they are actually used as doc documentations. As with blacklists this is never a complete list.
2. Users with intensive doc-block usage are punished by Symfony having to maintain their own blacklist of annotations that never throw exceptions so that their code actually works.
3. Libraries have to handle the case that a reader is either using autoloading or not through special code.

While I do think it would have been nice to offer validation for annotation this is a task that should be put on IDEs and developers, since it turns out that its not possible flawlessly within the library itself. The AnnotationReader should always use class_exists($name, false). Docblocks are still comments and the code shouldn't fail because classes are not available that are not even relevant in the context of the current AnnotationReader. Each part of the code that uses an AnnotationReader should require_once the annotations that it can potentially need upfront. That even works for Validation as you can grab the tags from the DIC. That way we have a single mode of operation for the AnnotationReader and not two different ones that are 180 degrees different. OF course one could argue ALWAYS to use class_exists($name, true) instead, but i hope my mail showed why this is not a good idea.

If for some reason we do want autoloading for annotations then it should be a mechanism different from the PHP one, because they are both not compatible. The reader could have hooks for autoloading and validation mechanisms. Nothing we want to add for Doctrine Common 2.1, but something we could easily play around with for Common 3.

Next a mail with implementation details:

I propose to change the following on AnnotationReader:

1. Add a method to register annotation classes:
$reader->registerAnnotation("Symfony\Bridge\Doctrine\Validator\UniqueEntity");
and $reader->registerAnnotations(array(..));
2. Add a method to register files that contain annotations:
$reader->registerAnnotationFile(".."), directly loading them via
require_once;
3. Add a method to register annotation namespaces:
$reader->registerAnnotationNamespace("Symfony\Component\Validator\Constraint",
$dir). This is used to create a silently failing PSR-0 "autoloader" for
this path + directories. It can be automatically populated from data in
the UniversalClassLoader.
4. Change the class_exists check to never use autoload = true. If a
class is part of a registered annotation namespace try load the file based on a silent
PSR-0 autoload for it using an autoloader impl. contained in the
AnnotationReader (not the php autoloading mechanism), before triggering
the class_exists($name, false)

This way for symfony only the UniversalClassLoader data has to be used
to populate the registered annotation namespaces.



 Comments   
Comment by Benjamin Eberlei [ 02/Jul/11 ]

Implemented





[DCOM-55] Ugly problems with default import __NAMESPACE__ when it contains non-annotation classes that are docblock props Created: 29/Jun/11  Updated: 29/Jun/11  Resolved: 29/Jun/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.1
Fix Version/s: 2.1

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Say you have a class "Entity".

Then /** @Entity */ on a class in the same namespace will try to instantiate Entity.

We should avoid this by testing if Entity is a subclass of \Doctrine\Common\Annotations\Annotation



 Comments   
Comment by Benjamin Eberlei [ 29/Jun/11 ]

Actually this problem is more problematic, we have to enforce extending \Doctrine\Common\Annotations\Annotation for ALL annotations.

Comment by Benjamin Eberlei [ 29/Jun/11 ]

Fixed.





[DCOM-54] ClassLoader protected properties Created: 14/Jun/11  Updated: 17/Jul/11  Resolved: 17/Jul/11

Status: Resolved
Project: Doctrine Common
Component/s: Class Loading
Affects Version/s: None
Fix Version/s: 2.1.1

Type: Improvement Priority: Major
Reporter: Jon Johnson Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

na



 Description   

It would be great if the members of ClassLoader($fileExtension, $namespace, $includePath, $namespaceSeparator) where protected instead of private. In order to work around DCOM-20 I was going to extend and override loadClass but the private members mean I need to copy a lot of other code.
Didn't seem worth the overhead of creating a patch - but I can if you prefer.



 Comments   
Comment by Guilherme Blanco [ 17/Jul/11 ]

Fixed in https://github.com/doctrine/common/commit/c614a20e02cb8fd5531bce1adcb34a1210f79ac6





[DCOM-53] PhpParser doesn't ignore commented keywords Created: 24/May/11  Updated: 04/Sep/11  Resolved: 04/Sep/11

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Michel D'HOOGE Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

PhpParser class provided with Symfony2 BETA 2
https://github.com/doctrine/common/blob/18518814c0f4e11fe90a0ec56919d4d2315565ef/lib/Doctrine/Common/Annotations/PhpParser.php



 Description   

The PhpParser makes a too optimistic assumption about code convention...

If you have the word 'class' or 'interface' in the comment before the class definition, preg_match_all finds wrong slice of code and PHP complains with a Warning about "Unterminated comment". This occurs only once after the cache is cleared.



 Comments   
Comment by Fabio B. Silva [ 03/Sep/11 ]

Hello all
I tested this issue.

After rewriting the php parser does not happen. : https://github.com/doctrine/common/commit/d274bd7fe9e8f5657c670ed8a22a31024544eeeb

I think that can be closed

Thanks

Comment by Michel D'HOOGE [ 04/Sep/11 ]

Unfortunately, I can't remember when the problem disappeared but it is no longer here for sure.
And since the call to preg_match_all has been removed, we can close the issue.





[DCOM-51] Support parsing of single quotes Created: 03/May/11  Updated: 05/May/11  Resolved: 05/May/11

Status: Resolved
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: 2.0.2
Fix Version/s: 2.1

Type: New Feature Priority: Major
Reporter: Jordi Boggiano Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

It'd be great to support single quotes, this limitation doesn't make sense from a user point of view and in php context single quotes are so commonly used that it's easy to slip and then get some funny Exception message out of it.



 Comments   
Comment by Jordi Boggiano [ 03/May/11 ]

Patch against master is at https://github.com/doctrine/common/pull/17

Comment by Guilherme Blanco [ 05/May/11 ]

Merged the pull request.

Thanks!





[DCOM-50] Unable to use '@' in combination with a number (example: email@3domain.tld) in comment block Created: 28/Apr/11  Updated: 13/May/11  Resolved: 13/May/11

Status: Resolved
Project: Doctrine Common
Component/s: Annotations
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Florian Preusner Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

My tld contains a number at the beginning (8points.de).
I'm not able to use it in the @author section (@author Florian Preusner <florian.preusner@8points.de>) cause after the "@" the next letter is a number.

Exception:
AnnotationException: [Syntax Error] Expected Doctrine\Common\Annotations\Lexer::T_IDENTIFIER, got '8' at position 118 in method Blog\MainBundle\Controller\MainController::indexAction().
n /var/www/floeh/vendor/doctrine-common/lib/Doctrine/Common/Annotations/AnnotationException.php at line 41

I think this is a bug?!



 Comments   
Comment by Guilherme Blanco [ 13/May/11 ]

Fixed on master.

https://github.com/doctrine/common/commit/42029e6327f6ffc00a268cb61892b8ecbba49278





[DCOM-47] When using different class loaders Created: 07/Apr/11  Updated: 27/Dec/11  Resolved: 14/Sep/11

Status: Resolved
Project: Doctrine Common
Component/s: Class Loading
Affects Version/s: 2.1
Fix Version/s: 2.1.2

Type: Bug Priority: Major
Reporter: Gediminas Morkevicius Assignee: Guilherme Blanco
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

all



 Description   

ClassLoader::classExists($class); will fail if different class loader is used which does not return any boolean value. This includes Symfony2 UniversalClassLoader

I have never used this function before because native PHP method class_exits($class, true) first will try to autoload. But if the class does not exist
and you are using Doctrine\Common::ClassLoader and you call class_exists($class) it will trigger fatal error. This behavior makes it impossible to make code compatible
with different class loading mechanisms for Doctrine2



 Comments   
Comment by Christophe Coevoet [ 07/Apr/11 ]

This is known and documented in the code: https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Annotations/Parser.php#L110

Comment by