Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to contribute #2

Open
sebcar opened this issue Nov 7, 2023 · 7 comments
Open

I want to contribute #2

sebcar opened this issue Nov 7, 2023 · 7 comments

Comments

@sebcar
Copy link

sebcar commented Nov 7, 2023

How can I help?

@maldoinc
Copy link
Owner

Hi @sebcar, thanks for taking an interest in the project. At the moment as you can see there isn't much of a backlog.

These are some of the things I wanted to do:

  • Finish "filtering by joined entitied" feature (currently wip)
  • Check/add support for doctrine 3 and with a test suite that reflects that using a matrix test suite
    • every php version tests against doctrine 2 and 3 separately

If you have any projects where using doctrine-filter would be appropriate then feel free to pull it in those and start using it, then you have a better idea on what to work on and the project can evolve based on the needs of the users. Alternatively the second point can be a good starting point.

@sebcar
Copy link
Author

sebcar commented Nov 13, 2023

Thanks! I'll see what I can do.

@sebcar
Copy link
Author

sebcar commented Nov 28, 2023

I'm trying composer update and there is a lot of things to change.

@sebcar
Copy link
Author

sebcar commented Dec 2, 2023

Hi. Doctrine\Common\Annotations\Reader was removed in Doctrine ^2.17 and ^3. So I'm changing Reader for NativeAttributeReader. @maldoinc do you think this is ok?

<?php

namespace Maldoinc\Doctrine\Filter\Reader\AttributeReader;

use Maldoinc\Doctrine\Filter\Reader\AttributeReader\NativeAttributeReader;

class DoctrineAnnotationReader implements AttributeReaderInterface
{
    private NativeAttributeReader $reader;

    public function __construct(NativeAttributeReader $reader)
    {
        $this->reader = $reader;
    }

    public function getPropertyAttributes(\ReflectionProperty $reflectionProperty, string $attributeClass): array
    {
        $attribute = $this->reader->getPropertyAttributes($reflectionProperty, $attributeClass);

        return $attribute ? [$attribute] : [];
    }
}

@maldoinc
Copy link
Owner

maldoinc commented Dec 2, 2023

Was it removed or deprecated? In any case we probably need to keep it around for people using doctrine annotations instead of attributes. Will eventually get removed though when the min php version is set to 8.

Also judging from https://www.doctrine-project.org/2023/10/11/orm3-beta1-dbal4-rc1-future-plans.html v3 so far has no breaking changes with regard to what the lib uses.

We could look into adding support for v3 and update the matrix test workflow so that for every php version it first checks using doctrine 2 then 3. Ideally on separate jobs on the matrix but we can also do it on the same one

in tests.yml after installing and testing with doctrine 2 we can tell composer to install v3 and re-run tests.

Alternatively as a user if you have any feature requests something you'd like to work on besides this then feel free to take a look at that. Like I said filter-joins are wip so we could also look into taking that to the finish line whatever remains.

@sebcar
Copy link
Author

sebcar commented Dec 3, 2023

Was removed in 2.17. So you said that 2.17 must be skipped?

@maldoinc
Copy link
Owner

We can still support all v2 doctrine versions but use https://github.com/doctrine/annotations directly instead of relying on the one bundled with doctrine orm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants