[DCOM-288] Doctrine uses = operator instead of <= Created: 29/Jun/15  Updated: 30/Jun/15

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

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

Windows 7.0 for dev, MySQL5.6



 Description   

I'm trying to force Doctrine to use LTE operator on activeFrom field (datetime field), but instead EQ operator is used while matching() the many-to-many relation:

    /**
     * @return SubjectInterface[]
     */
    public function getSubjects()
    {
        $expr = Criteria::expr();

        return $this->subjects->matching(
            Criteria::create()
                ->where($expr->eq('deleted', 0))
                ->andWhere($expr->eq('active', 1))
                ->andWhere($expr->lte('activeFrom', date('Y-m-d H:i:s'))
            )
        );
    }

creates SQL as below

SELECT te.id AS id, te.name AS name, te.active AS active, te.activeFrom AS activeFrom, te.position AS position, te.shortDescription AS shortDescription, te.description AS description, te.deleted AS deleted, te.dateCreated AS dateCreated, te.hasChat AS hasChat, te.owner_id AS owner_id FROM subject te JOIN subject_users t ON t.subject_id = te.id WHERE t.user_id = '6' AND te.deleted = '0' AND te.active = '1' AND te.activeFrom = '2015-06-29 13:50:53'

I used date(...), because I get errors with DateTime. Doctrine schema validator says my mappings are ok.

// user entity

    /**
     * @var Subject[]|ArrayCollection
     * @ORM\ManyToMany(targetEntity="Subject", inversedBy="users", indexBy="id")
     * @ORM\JoinTable(name="subject_users")
     * @ORM\OrderBy({"name"="asc"})
     */
    protected $subjects;

// subject entity

    /**
     * @var User[]|ArrayCollection
     * @ORM\ManyToMany(targetEntity="User", mappedBy="subjects", fetch="EXTRA_LAZY", indexBy="id")
     * @ORM\OrderBy({"surname" = "ASC"})
     * @ORM\JoinTable(name="subject_users",
     *     joinColumns={@ORM\JoinColumn(name="subject_id", referencedColumnName="id")},
     *     inverseJoinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}
     * )
     */
    protected $users;


 Comments   
Comment by Mike [ 30/Jun/15 ]

I wonder, if you could please tell me where query generation takes place I could debug what's happening under the hood. Probably I am not doing something right.





[DCOM-287] [GH-369] [RFC] Load parent classes when loading metadata from cache Created: 22/May/15  Updated: 22/May/15

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

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

Message:

This can be done more neatly, but before putting more time in it I'd like to check if it's a good idea.
I came across this solution because we had a problem with Gedmo extensions when caching metadata in Redis, this is our scenario:
```
Class A extends B;
```
``Class B`` has a ``Gedmo extension`` mapped field.

On first request metadata for both ``Class A`` and ``Class B`` is cached in Redis.

On second request ``AbstractClassMetadataFactory`` loads ``Class A`` from Redis.

Gedmo extension loops through all ``Class A`` parents and calls method ``hasMetadataFor($parentClass)`` in ``AbstractClassMetadataFactory``, only ``Class A`` metadata has been loaded previously, therefore ``hasMetadataFor($parentClass)`` returns false, and ``Gedmo`` then skips the parent class.

Should Gedmo exension load the metadata for the parent class or should it be done as proposed in this PR?






[DCOM-286] [GH-367] Fix how namespace matching happens in SymfonyFileLocator Created: 08/May/15  Updated: 08/May/15

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

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

Message:

The problem was that namespace prefixes can overlap, and for classes
that would match more than one prefix only the first prefix would be
tested for. This meant that the findMappingFile and fileExists functions
would return different results depending on the order of the stored
prefixes.

For these methods to return the correct values the prefixes must be
listed in order of most to least specific. For example

['Vendor\Package\Entities', 'Vendor\Package\Entities\Blog']

would return the wrong result whereas

['Vendor\Package\Entities\Blog', 'Vendor\Package\Entities']

would return the correct one.

This changeset simply allows the class to be compared to more than one prefix, and updates one test as an exception message has changed.






[DCOM-285] [GH-366] Update DefaultFileLocator.php to reflect that file extension should include a dot Created: 28/Apr/15  Updated: 29/Apr/15  Resolved: 29/Apr/15

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

Type: Documentation Priority: Minor
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: docblock, documentation, file-locator


 Description   

This issue is created automatically through a Github pull request on behalf of marcel-burkhard:

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

Message:

It is implicit that a file extension needs a dot, thus it is unclear that we need to supply it in $fileExtension. I actually wasted quite some time trying to figure out what I'm doing wrong.



 Comments   
Comment by Doctrine Bot [ 29/Apr/15 ]

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

Comment by Doctrine Bot [ 29/Apr/15 ]

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





[DCOM-284] No Way to Get Cached File Creation Time? Created: 26/Apr/15  Updated: 26/Apr/15

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

Type: New Feature Priority: Minor
Reporter: Chad Sikorra Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I want to use the FilesystemCache type to store an object that gets created by parsing a large chunk of YAML. If the YAML modifcation time is greater than the cache file creation time, then I refresh the cache. However, I cannot seem to find any method that will let me actually get this information (the time that the cache file was created).

I could just use the getFilename() method of the FileCache class then use PHP functions to get the creation time, but the method is marked as protected. Is that just to keep it inline with only the methods defined on the interface? It would be nice to be able to somehow get this information.






[DCOM-283] ArrayCollection::matching() and PersistentCollection::matching() keys mismatch Created: 14/Apr/15  Updated: 14/Apr/15

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

Type: Bug Priority: Major
Reporter: Anton Serdyuk Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I have this code in my project

public function getAByB(B $b)
    {
        $as = $this->as->matching(
            Criteria::create()
                ->where(
                    Criteria::expr()->eq('b', $b)
                )
        );

        if (count($as) === 0) {
            throw new \Exception('Can not find a for b');
        }

        return $as[0];
    }

This code works fine when dealing with EXTRA_LAZY collections. But when I do not persist data in my tests and thereby use simple ArrayCollection for "as" property, this code fails. Because "ArrayCollection::matching()" method preserves keys here:

        if ($expr) {
            $visitor  = new ClosureExpressionVisitor();
            $filter   = $visitor->dispatch($expr);
            $filtered = array_filter($filtered, $filter);
        }

In theory this code should be rewritten this way:

        if ($expr) {
            $visitor  = new ClosureExpressionVisitor();
            $filter   = $visitor->dispatch($expr);
            $filtered = array_values(array_filter($filtered, $filter));
        }





[DCOM-282] Use call_user_func_array in proxy classes Created: 09/Apr/15  Updated: 09/Apr/15

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

Type: Improvement Priority: Major
Reporter: Jack Sleight Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Reference
relates to DDC-3481 [GH-1241] [3.0] [POC] lazy-load on a ... Open

 Description   

At the moment the proxy generator creates methods like this:

    public function type()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'type', array());

        return parent::type();
    }

However, this breaks methods in the entity class that rely on func_num_args or func_get_args (eg. a method that can have variable arguments), as only the defined arguments are passed through to the parent method.

I would like to suggest changing the proxy generator to output code like this:

    public function type()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'type', array());

        $args = func_get_args();
        return call_user_func_array('parent::type', $args);
    }

So that all arguments are passed through.

I'd be happy to create a pull request for this, unless there's a reason why you wouldn't want to do it that way?



 Comments   
Comment by Marco Pivetta [ 09/Apr/15 ]

This is indeed a known issue, and it wasn't fixed due to performance reasons.

You may want to check https://github.com/doctrine/doctrine2/pull/1241, which also fixes this issue.





[DCOM-281] [GH-361] Fix static call in test Created: 27/Mar/15  Updated: 02/Apr/15  Resolved: 02/Apr/15

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

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


 Description   

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

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

Message:

Two tests were failing with the following error message:

Non-static method PHPUnit_Framework_MockObject_Generator::getMock()
should not be called statically, assuming $this from incompatible
context



 Comments   
Comment by Doctrine Bot [ 02/Apr/15 ]

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

Comment by Doctrine Bot [ 02/Apr/15 ]

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





[DCOM-280] [GH-359] Fixed missing / incorrect docblocks Created: 15/Mar/15  Updated: 15/Mar/15  Resolved: 15/Mar/15

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

Type: Documentation Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: docblock, metadata


 Description   

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

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

Message:



 Comments   
Comment by Doctrine Bot [ 15/Mar/15 ]

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

Comment by Doctrine Bot [ 15/Mar/15 ]

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





[DCOM-279] Allow AbstractProxyFactory to load proxies by autoloading Created: 05/Mar/15  Updated: 05/Mar/15

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

Type: Improvement Priority: Major
Reporter: John Flatness Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The AbstractProxyFactory supports several modes for proxy auto-generation. But, all of them, even AUTOGENERATE_NEVER, currently use an explicit require (or direct code evaluation for AUTOGENERATE_EVAL).

Being able to have the proxy factory skip the require would allow you to use autoloading to find and load the proxies when needed. Doctrine of course already has the concept of proxy autoloading, but only for use in deserialization and related contexts, but being able to skip the require here would allow autoloading to be used for Doctrine's normal loading of the proxies as well. This would allow alternative organizational structures, like storing and loading proxies in more than one directory, without requiring major changes to Doctrine or the tooling to support them.

It looks like the change could be as simple as a flag for the proxy factory, or an additional mode AUTOLOAD or AUTOGENERATE_NEVER_AUTOLOAD. Obviously this would be something users would need to opt-in for, as the default behavior currently present suffices for the majority of setups.






[DCOM-278] [GH-358] travis: PHP 7.0 nightly added, allowed failure Created: 02/Mar/15  Updated: 02/Mar/15  Resolved: 02/Mar/15

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: php-7.0


 Description   

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

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

Message:



 Comments   
Comment by Doctrine Bot [ 02/Mar/15 ]

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

Comment by Doctrine Bot [ 02/Mar/15 ]

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





[DCOM-277] [GH-357] Custom namespace separators for SymfonyFileLocator Created: 24/Feb/15  Updated: 25/Feb/15  Resolved: 25/Feb/15

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

Type: New Feature Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: file-locator, mapping, metadata, separator


 Description   

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

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

Message:

As a Symofony user I'm tired of storaging dozens of yml metadata files within `config\doctrine` folder as a plain list. Current implementation of `SymfonyFileLocator` fails to loopback class name due to automatic convertation extra classname separators behind default `Entity` prefix to dots, so placing yaml metadata files into nested folders does not work at all.

This also covers some other people needs as I see by
http://stackoverflow.com/questions/14530782/symfony2-doctrine-entity-subdirectories
http://stackoverflow.com/questions/20998622/is-anybody-knows-how-organize-orm-yml-for-symfony-2-x

I've implemented custom namespace separator value to be substitued when `SymfonyFileLocator` lookup classname and converts filename to classname, allowing to store entity mapping with the same structure are placed, i.e with `DIRECTORY_SEPARATOR` used

Foo\Bar => config/doctrine/Foo/Bar.orm.yml
Baz => config/doctrine/Baz.orm.yml

etc.

I've added a bunch of test to be sure I've not broken something, with 3 examples of usage.

  • Classic - dot (`.`) separator. This is default for keeping BC
  • `DIRECTORY_SEPARATOR` - for representing namespaces as `PSR-4` / `PSR-0` structure with according prefix
  • Underscore (`_`) separator - as another way, which corresponds to `PSR-0` autoloading but as same list as with dots

Local (Windows, PHP 5.6) and Travis tests are passed

https://travis-ci.org/scaytrase/doctrine-common/builds/51995201



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

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

Comment by Doctrine Bot [ 25/Feb/15 ]

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





[DCOM-276] [GH-356] Identifier getters now found in traits when generating proxies. Created: 23/Feb/15  Updated: 23/Feb/15

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


 Description   

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

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

Message:

Related to http://www.doctrine-project.org/jira/browse/DDC-2556

TODO: Add test cases



 Comments   
Comment by Doctrine Bot [ 23/Feb/15 ]

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





[DCOM-275] Collections\Expr\ClosureExpressionVisitor should support private properties as well as SQL visitors do. Created: 20/Feb/15  Updated: 14/Apr/15

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

Type: Bug Priority: Major
Reporter: Anton Serdyuk Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Reference
relates to DCOM-249 Criteria are unable to locate getters... Open
relates to DDC-2838 Leaky abstraction when applying Crite... Awaiting Feedback

 Description   

Given I have some entity method like this:

    public function hasNewComments()
    {
        $newComments = $this->comments->matching(
            Criteria::create()
                ->where(Criteria::expr()->eq('new', true))
        );

        return count($newComments) > 0;
    }

Where $this->comments is OneToMany collection.

If $this->comments is EXTRA_LAZY, then this code will always produce SQL query to database and always will work fine. But if it is not EXTRA_LAZY and appears to be loaded before (for eample count($this->comments) was called before), then this code will produce error "Trying to get private property Comment::$new from ClosureExpressionVisitor context".

I thins we should have something like reflection or \Closure::bind() stuff to get actual field value within ClosureExpressionVisitor regardless this field is private or public.

I know I can create getter getNew() or isNew(), but I believe this is known to be a good OOP practice to avoid unnecessary getters, and I am not sure collection api should make this decision for me.



 Comments   
Comment by Anton Serdyuk [ 14/Apr/15 ]

This issue is related to DCOM-249 and DDC-2838. I think this issue provides more clear understanding of the underlying problem than these two.





[DCOM-274] [GH-355] Added Magic Function For EntityManger Created: 20/Feb/15  Updated: 20/Feb/15  Resolved: 20/Feb/15

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

Type: Improvement Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: object-repository, persistence, repository


 Description   

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

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

Message:

  • findArrayResultBy
  • findOneArrayResultBy

[pullrequest] (https://github.com/doctrine/doctrine2/pull/1306)



 Comments   
Comment by Doctrine Bot [ 20/Feb/15 ]

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

Comment by Doctrine Bot [ 20/Feb/15 ]

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





[DCOM-273] [GH-353] Support for Variadic arguments (PHP 5.6 - Argument unpacking) Created: 09/Feb/15  Updated: 26/Mar/15

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: php-5.6, proxy, proxy-generator, splat

Issue Links:
Dependency
is required for DCOM-272 Proxy generator doesn't understand sp... Resolved
Reference
relates to DCOM-272 Proxy generator doesn't understand sp... Resolved

 Description   

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

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

Message:

See http://www.doctrine-project.org/jira/browse/DCOM-272

It converts
```php
/**

  • @param ...$types
    */
    public function addType(...$types)
    {
    }
    ```

into
```php
/**

  • {@inheritDoc}

    */
    public function addType(...$types)

    { $this->__initializer__ && $this->__initializer__->__invoke($this, 'addType', array($types)); return parent::addType(...$types); }

    ```

This works but I don't know if the `__invoke` call is correct.



 Comments   
Comment by Doctrine Bot [ 09/Feb/15 ]

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

Comment by Doctrine Bot [ 26/Mar/15 ]

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





[DCOM-272] Proxy generator doesn't understand splat operator (PHP 5.6 argument unpacking) Created: 09/Feb/15  Updated: 26/Mar/15  Resolved: 26/Mar/15

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

Type: Bug Priority: Major
Reporter: Ruud Kamphuis Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: code, php-5.6, proxy, proxy-generator, splat

Issue Links:
Dependency
depends on DCOM-273 [GH-353] Support for Variadic argumen... Open
Reference
is referenced by DCOM-273 [GH-353] Support for Variadic argumen... Open

 Description   

I have a function inside my entity that uses variadic arguments (argument unpacking) using the PHP 5.6 splat operator:

public function addReference(...$references) {}

But the proxy generator doesn't take that into account when generating the proxies:

    /**
     * {@inheritDoc}
     */
    public function addReference($references)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'addReference', array($references));

        return parent::addReference($references);
    }

Resulting in this error:

Runtime Notice: Declaration of Proxies\__CG__\AccountingBundle\Entity\Journal::addReference() should be compatible with AccountingBundle\Entity\Journal::addReference(...$references)

The solution would be to add this to the ProxyGenerator generateMethods method:

                if (method_exists($param, 'isVariadic')) {
                    if ($param->isVariadic()) {
                        $parameterString .= '...';
                        $argumentString .= '...';
                    }
                }


 Comments   
Comment by Marco Pivetta [ 09/Feb/15 ]

Ruud Kamphuis I knew this was coming, heh.

Can you actually provide the fix as a PR with a test?

Comment by Ruud Kamphuis [ 09/Feb/15 ]

haha I really want to create PR for it, but I'm just curious how we are going to test this on multiple PHP versions? Because isVariadic only works in PHP 5.6. Do the ProxyGenerator tests compare the output of the generated PHP scripts?

Comment by Marco Pivetta [ 09/Feb/15 ]

Ruud Kamphuis something like following:

Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
public function testZehSplatThing()
{
    if ( ! method_exists('ReflectionParameter', 'isVariadic')) {
        $this->markTestSkipped('PHP 5.6+ only test');
    }

    // ...
}
Comment by Ruud Kamphuis [ 09/Feb/15 ]

I created a PR for this https://github.com/doctrine/common/pull/353

Could you check my question regarding the __invoke call?

Comment by Doctrine Bot [ 09/Feb/15 ]

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

Comment by Marco Pivetta [ 09/Feb/15 ]

Ruud Kamphuis I think single parameter is fine for now, as it is consistent and easy to handle on the closure side

Comment by Doctrine Bot [ 26/Mar/15 ]

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





[DCOM-271] [GH-352] SymfonyFileLocator: DIRECTORY_SEPARATOR instead of slash Created: 02/Feb/15  Updated: 25/Mar/15  Resolved: 25/Mar/15

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

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Incomplete Votes: 0
Labels: directory-separator, file-locator, windows


 Description   

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

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

Message:

It could case some odd behaviour especially on Windows.



 Comments   
Comment by Doctrine Bot [ 25/Mar/15 ]

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

Comment by Doctrine Bot [ 25/Mar/15 ]

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





[DCOM-270] [GH-351] Added validation where allowed QCNs with ":" NS separator Created: 01/Feb/15  Updated: 16/Feb/15  Resolved: 16/Feb/15

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: alias, aliases, classmetadatafactory, metadata


 Description   

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

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

Message:

Added validation where allowed QCNs with ":" NS separator

*Before:*
```MyEntityNamespace:Foo:Bar``` resolves (silently) to ```MyEntityNamespace:Foo```

*After:*
```MyEntityNamespace:Foo:Bar``` throws ```\InvalidArgumentException```

Q A
-------------
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets none
License MIT
Doc PR none


 Comments   
Comment by Doctrine Bot [ 01/Feb/15 ]

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

Comment by Doctrine Bot [ 16/Feb/15 ]

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





[DCOM-269] [GH-350] Made PATTERN_MATCH_ID_METHOD more flexible Created: 23/Jan/15  Updated: 25/Mar/15

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 4alexandr:

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

Message:

PATTERN_MATCH_ID_METHOD match any valid function declaration, example:
function getId()

{return$this->id;}

 Comments   
Comment by Doctrine Bot [ 25/Mar/15 ]

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





[DCOM-268] [GH-349] Add autoload to composer.json Created: 20/Jan/15  Updated: 20/Jan/15  Resolved: 20/Jan/15

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

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

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

Message:



 Comments   
Comment by Doctrine Bot [ 20/Jan/15 ]

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

Comment by Doctrine Bot [ 20/Jan/15 ]

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





[DCOM-267] [GH-348] 2.0.x Created: 20/Jan/15  Updated: 20/Jan/15  Resolved: 20/Jan/15

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

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

Message:

Add autoload to composer.json



 Comments   
Comment by Doctrine Bot [ 20/Jan/15 ]

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

Comment by Doctrine Bot [ 20/Jan/15 ]

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





[DCOM-266] FileCache extension should also support the `/` character Created: 15/Jan/15  Updated: 15/Jan/15  Resolved: 15/Jan/15

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

Type: Bug Priority: Major
Reporter: Marco Pivetta Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: cache, escaping, file-estension, lfi, path


 Description   

See https://github.com/doctrine/cache/commit/907393ce5a36c1c4b4d0e6e8395fcd71fe6abd6c#commitcomment-9298883

$extension is not correctly escaped when it contains a "/" character.






[DCOM-265] Criteria Comparing 2 date fields will always be false Created: 11/Jan/15  Updated: 11/Jan/15  Resolved: 11/Jan/15

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

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

Attachments: File CriteriaTest.php    
Issue Links:
Duplicate
duplicates DCOM-152 [GH-234] Criteria filtering doesn't w... Resolved

 Description   

Comparing 2 DateTime objects with an equal criteria will never match unless it's the same instance. Using the other operators however will work as expected because php treats datetime like numbers in that case.



 Comments   
Comment by Marco Pivetta [ 11/Jan/15 ]

This is a known issue that we cannot fix at the moment. See DCOM-152





[DCOM-264] Tag a new minor version of Doctrine/Lexer Created: 04/Jan/15  Updated: 04/Jan/15  Resolved: 04/Jan/15

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

Type: Task Priority: Minor
Reporter: Eduardo Gulias Davis Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: None


 Description   

As there is no section for https://github.com/doctrine/lexer I put this here.
For some reason I can't figure out, requiring "doctrine/lexer":"dev-master" prevents my library from being installed unless "doctrine/lexer":"dev-master" is required in the root of the program using the lib.
For more examples see https://github.com/egulias/EmailValidator/issues/40

I think this would be easily solved by taging doctrine/lexer to version 1.0.1 since version 1 is almost a year old and good improvements have made it into the it.

Thanks!



 Comments   
Comment by Marco Pivetta [ 04/Jan/15 ]

This is handled via https://github.com/doctrine/lexer/releases/tag/v1.0.1

Comment by Eduardo Gulias Davis [ 04/Jan/15 ]

Thanks!





[DCOM-263] [GH-347] Class loader: skip non-existing files and files not containing the requested class Created: 31/Dec/14  Updated: 01/Jan/15  Resolved: 01/Jan/15

Status: Resolved
Project: Doctrine Common
Component/s: Class Loading
Affects Version/s: 2.4.2
Fix Version/s: 2.5.0

Type: Improvement Priority: Major
Reporter: Doctrine Bot Assignee: Steve Müller
Resolution: Fixed Votes: 0
Labels: class, silent-autoloader


 Description   

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

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

Message:

See https://github.com/doctrine/common/pull/345#discussion_r22356775



 Comments   
Comment by Doctrine Bot [ 31/Dec/14 ]

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

Comment by Doctrine Bot [ 31/Dec/14 ]

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

Comment by Doctrine Bot [ 01/Jan/15 ]

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





[DCOM-262] [GH-345] Cleanup: class loader deprecation and simplification Created: 25/Dec/14  Updated: 31/Dec/14  Resolved: 26/Dec/14

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

Type: Improvement Priority: Minor
Reporter: Doctrine Bot Assignee: Steve Müller
Resolution: Fixed Votes: 0
Labels: class, loader, loading


 Description   

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

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

Message:

Time to get rid of this thing: marking it as deprecated.



 Comments   
Comment by Doctrine Bot [ 26/Dec/14 ]

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

Comment by Doctrine Bot [ 31/Dec/14 ]

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





[DCOM-261] [GH-344] Fix fatal error when classexist tries to call the protected loader Created: 25/Dec/14  Updated: 25/Dec/14  Resolved: 25/Dec/14

Status: Resolved
Project: Doctrine Common
Component/s: Class Loading
Affects Version/s: 2.4.2
Fix Version/s: 2.5.0, 2.4.3

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Fixed Votes: 0
Labels: autoloader, callable, visibility


 Description   

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

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

Message:

Fix fatal error when `Doctrine\Common\ClassLoader::classExists` tries call the protected loader



 Comments   
Comment by Doctrine Bot [ 25/Dec/14 ]

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

Comment by Doctrine Bot [ 25/Dec/14 ]

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





[DCOM-260] Allow positional and named parameters for annotations Created: 10/Dec/14  Updated: 14/Dec/14  Resolved: 14/Dec/14

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

Type: Improvement Priority: Minor
Reporter: Javier Eguiluz Assignee: Benjamin Eberlei
Resolution: Can't Fix Votes: 0
Labels: None


 Description   

When using annotations, is very common to repeatedly use the same set of parameters. For instance, when using the @Route annotation is common to define just the path and its name.

With the current Doctrine annotations, you can only have one unnamed argument (in this case, the path) and the rest of parameters (in this case, the route name) must define their names:

// this is how it works
@Route("/", name="homepage")

// this doesn't work, but it'd be great if it did
@Route("/", "homepage")

This issue just asks Doctrine managers if they are willing to enhance annotations to allow for named, positional and mixed parameters:

 /**
  * // named parameters
  * @Assert(expression = "value > 18", message="You must be 18 years old or older.")
  *
  * // mixed parameters
  * @Assert("value > 18", message="You must be 18 years old or older.")
  *
  * // positional parameters
  * @Assert("value > 18", "You must be 18 years old or older.")
  */
private $age;


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

This issue just asks Doctrine managers if they are willing to enhance annotations to allow for named, positional and mixed parameters

I suggest you to directly open a pull request, since we don't have anyone who would work on it (resource-wise) in first place

Comment by Javier Eguiluz [ 14/Dec/14 ]

I'm closing this issue because I can't fix it and Doctrine project doesn't have the resources to do it.





[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 in AbstractClassMetadataFactory Created: 11/Nov/14  Updated: 13/Jan/15  Resolved: 13/Jan/15

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

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

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

 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.



 Comments   
Comment by Doctrine Bot [ 13/Jan/15 ]

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

Comment by Doctrine Bot [ 13/Jan/15 ]

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





[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: 1
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: 09/Jan/15

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:



 Comments   
Comment by Doctrine Bot [ 09/Jan/15 ]

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





[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: 25/Mar/15  Resolved: 25/Mar/15

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: getter, identifier, proxy, proxy-generator, traits


 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.



 Comments   
Comment by Doctrine Bot [ 25/Mar/15 ]

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

Comment by Doctrine Bot [ 25/Mar/15 ]

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





[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: 14/Apr/15

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

Issue Links:
Reference
relates to DDC-2838 Leaky abstraction when applying Crite... Awaiting Feedback
is referenced by DCOM-275 Collections\Expr\ClosureExpressionVis... Open

 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.



 Comments   
Comment by Simon Paridon [ 15/Dec/14 ]

Column names starting with an underscore seems to be a fringe case; however, this seems to be a special case of the more general problem described in DDC-2838.





[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: 26/Mar/15

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

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

Comment by Marco Pivetta [ 26/Mar/15 ]

Note: won't be solved in 2.5.0.

As a side-note, this was solved in ProxyManager meanwhile, but we can consider this change only for 3.0.x





[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: 25/Mar/15  Resolved: 25/Mar/15

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: object-manager, persistence


 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.



 Comments   
Comment by Doctrine Bot [ 25/Mar/15 ]

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

Comment by Doctrine Bot [ 25/Mar/15 ]

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





[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: 11/Jan/15  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

Issue Links:
Duplicate
is duplicated by DCOM-265 Criteria Comparing 2 date fields will... Resolved

 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: