collections icon indicating copy to clipboard operation
collections copied to clipboard

Collections Abstraction Library

Results 51 collections issues
Sort by recently updated
recently updated
newest added

This would enable the developper to control the naming of its methods instead of having to name it `get` or `is`. **Use case**: ``` require_once 'vendor/autoload.php'; use Doctrine\Common\Collections\Criteria; use Doctrine\Common\Collections\ArrayCollection;...

New `Comparison::LIKE` and `Comparison::NOTLIKE` as alternative solution for #45 :dancer: Support next wildcard characters: `%` - any character(s), any amount `_` - any character, only one `\%` - escape for...

Bug
Question

This pull additional to doctrine/doctrine2#1150 And allow to use the [SQL wildcard characters](http://www.w3schools.com/sql/sql_wildcards.asp) `%` and `_` for `Comparison::CONTAINS` Allow to build the `contains` expressions like: ``` php Criteria::expr()->contains('myField', 'some string%');...

Enhancement
Invalid

Doctrine 2.5 will bring support for Embeddables. Embeddables are almost perfect for implementing [Value Objects](http://martinfowler.com/bliki/ValueObject.html) for doing Domain-Driven Development, but strict comparisons in Doctrine make this difficult. With Value Objects...

Enhancement

Is there a reason for not adding it?

Add a method to create a new collection with rebuilded keys. If you use a method that unsets an element in the collection, the keys are not continuous anymore. This...

https://github.com/doctrine/collections/blob/a4504c79efd8847cc77d10b70209ef838b10338f/lib/Doctrine/Common/Collections/Collection.php#L118-L136 The above specifies that those method return `T[]`. However, `ArrayCollection` actually returns `list` (see [documentation on list type](https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists)). Is it unintentional, or are implementations actually allowed to return sparse...

Update `get` method with one more additional method parameter which will be used as default value if target element couldn't be found. Example: [Symfony ParameterBag][1] [1]: https://github.com/symfony/http-foundation/blob/9a96d77ceb1fd913c9d4a89e8a7e1be87604be8a/ParameterBag.php#L74-L85

It looks like: ``` /** * @param mixed ...$x * * @return CompositeExpression */ public function andX($x = null) { return new CompositeExpression(CompositeExpression::TYPE_AND, func_get_args()); } ``` But this fails in...

Followup of https://github.com/doctrine/collections/issues/117 What about changing `Closure` types to `callable`? For example now I have a problem of passing `callable` into `Collection::map()` because static analysers complain about it.