loophp / collection

A (memory) friendly, easy, lazy and modular collection class.
https://loophp-collection.rtfd.io/
MIT License
721 stars 35 forks source link

[Question] Rename Collection interface to CollectionInterface #273

Closed jazithedev closed 1 year ago

jazithedev commented 1 year ago

When using both an implementation and an interface of collections, there's a need for making an alias:

<?php declare(strict_types=1);

namespace App;

use loophp\collection\Collection;
use loophp\collection\Contract\Collection as CollectionInterface;

final class MyClass
{
}

Would it be possible to change the Collection interface onto CollectionInterface? It would be a lot less confusing I think.

drupol commented 1 year ago

Hello,

I'm afraid but this won't happen anytime soon. I'm quite flexible, but this is a no-go.

I invite you to read this post: https://verraes.net/2013/09/sensible-interfaces/ from @mathiasverraes

Have a nice day.