[DCOM-259] Doctrine Annotations with php-cs-fixer and traits Created: 26/Nov/14  Updated: 26/Nov/14  Resolved: 26/Nov/14

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

Type: Bug Priority: Minor
Reporter: Cliff Odijk Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

We are using the php-cs-fixer (version 1.1 from FriendsOfPHP) which removes unused use statements and I think that keeps our code clean. But when i'm trying to use the annotations from the Atlantic18/DoctrineExtensions Timestampable the annotation reader complains that it is never imported. And thats because the import is happening in the trait and not the class

The trait that we are trying to use.
https://github.com/Atlantic18/DoctrineExtensions/blob/master/lib/Gedmo/Timestampable/Traits/TimestampableEntity.php

And here it reads the use statements of the file but not the traits.
https://github.com/doctrine/annotations/blob/master/lib/Doctrine/Common/Annotations/PhpParser.php#L57



 Comments   
Comment by Cliff Odijk [ 26/Nov/14 ]

It happens when you try to use a trait inside a other trait

Comment by Marco Pivetta [ 26/Nov/14 ]

Not a doctrine-project issue





[DCOM-258] ArrayCollection - add method repeats objects Created: 19/Nov/14  Updated: 19/Nov/14  Resolved: 19/Nov/14

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

Type: Bug Priority: Critical
Reporter: Pablo Santiago Sánchez Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: collection
Environment:

Any OS - PHP 5.x.x



 Description   

The add method allows an already included object to be included n number of times. This means that the same object maybe processed more times than needed, and also index does not match object count. If you have 3 objects and the same object is repeated 3 times, developers need to create another control array to guarantee that no object is processed twice.

The code bellow fix the problem on ArrayCollection class:

   /**
     * {@inheritDoc}
     */
    public function add($value)
    {
    	if (is_object($value)) {
	    	if (is_array($this->_elements)) {
	    		if (in_array($value, $this->_elements)) {
	    			return true;
	    		}
	    	}
    	}
        $this->_elements[] = $value;
        return true;
    }


 Comments   
Comment by Marco Pivetta [ 19/Nov/14 ]

This is intended API behavior.

Comment by Pablo Santiago Sánchez [ 19/Nov/14 ]

How can reprocessing be the expected behauviour? It lowers performance and also creates unnecessary risk to applications.

Comment by Marco Pivetta [ 19/Nov/14 ]

What you are looking for is for a Set, not a Collection

Comment by Pablo Santiago Sánchez [ 19/Nov/14 ]

Ok, so, where's doctrine set class? I couldn't find any.

Comment by Marco Pivetta [ 19/Nov/14 ]

Doctrine does not provide such a functionality. I suggest looking at projects such as https://github.com/morrisonlevi/Ardent and https://github.com/morrisonlevi/SPL-Collections instead

Comment by Pablo Santiago Sánchez [ 19/Nov/14 ]

Already implemented, don't worry. If you think this is a desired behaviour, ok.

I extended the ArrayCollection and changed a bit the behaviour to make a Set with no repeated objects in it. Since objects are passed as references, I have no need to overprocess anything and need better performance. Perhaps, someday, when I need this behaviour I go back to the original ArrayCollection.

Thank you.

Comment by Marco Pivetta [ 19/Nov/14 ]

Pablo Santiago Sánchez be aware that you cannot avoid this behavior when using a Doctrine\ORM\PersistentCollection (when in ORM context)





[DCOM-257] [GH-342] Class metadata loading fallback hook Created: 11/Nov/14  Updated: 11/Nov/14

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

Type: New Feature Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Unresolved Votes: 0
Labels: aliases, mapping, resolve-target-entities

Issue Links:
Dependency
is required for DDC-3385 [GH-1181] Support fetching entities b... Open

 Description   

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

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

Message:

Enables loading class metadata when loading failed (in subclasses).

See doctrine/doctrine2#385

Note that I preferred inheritance to avoid having an `EventManager` in here, though it may be a perfectly acceptable dependency in this case, therefore it is up for discussion.






[DCOM-256] [GH-340] Change tracking interface for object values Created: 21/Oct/14  Updated: 24/Oct/14

Status: Open
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: Unresolved Votes: 0
Labels: None


 Description   

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

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

Message:

Currently, aside from the "NOTIFY" change tracking policy which takes long to implement on pre-existing entities, there is no atomic mechanism to allow tracking changes that take place inside de-serialized values of the DBAL\ObjectType once the entity has been loaded.

The UnitOfWork uses PHP's identity comparison operator (===) to compute the changed sets which yelds no change result when comparing pointers to the same object instance.

By implementing this interface, a serialized object may manage it's own dirty state and ensure the new values are persisted without affecting the entity's current change tracking policy.

The corresponding pull request on doctrine2 changes the following in Doctrine\ORM\UnitOfWork.php:
// skip if value haven't changed
if ($orgValue === $actualValue)

{ continue; }

into:

// skip if value haven't changed
if (($orgValue === $actualValue) && ( ! ($actualValue instanceof ObjectChangeTracking) || ( ! $actualValue->isDirty()))) { continue; }

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

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





[DCOM-255] Add support for using TABS (for indentation) in DocBlock Annotations Created: 12/Oct/14  Updated: 13/Oct/14

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

Type: Bug Priority: Major
Reporter: Henrik Skov Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Any



 Description   

Apparently any annotation that contains at least one TAB character is ignored.

The reason/bug resides in \Doctrine\Common\Annotations\DocParser->findInitialTokenPosition() on line 351

// if the @ is preceded by a space or * it is valid

Thanks



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

Henrik Skov this seems to be easily fixable by using something like preg_match('/^(\\t|
*)$/', $input[$pos - 1])
: can you provide a PR?

I'm just not sure about the performance impact here.

Note that JIRA screws with my regex in the quoted text, as escape sequences don't match what I entered.





[DCOM-254] [GH-338] Short gettter should work with associations Created: 22/Sep/14  Updated: 22/Sep/14

Status: Open
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: Unresolved Votes: 0
Labels: None


 Description   

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

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

Message:






[DCOM-253] Support use statements for annotations property type Created: 20/Sep/14  Updated: 20/Sep/14

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

Type: Improvement Priority: Minor
Reporter: Jáchym Toušek Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

For example in doctrine/orm there is this annotation class:

namespace Doctrine\ORM\Mapping;

/**
 * @Annotation
 * @Target({"PROPERTY","ANNOTATION"})
 */
final class JoinTable implements Annotation
{
    /**
     * @var string
     */
    public $name;

    /**
     * @var string
     */
    public $schema;

    /**
     * @var array<\Doctrine\ORM\Mapping\JoinColumn>
     */
    public $joinColumns = array();

    /**
     * @var array<\Doctrine\ORM\Mapping\JoinColumn>
     */
    public $inverseJoinColumns = array();
}

Note the @var array<\Doctrine\ORM\Mapping\JoinColumn>. In my opinion @var array<JoinColumn> should be enough here as JoinColumn is in the same namespace. Use statements should also be supported.






[DCOM-252] Support for basic expressions in annotation parameters Created: 16/Sep/14  Updated: 16/Sep/14  Resolved: 16/Sep/14

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

Type: Improvement Priority: Minor
Reporter: Bernardo Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

It would be nice to be able to use bit flags as values in annotations. Currently it is not possible to use even basic (constant) expressions as annotation values.

Examples:

/**
 * @MyAnnotation(value = Const::FLAG_A | Const::FLAG_C)
 */
/**
 * @MyAnnotation(value = Const::ALL ^ Const::SOME_FLAG)
 */


 Comments   
Comment by Marco Pivetta [ 16/Sep/14 ]

Supporting expressions in annotations would force us to implement an entire expression parser engine. No-go, that's way too complex for no real gain.





[DCOM-251] [GH-337] added a test for identifier getter in a trait Created: 03/Sep/14  Updated: 03/Sep/14

Status: Open
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: Unresolved Votes: 0
Labels: None


 Description   

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

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

Message:

When the identifier getter method is in a trait, the proxy generation ignores it and treats it as a lazy loading field, causing the $proxyInstance->getId() to initialize the object.

This is a test that proves that.






[DCOM-250] [GH-335] add base events class Created: 28/Aug/14  Updated: 28/Aug/14

Status: Open
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: Unresolved Votes: 0
Labels: None


 Description   

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

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

Message:

Hi,

All doctrine projects implements events. A lot of them are similars, but there is no base class defining common Events.

I tried to gathen them all in this PR. I looked into ```CouchDb-orm```, ```doctrine-orm```, ```doctrine-mongodb-odm``` and ```phpcr-odm```.

I only added events present in all packages, but CouchDB is the only one to not implement some events implemented in every other packages (```postPersist```, ```loadClassmetadata```, ```preFlush```, etc.).






[DCOM-249] Criteria are unable to locate getters for properties with an underscore prefix Created: 30/Jul/14  Updated: 30/Jul/14

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

Type: Bug Priority: Minor
Reporter: Zach Garwood Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: collection, criteria, getter


 Description   

There are two related entities:
1) Inquiry:

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="inquiries")
 */
class Inquiry
{
    /**
     * @ORM\OneToMany(targetEntity="Field", mappedBy="_inquiry")
     */
    protected $_fields;

    public function __construct()
    {
        $this->_fields = new ArrayCollection();
    }

    // ...

    public function getFields()
    {
        $criteria = Criteria::create()->orderBy(['index' => Criteria::ASC]);

        return $this->_fields->matching($criteria);
    }
}

2) Field:

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="fields")
 */
class Field
{
    /**
     * @ORM\ManyToOne(targetEntity="Inquiry", inversedBy="_fields")
     * @ORM\JoinColumn(
     *      name="inquiry_id",
     *      referencedColumnName="id",
     *      nullable=false
     * )
     */
    protected $_inquiry;

    /**
     * @ORM\Column(name="index", type="integer", nullable=false)
     */
    protected $_index;

    // ...

    public function setIndex($index)
    {
        $this->_index = $index;

        return $this;
    }

    public function getIndex()
    {
        return $this->_index;
    }
}

Obviously, the underscore-prefixed property names are not ideal, but I didn't get to set the coding standard, I just have to follow it.

When trying to filter an ArrayCollection of Field entities in the Inquiry entity with an ordering criteria, I receive an ORMException with the message "Unrecognized field: index". If I alter the criteria to the following, I receive a PHP error with the message "PHP Fatal error: Cannot access protected property Field::$_index":

$criteria = Criteria::create()->orderBy(['_index' => Criteria::ASC]);

For whatever reason, Criteria::orderBy() is not finding the Field::getIndex() getter.

There are two workarounds that I've discovered for this issue:
The first is to make Field::$_index a public property:

    /**
     * @ORM\Column(name="index", type="integer", nullable=false)
     */
    public $_index;

The second, and the method that I've used, is to make an additional getter:

    public function get_index()
    {
        return $this->getIndex();
    }

I'm not sure why Criteria::orderBy() is unable to locate the Field::getIndex() getter but is able to locate Field::get_index(). And I'm sure that this is only an issue for people with ahem outdated coding standards. But it seems there is a bug with the way that the criteria are accessing getters and properties.






[DCOM-248] [GH-332] 0.25 second wait for file caching Created: 28/Jul/14  Updated: 28/Jul/14  Resolved: 28/Jul/14

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 furison:

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

Message:

To deal with the issue of windows caching files when you wirte to them then close the handle I have added a 0.25 second pause between closing and moving the file. This is so that windows finishes handling writting to the file before trying to move it



 Comments   
Comment by Doctrine Bot [ 28/Jul/14 ]

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





[DCOM-247] [GH-329] Remove dead config Created: 27/Jul/14  Updated: 27/Jul/14  Resolved: 27/Jul/14

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

Type: Improvement 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 JeroenDeDauw:

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

Message:



 Comments   
Comment by Doctrine Bot [ 27/Jul/14 ]

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





[DCOM-246] [GH-328] Optimized imports Created: 27/Jul/14  Updated: 27/Jul/14  Resolved: 27/Jul/14

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

Type: Improvement 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 JeroenDeDauw:

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

Message:



 Comments   
Comment by Doctrine Bot [ 27/Jul/14 ]

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





[DCOM-245] doContains method in MemcacheCache cache provider class returning wrong values Created: 27/Jun/14  Updated: 27/Jun/14

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

Type: Bug Priority: Major
Reporter: Javier Mellado Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: orm
Environment:

dev, test and prod



 Description   

Method doContains in MemcacheCache cache provider class looks like this


    /**
     * {@inheritdoc}
     */
    protected function doContains($id)
    {
        return (bool) $this->memcache->get($id);
    }

In the case of an empty array stored, the result of casting an empty array is false but actually there's a value in cache with they key $id. As a matter of fact, when you take a look at MemcachedCache cache provider class, the doContains method looks like this:

    /**
     * {@inheritdoc}
     */
    protected function doContains($id)
    {
        return (false !== $this->memcached->get($id));
    }

Which is more accurate in terms of the existance of a value in cache for $id. I had to have a workaround with the above code to make it work with Memcache.

Is there any reason it is like that in MemcacheCache cache provider class and not in MemcachedCache cache provider class?



 Comments   
Comment by Marco Pivetta [ 27/Jun/14 ]

Javier Mellado can you please open a PR for this? The fix seems trivial, but it just needs a test in order to merge.

Comment by Javier Mellado [ 27/Jun/14 ]

Excuse me Marco, what is a PR? I'll be more than happy to do so.

Comment by Marco Pivetta [ 27/Jun/14 ]

Javier Mellado pull request on github. If you don't then it may just be fixed in future as soon as someone picks it.





[DCOM-244] API docs for Doctrine\Common\Collections missing Created: 19/Jun/14  Updated: 26/Jun/14

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

Type: Documentation Priority: Major
Reporter: Christian Schmidt Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The API docs on http://www.doctrine-project.org/api/common/2.4/index.html (linked from e.g. http://www.doctrine-project.org/projects.html) does not include documentation for the Doctrine\Common\Collections namespace.

Even though the code for collections is separated into its own Github module, I assume it is still a part of Doctrine Common.



 Comments   
Comment by Marco Pivetta [ 26/Jun/14 ]

That's actually a completely separate project now. We may need new sections for collections/annotations/lexer/cache

Comment by Christian Schmidt [ 26/Jun/14 ]

I see. It would be nice if the API docs were crosslinked, so the list of namespaces in the left column is complete, and so that references to classes in other projects were links (this is also an issue with e.g. Doctrine classes that inherit from classes in Common).





[DCOM-243] 'Zend OPcache' PHP extension might prevent AnnotationReader from getting entity class comments Created: 22/May/14  Updated: 22/May/14

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

Type: Bug Priority: Major
Reporter: Victor Smirnov Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

If module Zend OPcache is installed and configured not to save comments the AnnotationReader class fails to parse data for entities.

Output from php -m contains line Zend OPcache.
The module is configured with the following parameter opcache.save_comments=0.

I would expect the AnnotationReader constructor to throw an exception. But it does not check if the module is loaded.

In addition to the check for opcache module

        if (extension_loaded('opcache') && ini_get('opcache.save_comments') == 0) {
            throw AnnotationException::optimizerPlusSaveComments();
        }

we might have a new check for the Zend OPcache module

        if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') == 0) {
            throw AnnotationException::optimizerPlusSaveComments();
        }


 Comments   
Comment by Victor Smirnov [ 22/May/14 ]

Please check the pull request - https://github.com/doctrine/annotations/pull/35
I think this might be a simple fix.

It took us a while here to discover the issue on production. I think the setup might be quite common on production servers. Adding the check should save people time on troubleshooting.

Warm regards,
Victor





[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-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-239] [GH-319] Add last modified time for metadata Created: 22/Mar/14  Updated: 28/May/14

Status: Open
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: Unresolved Votes: 0
Labels: None


 Description   

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

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

Message:

This PR is part 1 of 2. Part 1 is for the doctrine/doctrine2 repository.

Read more in https://github.com/doctrine/doctrine2/pull/986



 Comments   
Comment by Christian Schmidt [ 28/May/14 ]

All comments raised in the pull request have been addressed. What is the next step?





[DCOM-238] FileCache does not remove directories on flush Created: 21/Mar/14  Updated: 21/Mar/14

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

Type: Bug Priority: Minor
Reporter: Ryan Korczykowski Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Windows 7



 Description   

FileCache::doFlush() does not remove the directories that store the cache file. The cache file is correctly deleted. This results in hundreds of hanging directories when the cache is flushed / rebuilt.

The version of doctrine/cache is 1.3.0.



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

This is likely because of the iterator skipping directories:

https://github.com/doctrine/cache/blob/36c4eee5051629524389da376ba270f15765e49f/lib/Doctrine/Common/Cache/FileCache.php#L120-L122





[DCOM-237] [GH-318] Fixed link to Documentation Created: 19/Mar/14  Updated: 19/Mar/14  Resolved: 19/Mar/14

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

Type: Documentation Priority: Trivial
Reporter: Doctrine Bot Assignee: Steve Müller
Resolution: Fixed Votes: 0
Labels: None


 Description   

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

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

Message:



 Comments   
Comment by Doctrine Bot [ 19/Mar/14 ]

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

Comment by Steve Müller [ 19/Mar/14 ]

Fixed in commit: https://github.com/doctrine/common/commit/434c364b6a8780c16769b60fcc56e61e6bac766f





[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-234] Cache file fails on Windows - name too long Created: 19/Feb/14  Updated: 19/Feb/14

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

Type: Bug Priority: Critical
Reporter: Matt Durak Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Windows 8.1 x64
Symfony CMF with Doctrine caching



 Description   

The filename component of the FileCache is unbounded. It is possible to attempt to create files that are too long for the Windows filesystem. This causes an exception.

Example from a Symfony CMF/PHPCR project:

file_put_contents(D:\web_workspace\study\app\cache\dev\doctrine\cache\71d059fe39968db8\3e485dbb27419897\dfb24337887ff42c\a7b85c70bfefa781\nodes[nodes weak references cmsprogrampagesThe Summer ProgramThe Calendar 5 weeks for all Europe, routeContent, default][49].doctrinecache.data): failed to open stream: Invalid argument in D:\web_workspace\study\vendor\doctrine\cache\lib\Doctrine\Common\Cache\FilesystemCache.php line 111

In this case, the ID was
"nodes[nodes weak references cmsprogrampagesThe Summer ProgramThe Calendar 5 weeks for all Europe, routeContent, default][49].doctrinecache.data"

That refers to a phpcr node:
cms/program/pages/The Summer Program/The Calendar 5 weeks for all Europe

Attempting to manually create that file in windows explorer shows that it is trunacted to
"nodes[nodes weak references cmsprogrampagesThe Summer ProgramThe Calendar 5 weeks for all Europe, routeContent, default][49].do" (128 characters)

Shouldn't the ID be truncated so this doesn't happen? Should this be fixed here or in the phpcr that is creating the long ID to begin with?






[DCOM-233] Support for class constant annotations Created: 05/Feb/14  Updated: 24/Apr/14  Resolved: 24/Apr/14

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

Type: New Feature Priority: Minor
Reporter: Steve Müller Assignee: Guilherme Blanco
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

I need to read annotations for class constants which currently is not possible. Obviously there is a good reason for that because PHP lacks a native ReflectionConstant class. Still sometimes this would be really useful and there are custom reflection implementation out there such as the PHP-Token-Reflection library (https://github.com/Andrewsville/PHP-Token-Reflection) which provide a class for that purpose.
Now the problem is that there is no way to extend the annotation reader to add support for this purpose without having to duplicate a lot of code. This is due to the annotation parser being private in the annotation reader and Doctrine not providing a Target::TARGET_CONSTANT.
If we could decide on supporting this, there are two options IMO:

1. Provide a ReflectionConstant interface in the core and add getConstantAnnotation(ReflectionConstant $constant, $annotationName) and getConstantAnnotations(ReflectionConstant $constant) to the Reader interface in conjunction with an AbstractReader class to throw an exception when calling those methods (to preserve BC).

2. Extend AnnotationReader to provide a final protected getParser() method for better extensibility so that one can subclass the annotation reader without heavy code duplication.

In both cases an addition of Target::TARGET_CONSTANT would desirable.

Currently I have to workaround this is in a very ugly manner by extending \ReflectionClass to access ReflectionConstant objects provided by PHP-Token-Reflection library and wrapping them into objects that emulate \ReflectionProperty, just to be able to use the annotation reader.

Do you think there is any solution to this which we can provide in Doctrine annotations lib?



 Comments   
Comment by Marco Pivetta [ 22/Apr/14 ]

Guilherme Blanco was thinking of marking this as "won't fix". A constant, after all, is a constant, and it can be accessed no matter what.

Steve Müller can you clarify on the use-case? This is too much work for too little benefit IMO...

Comment by Steve Müller [ 22/Apr/14 ]

Marco Pivetta This is not about access but about being able to put metadata on class constants. My exact use-case is an Enum implementation through class constants where I can put things like readable values, ordinal numbers and such on each enum constants. I haven't thought of any other special use-cases and it might not be as common to be able to enrich class constants with metadata but still it would perfectly fit the annotation reader.
I see that this might cause too much work so if you decide on a "won't fix" I'll be fine with that.

Comment by Christophe Coevoet [ 22/Apr/14 ]

Given that PHP does not expose the docComment of constants, I would vote for marking it as "won't fix", as it would force us to require a separate parsing of the code to find the docComment

Comment by Guilherme Blanco [ 24/Apr/14 ]

No magic please... PHP is guilty here. We should propose docComment support there, then we add this support here.





[DCOM-232] [GH-315] Ability to use alternate dump functions Created: 04/Feb/14  Updated: 19/May/14  Resolved: 19/May/14

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

Type: New Feature 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 pmeth:

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

Message:

In most cases functions such as print_r provide much more readable output than var_dump. Some might also want to use var_export or write their own dump function. This should be a simple change that does not cause any BC breaks.



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

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





[DCOM-231] Lifecycle-Callback MappingExceptions for abstract functions in PHP >=5.4.8 Created: 26/Sep/13  Updated: 03/Feb/14  Resolved: 03/Feb/14

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

Type: Bug Priority: Minor
Reporter: Konrad Mohrfeldt Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows 7 x64, PHP 5.5.3



 Description   

Hi,

i noticed that in PHP starting with Version 5.4.8 the ReflectionService implementations returns a different result for the hasPublicMethod function than in PHP <= 5.4.7 when called on an abstract function. This prevents me from defining a lifecycle callback on an abstract function for a mapped superclass.

I think that at least for mapped supperclasses it should be checked if the class and the function is abstract so it can be assumed that every extending class has this function and it is in fact callable.

The bug was introduced by a bugfix in PHP 5.4.8.

cheers

konrad



 Comments   
Comment by Konrad Mohrfeldt [ 10/Oct/13 ]

i’ve created a pull request to fix this issue. see https://github.com/doctrine/common/pull/301

Comment by Konrad Mohrfeldt [ 10/Oct/13 ]

oh… and… this bug should probably be moved to common as it affects orm but is caused in common

Comment by Doctrine Bot [ 03/Feb/14 ]

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





[DCOM-230] [GH-314] Implemented the suggested fix of DCOM-204 Created: 17/Jan/14  Updated: 19/May/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 empi89:

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

Message:

Johan Groth has reported "AnnotationDriver cannot find classes inside Phar files" (http://www.doctrine-project.org/jira/browse/DCOM-204) and suggested this fix.



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

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





[DCOM-229]  DocParser - add support for php5 MyClass::class call to get path of the class Created: 06/Jan/14  Updated: 06/Jan/14

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

Type: Bug Priority: Trivial
Reporter: Umed Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

When I try to use in my annotations

 
Career::class

I get Semantical Error. Career is imported, so I dont want to use full class path name again. How about to add this feature to support by annotations?
We need to add some code like this (DocParser#Constant):

 
            if ($found) {
                 if ($const === 'class') {
                    return $className;
                 }

                 $identifier = $className . '::' . $const;
            }
        }

        if (!defined($identifier)) {
            throw AnnotationException::semanticalErrorConstants($identifier, $this->context);
        }

        return constant($identifier);





[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-227] [GH-311] Improve UnexpectedValueException error message, add testcase. Created: 19/Dec/13  Updated: 18/Apr/14  Resolved: 18/Apr/14

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Invalid 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/311

Message:

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

A TestCase is provided for the proxyDirectoryNotWritable() function.



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

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

Comment by Guilherme Blanco [ 18/Apr/14 ]

Issue got closed by reporter





[DCOM-226] [GH-310] Improve UnexpectedValueException error message, add testcase. Created: 19/Dec/13  Updated: 18/Apr/14  Resolved: 18/Apr/14

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Invalid 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/310

Message:

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

A TestCase is provided for the proxyDirectoryNotWritable() function.



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

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

Comment by Guilherme Blanco [ 18/Apr/14 ]

Issue got closed by reporter





[DCOM-225] [GH-309] DCOM-224 - Multiple backslashes in class names are not considered Created: 14/Dec/13  Updated: 19/May/14  Resolved: 14/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/309

Message:

DCOM-224 - Multiple backslashes in the class name are not being normalized, causing simplified autoloaders to crash badly



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

Duplicate of DCOM-224

Comment by Doctrine Bot [ 19/May/14 ]

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





[DCOM-224] If @ManyToOne targetEntity contains class name with double slashes, "Cannot redeclare class" error is raised Created: 30/Nov/13  Updated: 19/May/14  Resolved: 19/May/14

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

Type: Improvement Priority: Minor
Reporter: Ville Mattila Assignee: Marco Pivetta
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

If @ManyToOne (and apparently any other association annotation) contains targetEntity with "wrongly" defined fully qualified class name in format like My\\Entity
Class, Fatal error "Cannot redeclare class" is raised when running command to generate schema.

It would be more intuitive (and save some debugging hours if a proper exception of wrongly defined class name would be raised.



 Comments   
Comment by Luis Cordova [ 14/Dec/13 ]

i haven't tried annotations yet but in yml and on master this gives me:

[Doctrine\ORM\Mapping\MappingException]
The target-entity Acme\DemoBundle\Entity\UserX cannot be found in 'Acme\DemoBundle\Entity\Category#users
'.

let me try annotations ...

Comment by Luis Cordova [ 14/Dec/13 ]

yeah this should be pretty much closed @ocramius @beberlei

Comment by Luis Cordova [ 14/Dec/13 ]

https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php#L945

Comment by Marco Pivetta [ 14/Dec/13 ]

Copied comment from 2844:

The issue should try to create a mapping of the kind

@ManyToOne(targetEntity="Foo\\Bar")

explicitly using two backslashes in the namespace seperator and try if an error occurs. This might be autoloader and Operating System dependent. Even if there is no error, we should fix "Doctrine\ORM\Mapping\ClassMetadataInfo" to replace double backslashes everywhere with one backslash correctly. This affects targetEntity and DiscrimnatorMap.

Comment by Marco Pivetta [ 14/Dec/13 ]

I'd rather throw an exception to warn the user about the abuse of backslashes.

Comment by Marco Pivetta [ 14/Dec/13 ]

Moved to doctrine common, since it's an issue with how metadata is being loaded when referenced

Comment by Marco Pivetta [ 14/Dec/13 ]

Provided a hotfix at https://github.com/doctrine/common/pull/309

Comment by Doctrine Bot [ 19/May/14 ]

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

Comment by Marco Pivetta [ 19/May/14 ]

After discussing this on https://github.com/doctrine/common/pull/309, it turned out that we shouldn't fix incorrect backslash escaping in annotations.





[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





Proxies return private properties in __sleep, which is not supported by PHP. (DCOM-175)

[DCOM-221] Merge DCOM-175 into 2.4 Created: 01/Dec/13  Updated: 21/Apr/14  Resolved: 21/Apr/14

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

Type: Sub-task Priority: Major
Reporter: Marco Pivetta Assignee: Guilherme Blanco
Resolution: Fixed Votes: 1
Labels: proxy


 Description   

DCOM-175 is scheduled for 2.5, but I think it should be merged back in 2.4.x



 Comments   
Comment by Guilherme Blanco [ 21/Apr/14 ]

Merged as of https://github.com/doctrine/common/commit/870b42119983059192ff7ef054f2acb580b64dfe





[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





[GH-298] Silence E_NOTICE warning: "Undefined index". (DCOM-216)

[DCOM-217] Merge DCOM-216 into 2.4.x Created: 16/Sep/13  Updated: 21/Apr/14  Resolved: 21/Apr/14

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

Type: Sub-task Priority: Major
Reporter: Marco Pivetta Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

Commit https://github.com/doctrine/common/commit/d9dea98243c733ff589aab10e321de4f14a63ab4 should be merged back into 2.4.x



 Comments   
Comment by Guilherme Blanco [ 21/Apr/14 ]

Backported as of https://github.com/doctrine/common/commit/b1a31ae3df2c18c24bec42e2cc32e3e4bedc07c7





[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-215] Decouple DocParser from annotation classes Created: 15/Sep/13  Updated: 15/Sep/13  Resolved: 15/Sep/13

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

Type: Improvement Priority: Minor
Reporter: Yosmany Garcia Assignee: Benjamin Eberlei
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

It would be nice to have a "general purpose" docblocks parser, able to parse annotations without defining annotation classes



 Comments   
Comment by Benjamin Eberlei [ 15/Sep/13 ]

That is not our use case, take a look at the parser from phpdocumentor2, they can do that. Its standalone as well





[DCOM-214] Collection Criteria isNull does not work well Created: 12/Sep/13  Updated: 12/Sep/13

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

Type: Bug Priority: Minor
Reporter: Jan Pecek Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: collection, criteria, expression
Environment:

PHP 5.4.4, PostgreSQL 9.1



 Description   

I'm using the Collection project https://github.com/doctrine/collections and its Criteria building part. I'm not sure if I'm putting this bug to the good project. Please, correct me if not.

There is bug in method isNull: https://github.com/doctrine/collections/blob/master/lib/Doctrine/Common/Collections/ExpressionBuilder.php#L125

This produces SQL command where is 'IS ?' and null value is passed as param. This is fail.

Code example:

  $expr = Criteria::expr();
  $criteria = Criteria::create()
	->where($expr->lte('num', 42))
	->andWhere($expr->isNull('deleted'));
  return $this->myCollection->matching($criteria);

This produces SQL:

 SELECT ... FROM ... WHERE num <= ? AND deleted IS ? 

with params

[ 42, null ]





[GH-296] Proxies shouldn't serialize static properties in __sleep() (DCOM-212)

[DCOM-213] Merge DCOM-212 back into 2.4.x Created: 11/Sep/13  Updated: 21/May/14  Resolved: 21/Apr/14

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

Type: Sub-task Priority: Major
Reporter: Marco Pivetta Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: proxy


 Description   

Commit https://github.com/doctrine/doctrine2/commit/bb7f18ced76a553b00be563bed934c86d99afb73 should be backported into Doctrine 2.4.2



 Comments   
Comment by Guilherme Blanco [ 21/Apr/14 ]

Backported as of https://github.com/doctrine/doctrine2/commit/63c5758070dd39a9a4dcf6e97025f712850d7e7f

Comment by Thorry [ 21/May/14 ]

This issue seems to be incorrectly marked as resolved, the patch was not backported in the commit referenced and does not seem to be fixed at all.

Comment by Marco Pivetta [ 21/May/14 ]

It is resolved because it was merged into the release branch. Now it is included in tag 2.4.2





[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-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-209] [GH-291] [DDC-717] Add eval() and FILE_NOT_EXISTS strategies for proxy generation Created: 20/Aug/13  Updated: 13/Oct/14  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

Issue Links:
Reference
is referenced by DDC-2210 PHP warning in ProxyFactory when rena... Resolved

 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-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-207] Add AnnotationReader::getFunctionAnnotations() Created: 09/Jul/13  Updated: 09/Jul/13

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

Type: New Feature Priority: Trivial
Reporter: Benjamin Morel Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Currently, the annotation reader supports reading annotations on class, method and property.
This could be extended to read annotations on any kind of function, by adding the following methods:

public function getFunctionAnnotations(\ReflectionFunctionAbstract $function);
public function getFunctionAnnotation(\ReflectionFunctionAbstract $function, $annotationName);

This could be done without breaking BC in the following ways:

  • Keep the Reader interface as it is
  • Add a new interface, for example FullReader, that would extend Reader to add these two methods
  • Add the new methods to AnnotationReader, CachedReader, etc.
  • Update these classes to implement FullReader; thus they would still implement Reader and stay compatible.

Then, on the next major release (3.0.0), we could:

  • Add the two methods to Reader
  • Remove FullReader
  • Add a note to the UPGRADE file to rename FullReader to Reader in application code.

In case you're wondering why I'm proposing this feature, I'm developing a lightweight framework, which allows any method, function, or closure to be used as a controller.
I can currently parse annotations when using a class method, but cannot provide support for annotations on the others.

That would be a great addition.
I've checked the code, and it looks like the only difficulty would be to parse "use" statements for the file where the function is declared, whereas for now it is always assumed that there is a class, and that the file name will be inferred from there. But as ReflectionFunctionAbstract provides a getFileName() method, it's technically feasible as well.

Let me know what you think!
If you have no objection to the concept, I can start working on a PR for this feature.






[DCOM-206] [GH-287] Update EventManager.php Created: 02/Jul/13  Updated: 08/Sep/13  Resolved: 02/Jul/13

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

Type: Improvement Priority: Trivial
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 leedavis81:

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

Message:

Remove gender bias from method description.



 Comments   
Comment by Doctrine Bot [ 02/Jul/13 ]

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

Comment by Marco Pivetta [ 02/Jul/13 ]

Merged: https://github.com/doctrine/common/commit/6a39bb947b20d12a16820f2709509e41e28af005





[DCOM-205] Missing filenames from exception messages Created: 01/Jul/13  Updated: 24/Apr/14  Resolved: 24/Apr/14

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

Type: Improvement Priority: Minor
Reporter: Igor Wiedler Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   
  • Doctrine\Common\Persistence\Mapping\MappingException
  • "File mapping drivers must have a valid directory path, however the given path seems to be incorrect!"

This would be more helpful if it included a path name. There are probably other similar exceptions affected as well, so you might want to adjust others too.



 Comments   
Comment by Guilherme Blanco [ 24/Apr/14 ]

This issue seems to be already fixed in an earlier version. Closing as fixed.





[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-203] Ability to set defaultManager on ManagerRegistry Created: 21/Jun/13  Updated: 21/Jun/13

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

Type: Improvement Priority: Major
Reporter: Daniel Leech Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

We (in the CMF) need to be able to change the "default manager" name at runtime, to enable switching, for example, between Production and Staging workspaces.

This is currently not possible because defaultManager is private and there is no setter.

See: https://github.com/doctrine/DoctrinePHPCRBundle/issues/73






[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-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-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-197] [GH-280] Typo in MappingException Created: 10/Jun/13  Updated: 08/Sep/13  Resolved: 10/Jun/13

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

Type: Bug Priority: Minor
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 halaxa:

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

Message:



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

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

Comment by Marco Pivetta [ 10/Jun/13 ]

Merged at https://github.com/doctrine/common/commit/2286642f9979a15a799e6fb6919579e8caf6ef11





[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-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-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-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-192] [GH-274] Improve code on loadMetadata() to verify if class exists Created: 07/May/13  Updated: 11/Sep/14  Resolved: 08/May/13

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

Type: Improvement 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 entering:

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

Message:

Improve code on loadMetadata() to verify if class exists, avoid a later warning when calling class_parents()

Instead throws a \RuntimeException if class doesn't exists.

Before changing code, just after add test:
```
1) Doctrine\Tests\Common\Persistence\Mapping\ClassMetadataFactoryTest::testGetMetadataForAbsentClass
class_parents(): Class Doctrine\Tests\Common\Persistence\Mapping\AbsentClass does not exist and could not be loaded

/home/www/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php:38
/home/www/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:257
/home/www/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:281
/home/www/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:212
/home/www/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php:44
```



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

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

Comment by Marco Pivetta [ 08/May/13 ]

Merged

Comment by Doctrine Bot [ 11/Sep/14 ]

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





[DCOM-191] Wrong inflection for "identity" Created: 07/May/13  Updated: 22/Apr/14  Resolved: 22/Apr/14

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

Type: Bug Priority: Minor
Reporter: Tom Vogt Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None
Environment:

OS X and Linux, PHP 5.4.x



 Description   

console doctrine:generate:entities

For an association named "identities", the code generator creates the two methods
addIdentitie() and removeIdentitie() - apparently the inflector doesn't catch that it should be addIdentity and removeIdentity.



 Comments   
Comment by Guilherme Blanco [ 22/Apr/14 ]

As of https://github.com/doctrine/inflector/commit/dc02e4f73eb0938c35ddd60fa37825a98195a33f I added coverage to this issue and it does seem to work.





[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-189] Doctrine Proxies may conflict with interfaced constructors Created: 03/May/13  Updated: 24/Apr/14

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

Type: Improvement Priority: Minor
Reporter: Harmen M Assignee: Marco Pivetta
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The Doctrine ProxyGenerator generates for a proxy a constructor. The documentation of Doctrine states that the constructor is never called. For a project, I created a group of entities with a interfaced constructor in order to enforce a common interface. This results in a incompatible proxy and so a fatal error.



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

Cannot fix this - the constructor is required to override instantiation logic

Comment by Harmen M [ 03/May/13 ]

Edit: added the correct description. I accidentially submitted the form before editing the description.

Comment by Marco Pivetta [ 03/May/13 ]

Harmen M why do you have a constructor in an interface? That's a very bad practice, and it makes things quite hard to handle.

I can think of a workaround, but I first want to be sure there's a real advantage in changing the current implementation to use

unserialize()

just to handle this specific use case.

Comment by Benjamin Eberlei [ 03/May/13 ]

Adding __construct to an interface is an anti pattern and shouldn't be done.

Comment by Harmen M [ 03/May/13 ]

Ok, then I change my implementation.

But, maybe it is an idea to update the documentation of the ORM and state that constructor interfacing is not possible?
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/architecture.html

Comment by Marco Pivetta [ 18/Dec/13 ]

I actually had more requests for this feature on a similar project ( https://github.com/Ocramius/ProxyManager/issues/115 ).
I will mark this as feature request, but can't guarantee that it will get into Doctrine 2.x, since it may be a BC break.

Comment by Guilherme Blanco [ 24/Apr/14 ]

Creating interfaces with __construct ties your contract preventing extensibility points. This is nature of OOP and I do not consider this should be documented because it's (in-theory) expected that people have some level of knowledge in OO design when coding.

Closing this as invalid.

Comment by Marco Pivetta [ 24/Apr/14 ]

Re-opening.

While interfaced constructors are a known bad practice, changing constructor parameters is also a well known LSP violation (a minor one).

I'll keep tracking this, but I'm blocked by HHVM's missing Closure::bind() as of https://github.com/facebook/hhvm/issues/1203





[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-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-186] [GH-269] ProxyGenerator eval() proxy code when $autoGenerate is true Created: 28/Mar/13  Updated: 13/Oct/14  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

Issue Links:
Reference
is referenced by DDC-2210 PHP warning in ProxyFactory when rena... Resolved

 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-184] [GH-266] Add a new method to use a filter before extracting the metadata Created: 12/Mar/13  Updated: 21/Apr/14  Resolved: 21/Apr/14

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: 1
Labels: None


 Description   

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

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

Message:

Hi

I have notice that, when you use the doctrine:mapping:convert and doctrine:mapping:import command in symfony, the filter is added after all the metadata are extracting from the database.
In this case, when you have a table with no primary key for example, you cannot extract the mapping for only one entity.

I have also made a pull-request into the doctrineBundle and doctrine2 to fix this issue.
https://github.com/doctrine/DoctrineBundle/pull/161
https://github.com/doctrine/doctrine2/pull/603

What are your thought about my issue?



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

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

Comment by Guilherme Blanco [ 21/Apr/14 ]

Marking this issue as invalid in conformance with ORM resolution one: DDC-2335





[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-179] Underscore at the end of a label is not working with annotations Created: 03/Mar/13  Updated: 06/Dec/13  Resolved: 06/Dec/13

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

Type: Bug Priority: Minor
Reporter: exoon Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None
Environment:

apache2, php 5.4, mysql



 Description   

use Zend\Form\Annotation;

[...]

works:

* @Annotation\Options({"label":Namespace\Entity::LABEL})

or

* @Annotation\Options({"label":Namespace\Entity::_LABEL})

or

* @Annotation\Options({"label":Namespace\Entity::LA_BEL})

works not:

* @Annotation\Options({"label":Namespace\Entity::LABEL_})

Error message:

/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php:52

[Semantical Error] Couldn't find constant Namespace\Entity\::LABEL, property ...

The _ at the end is missing.



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

Provided a hotfix at https://github.com/doctrine/annotations/pull/19

Comment by Guilherme Blanco [ 06/Dec/13 ]

Implemented: https://github.com/doctrine/annotations/commit/0500074e2af1b3c9c6d6ea03d38fbd9f5ee7da71





[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-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-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-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-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-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-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-168] ignoredAnnotationNames doesn't work in Annotation loop Created: 27/Jan/13  Updated: 24/Apr/14  Resolved: 24/Apr/14

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

Type: Bug Priority: Minor
Reporter: James S Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None
Environment:

Mac OSX 10.6.8



 Description   

I'm just starting out with Doctrine, so my setup is a bit messy, but hopefully someone can figure out what is relevant from all my code.

Basically, I'm using Annotations on Doctrine ORM, and am integrating with Gedmo for several of their extensions.

I can run the CLI tool and update the schema, but when running via my web server, I'm getting the following error:

object(Doctrine\Common\Annotations\AnnotationException)[150]
  protected 'message' => string '[Semantical Error] The annotation "@Entity" in class Innertube\Models\Device was never imported. Did you maybe forget to add a "use" statement for this annotation?' (length=163)
  private 'string' (Exception) => string '' (length=0)
  protected 'code' => int 0
  protected 'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php' (length=211)
  protected 'line' => int 52
  private 'trace' (Exception) => 
    array
      0 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php' (length=201)
          'line' => int 592
          'function' => string 'semanticalError' (length=15)
          'class' => string 'Doctrine\Common\Annotations\AnnotationException' (length=47)
          'type' => string '::' (length=2)
          'args' => 
            array
              ...
      1 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php' (length=201)
          'line' => int 533
          'function' => string 'Annotation' (length=10)
          'class' => string 'Doctrine\Common\Annotations\DocParser' (length=37)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      2 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php' (length=201)
          'line' => int 297
          'function' => string 'Annotations' (length=11)
          'class' => string 'Doctrine\Common\Annotations\DocParser' (length=37)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      3 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php' (length=208)
          'line' => int 151
          'function' => string 'parse' (length=5)
          'class' => string 'Doctrine\Common\Annotations\DocParser' (length=37)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      4 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Annotations/CachedReader.php' (length=204)
          'line' => int 86
          'function' => string 'getClassAnnotations' (length=19)
          'class' => string 'Doctrine\Common\Annotations\AnnotationReader' (length=44)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      5 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php' (length=205)
          'line' => int 61
          'function' => string 'getClassAnnotations' (length=19)
          'class' => string 'Doctrine\Common\Annotations\CachedReader' (length=40)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      6 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php' (length=202)
          'line' => int 112
          'function' => string 'loadMetadataForClass' (length=20)
          'class' => string 'Doctrine\ORM\Mapping\Driver\AnnotationDriver' (length=44)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      7 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php' (length=228)
          'line' => int 302
          'function' => string 'doLoadMetadata' (length=14)
          'class' => string 'Doctrine\ORM\Mapping\ClassMetadataFactory' (length=41)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      8 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php' (length=228)
          'line' => int 205
          'function' => string 'loadMetadata' (length=12)
          'class' => string 'Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory' (length=64)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      9 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/orm/lib/Doctrine/ORM/EntityManager.php' (length=187)
          'line' => int 268
          'function' => string 'getMetadataFor' (length=14)
          'class' => string 'Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory' (length=64)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      10 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/libraries/lerteco_framework/libraries/vendor-composer/doctrine/orm/lib/Doctrine/ORM/EntityManager.php' (length=187)
          'line' => int 682
          'function' => string 'getClassMetadata' (length=16)
          'class' => string 'Doctrine\ORM\EntityManager' (length=26)
          'type' => string '->' (length=2)
          'args' => 
            array
              ...
      11 => 
        array
          'file' => string '/Users/jshannon/Documents/Work/Projects/InnerTube/Repo/web/packages/lerteco_innertube/api/routes/devices.php' (length=108)
          'line' => int 16
          'function' => string 'getRepository' (length=13)
          'class' => string 'Doctrine\ORM\EntityManager' (length=26)

The call that initiates this is getRepository(), which IS NOT in the CLI.

I've tracked it down to the fact that DocParser is not getting the list of names to ignore.

Oddly, it gets it the first time that it's called by AnnotationReader. However, DocParser->parse() calls $this->Annotations(), which calls $this->Annotation(), calls $this->collectAnnotationMetadata(), which then creates a new parser

self::$metadataParser = new self();

and eventually parses it

self::$metadataParser->parse()

, but DOES NOT pass its ignorednames.

This seems like an oversight, but it clearly works for a lot of people. My configuration code is:

                if (self::$isDevMode) {
			$cache = new \Doctrine\Common\Cache\ArrayCache;
		} else {
			$cache = new \Doctrine\Common\Cache\ApcCache;
		}

		\Doctrine\Common\Annotations\AnnotationReader::addGlobalIgnoredName('package');

		AnnotationRegistry::registerFile(__DIR__ . "/vendor-composer/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php");
		\Gedmo\DoctrineExtensions::registerAnnotations();

		

		$annotationReader = new \Doctrine\Common\Annotations\AnnotationReader();
		$cachedAnnotationReader = new \Doctrine\Common\Annotations\CachedReader($annotationReader, $cache);



		$annotationDriver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($cachedAnnotationReader, self::$namespaceArray);

		$config = new \Doctrine\ORM\Configuration;
		$config->setProxyNamespace('Proxy');
		$config->setAutoGenerateProxyClasses(self::$isDevMode); // this can be based on production config.
		// register metadata driver
		$config->setMetadataDriverImpl($annotationDriver);
		// use our allready initialized cache driver
		$config->setMetadataCacheImpl($cache);
		$config->setQueryCacheImpl($cache);

		if (defined('DIR_FILES_CACHE')) {
			$config->setProxyDir(DIR_FILES_CACHE);
		} else {
			$config->setProxyDir(sys_get_temp_dir());
		}

		// create event manager and hook prefered extension listeners
		$evm = new \Doctrine\Common\EventManager();

		$prefix = new TablePrefix(null);
		$prefix->useNamespace(true);
		$evm->addEventListener(\Doctrine\ORM\Events::loadClassMetadata, $prefix);


		$blameableListener = new \Gedmo\Blameable\BlameableListener();
		$blameableListener->setAnnotationReader($config->getMetadataDriverImpl()->getReader());
		//class_exists makes this usable with the command-line
		if (class_exists('\User') && ($u = new \User()) != false) {
			$blameableListener->setUserValue($u->getUserID());
		}
		$evm->addEventSubscriber($blameableListener);


		$timestampableListener = new \Gedmo\Timestampable\TimestampableListener();
		$timestampableListener->setAnnotationReader($config->getMetadataDriverImpl()->getReader());
		$evm->addEventSubscriber($timestampableListener);

		$config->addFilter('soft-deleteable', '\Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter');


		return EntityManager::create($connectionOptions, $config, $evm);

and the entity is (which sets up the repository) is:

namespace Innertube\Models;
defined('C5_EXECUTE') or die('Access Denied.');

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation as Gedmo;

/**
 * @ORM\Entity(repositoryClass="DeviceRepository") @ORM\Table(name="Devices")
 * @Gedmo\SoftDeleteable(fieldName="deletedOn")
 **/
class Device {

and the repository is:

namespace Innertube\Models;
defined('C5_EXECUTE') or die('Access Denied.');

use Doctrine\ORM\EntityRepository;

class DeviceRepository extends EntityRepository {


 Comments   
Comment by Guilherme Blanco [ 24/Apr/14 ]

As of https://github.com/doctrine/annotations/commit/01ddf2cfa8aaf08d1f22d535471b62b039df1222 I added coverage to your issue which was already resolved earlier.





[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-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-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-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-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-161] [GH-243] Update composer.json Created: 11/Jan/13  Updated: 21/Apr/14  Resolved: 21/Apr/14

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   

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

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

Message:

Add `provide` part as `doctrine/common` >=2.2,<2.4 has cache in it.



 Comments   
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 Guilherme Blanco [ 21/Apr/14 ]

Issue got closed, so closing it here also. =)





[DCOM-160] [GH-242] adds a simple manager registry Created: 10/Jan/13  Updated: 10/Jan/13

Status: Open
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: Unresolved Votes: 0
Labels: None


 Description   

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

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

Message:

This registry adds some sane defaults and just requires a simple callable to be fully functional.






[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-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-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-152] [GH-234] Criteria filtering doesn't work with DateTime instance Created: 17/Dec/12  Updated: 21/Apr/14  Resolved: 21/Apr/14

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: Won't Fix Votes: 0
Labels: None


 Description   

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

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

Message:

Filtering associations doesn't work with DateTime instance as a comparison value because filtering uses === operator. It works with SQL backed filtering, but not on PHP collection level.

```php
$criteria = Criteria::create()
>where(Criteria::expr()>eq("birthday", new \DateTime("1982-02-17")))
->orderBy(array("username" => "ASC"))
->setFirstResult(0)
->setMaxResults(20)
;
```



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

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

Comment by Guilherme Blanco [ 21/Apr/14 ]

As a resolution happened 3 months ago, this issue is now marked as won't fix.

Commit reference: https://github.com/doctrine/collections/commit/5e2d9cfe6a3d8eb2906f805a27c27ba3e5f2140c





[DCOM-151] [GH-233] [DocParser] Fix trying include classes if its must be ignored. Created: 10/Dec/12  Updated: 21/Apr/14  Resolved: 21/Apr/14

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: Guilherme Blanco
Resolution: Fixed 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/233

Message:

I recreate pull request (add test). Without fix test is failure.



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

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

Comment by Marco Pivetta [ 03/Dec/13 ]

Provided a cleaned up version at https://github.com/doctrine/annotations/pull/18

Comment by Guilherme Blanco [ 21/Apr/14 ]

As of https://github.com/doctrine/annotations/commit/1ac675c80dfdf8164ca7d435770adf5bda7b2a68 this issue is now fixed.





[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-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-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-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-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-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-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-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-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-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-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-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-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-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-130] Paths in Doctrine\Common\Cache\FileCache could create large directory indexes Created: 23/Oct/12  Updated: 05/Jul/13

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

Type: Bug Priority: Minor
Reporter: R Churchill Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Any



 Description   

The way paths are created within FileCache currently, there is a theoretical maximum of 16^12 directories in the cache directory, which is quite a large number. Usually schemes like this are used to restrict the number of files in one directory.

Comparing with git, for example, the dirs are arranged

00/
1c/
...
ff/

and then the object store within those directories, which is a lot more manageable, say if you happen to type ls in the cache directory, you will get a maximum listing of 256 dirs. PhpThumb does something similar when caching images.

How about something like this for getFilename():

$idHash = md5($id);
$path = substr($idHash, 0, 2) . DIRECTORY_SEPARATOR . substr($idHash, 2, 2) . DIRECTORY_SEPARATOR . substr($idHash, 4);
$path = $this->directory . DIRECTORY_SEPARATOR . $path;

return $path . $id . $this->extension;

Not nearly so elegant, but I think this has better properties for the file system. Also I would be tempted to use one of the sha family hashes and not to include the $id within the filename, but perhaps this is helpful for debugging?



 Comments   
Comment by Julian Higman [ 10/May/13 ]

We hit this problem in a live system - with a lot of cached items, the number of subdirectories that FileCache creates can exceed the number that an ext3 filesystem allows in a single directory (about 32000).

After that, an attempt to cache a new item can get an error like this:

mkdir() [function.mkdir]: Too many links

Our solution was similar to that suggested:


    protected function getFilename($id) {
        $path = implode(str_split(md5($id), 2), DIRECTORY_SEPARATOR);
        $path = $this->directory . DIRECTORY_SEPARATOR . $path;
        return $path . DIRECTORY_SEPARATOR . $id . $this->extension;
    }

It splits the md5 of the item id into parts of length 2, rather than the original 12. This creates a deeply nested structure, but which won't ever exceed the limit on number of subdirectories in any one directory. It's the same subdirectory pattern used by default by Apache mod_disk_cache, as well.

Comment by Julian Higman [ 05/Jul/13 ]

After a couple of months in production, we ran into another problem with this - we reached the maximum number of inodes in the fielsystem.

The resulting errors look like this:

mkdir() [function.mkdir]: No space left on device

There is actually disk space left, but looking at the inodes shows that the limit has been hit:

-bash-3.2# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 6553600 6553600 0 100% /

The creation of directories and subdirectories can be constrained slightly by using 3 instead of 2 characters (with hex chars, that will give max of 16^3 = 4096 subdirectories per directory, still less than the ext3 limit of 32000)

$path = implode(str_split(md5($id), 2), DIRECTORY_SEPARATOR);

but ultimately the inodes will still all be used up.

The only other options are pruning the cache at intervals, or switching to a different caching strategy altogether.

Comment by Marco Pivetta [ 05/Jul/13 ]

Julian Higman I'd suggest file-based caching mechanisms are not suited for that environment. The file cache is really meant for all those environments where there's strict constraints (like shared hosting).





[DCOM-129] Annotation parser matches colon after annotation Created: 21/Oct/12  Updated: 15/May/14  Resolved: 15/May/14

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

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


 Description   

Code

/**
* Removes given $node from the tree and reparents its descendants
*
* @todo may be improved, to issue single query on reparenting
* @param object $node
* @throws RuntimeException - if something fails in transaction
* @return void
*/
public function removeFromTree($node)
{

fails with `[Semantical Error] The annotation "@todo:" in method Gedmo\Tree\Entity\Repository\ClosureTreeRepository::removeFromTree() was never imported. Did you maybe forget to add a "use" statement for this annotation?`.

As you see it tryes find annotation with name "@todo:". Don't know, maybe rtrim($name, ':') would enough.



 Comments   
Comment by Guilherme Blanco [ 15/May/14 ]

Issue seems to be already fixed over 6 months ago. Please reopen if still valid.





[DCOM-128] RedisCache uses IGBINARY which is not always available Created: 20/Oct/12  Updated: 03/Dec/13  Resolved: 03/Dec/13

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

Type: New Feature Priority: Minor
Reporter: Sander Marechal Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

The RedisCache uses Redis::SERIALIZER_IGBINARY. See https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Cache/RedisCache.php line 47.

The problem is that the php Redis extension can be compiled without IGBINARY support. In that case, this code causes a fatal error because the constant does not exist.

The DotDeb package of php5-redis (often used on Debian systems) for example comes compiled without IGBINARY support.

The code should probably check if the constant exists. If not, the default to Redis::SERIALIZER_PHP



 Comments   
Comment by Peter Mitchell [ 24/Jun/13 ]

This appears like it will be fixed when 2.4 is released https://github.com/doctrine/cache/blob/master/lib/Doctrine/Common/Cache/RedisCache.php#L128

Comment by Marco Pivetta [ 03/Dec/13 ]

Already fixed in master





[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-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-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-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-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-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-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-118] [GH-195] Add failing test to demonstrate parse error when @ is present in the description Created: 02/Oct/12  Updated: 21/Apr/14  Resolved: 21/Apr/14

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   

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

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

Message:

If someone can take this and fix the issue it'd be great. I couldn't figure it out at a quick glance and I don't really have time, but it's a pretty messed up bug and not so trivial to debug if you don't know what happens in the background so I'd say it's pretty important.



 Comments   
Comment by Philipp Scheit [ 02/Oct/12 ]

I digged a little deeper. The test case is a great one
The DocLexer cuts ut -1 position from the first @ (which is the @ in the @example.com). so that the lexer has to process:

o@example.com"
     * }
     *
     * @AnnotationTargetPropertyMethod("Bar")

So that the catchable pattern: ("(?:[^"]|"")*") matches here to greedy (it matches string in quotes):

"
     * }
     *
     * @AnnotationTargetPropertyMethod("

As a result the lexer does not catch the correct @ from the Annotation

I could not think of a fast fix for this. But maybe tomorrow.
(leaving quoted string pattern with an @ was a wrong idea)

Its not a workaround to do more or less cutting in the parser, because not-well-formed quoted strings would break anyway

Comment by Philipp Scheit [ 03/Oct/12 ]

can someone think of a case, where a string (in some annotation) has a newline in it? Otherwise the tests do not fail, when I leave the string matching pattern with a newline.
I still had another idea to restrict the position of a annotation more strictly to:

  • the beginning of a new line (\s**\s* before)
  • in another annotation

but the second is not solvable with the lexer itself and would transfer the quoted string matching to the parser, because it needs context.

I'll let seldaek pull, what I have (is this the right way?)

Comment by Marco Pivetta [ 03/Dec/13 ]

PR @ https://github.com/doctrine/annotations/pull/17

Comment by Doctrine Bot [ 25/Mar/14 ]

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

Comment by Guilherme Blanco [ 21/Apr/14 ]

This fix was merged in latest master





[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-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-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-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-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-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-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-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