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

 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-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-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-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-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-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-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-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-80] Add common exceptions into Doctrine\Common Created: 19/Nov/11  Updated: 20/Dec/11

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

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


 Description   

Following the ZF and SF2 Standard for Exceptions we should have base exceptions in Common






[DCOM-77] add a method to force removal of any unmapped data on flush for a given object Created: 16/Nov/11  Updated: 16/Nov/11

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

Type: New Feature Priority: Major
Reporter: Lukas Kahwe Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

in order to ensure that any unmapped fields are set to their defaults or removed in the case of nosql right now there is no way to do this except with 2 flush calls: aka remove+flush, persist+flush

there should be some way to do this in one flush






[DCOM-73] CodeGeneration using Doctrine\Common\Persistence\Mapping\ObjectMetadata Created: 24/Oct/11  Updated: 03/Dec/13

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

Type: New Feature Priority: Major
Reporter: Benjamin Eberlei Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 1
Labels: None


 Description   

Currently we have tons of code in the ODM/ORMs regarding code generation that are ugly to extend and maintain. We should extract all them into a new component, for example named: doctrine-code-generator

  • It should be feed by only instances of Doctrine\Common\Persistence\Mapping\ObjectMetadata into a twig template.
  • A base template for an entity/document is shipped
  • Maybe ORM/ODM specific child templates or twig traits are necessary to handle writing annotations. This could also be done by adding hooks into the code-generation somehow.
  • Each entity of the user can provide its own template, for examples from a configurable directory "code_templates/Vendor.ProjectBundle.Entity.User.twig" to extend the base template and add own code.
  • As a perspective we should aim for 5.4 generating a trait so that you can have your entity "class User { use UserBase; }

    "






[DCOM-67] Introduce immutable DateTime with __toString() Created: 27/Aug/11  Updated: 29/Jan/12

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

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


 Comments   
Comment by Benjamin Eberlei [ 27/Aug/11 ]

Implemented

Comment by Koji Ando [ 11/Jan/12 ]

Though it is implemented once on https://github.com/doctrine/common/commit/7140ad3ba0ba2a94238976dd7f310ff92b478c96,
the class is removed on https://github.com/doctrine/common/commit/f845c1e267abf9069422eba8addfa976bc8d8685.

I think this issue must be reopened.

Comment by Benjamin Eberlei [ 11/Jan/12 ]

Code was removed due to implementation problems.





[DCOM-33] Allow to register callbacks in the EventManager Created: 01/Jan/11  Updated: 01/Jan/11

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

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


 Comments   
Comment by Benjamin Eberlei [ 01/Jan/11 ]

Consider to add a second queue for callbacks. Its not possible to simulate this by doing something like:

public function addCallbackListener($event, Closure $callback)
{
    $eventListener = new stdClass();
    $eventListener->$event = $callback;
    $this->addEventListener($event, $eventListener);
}

sad





Generated at Sat May 30 18:46:58 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.