GithubHelp home page GithubHelp logo

webfactory-visibility-filter-bundle's People

Contributors

janopae avatar maltewunsch avatar mpdude avatar relthyg avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

isabella232

webfactory-visibility-filter-bundle's Issues

Support console commands

Currently, the filtering will only be activated per request, due to the GetResponseEvent that OnRequestDependencyInjector listens to. Maybe there is a way to activate it for console commands, too.

Make the benefits of this bundle clearer in README

This bundle is useful when you want to apply the same filter rule to multiple entitities but want to filter based on different columns per entitity.

In simpler use cases, you might as well just use a Doctrine filter.

In more complicated use cases (e. g. multiple columns or filtering that is not based on columns at all), you need a different solution.

Register Doctrine filter automatically (e.g. via CompilerPass)

Zum Punkt

The filter class needs to be registered manually.

# src/config.yml
doctrine:
    orm:
        filters:
            visibility: Webfactory\VisibilityFilterBundle\Filter\StrategyConsideringSQLFilter

Aus der README:

Muss man das im Projekt schreiben? Geht das nicht über z.B. einen CompilerPass (idk!)? Falls man die Config wirklich braucht, sollte sie dann nicht im Bundle leben und man hier nur die Bundle-Config einbinden müssen? Dann müsste man z.B. auch nicht auf den Namen Acht geben/den erklären?

Remove support for Symfony 3.4

This project still has to support projects that run on 3.4. However, the testing infrastructure already depends on Symfony 4.4, and it's not worth porting it back to Symfony 3.4 as support for 3.4 ends in a few months.

To not make false promises, Symfony 3.4 support should be removed as soon as we don't have any projects depending on it any more.

Allow mutiple filter strategies per project

Sometimes, different entities have different visibility strategies. However, most of the time multiple entities still share one strategy. There should be a way for mapping different entities to filter strategies. Maybe through the data type of the visibility column?

Cache Reflection Properties/Read annotation

Annotation reading and reflection can be expensive. Currenty, it is likely that the same annotation will be read even multiple times per request, but as Annotations don't change between deployments, the results of VisibilityColumnRetriever::getVisibilityColumn could be cached for the whole duration of a deployment.

Rework VisibilityColumnConsideringSQLFilterTest

The VisibilityColumnConsideringSQLFilterTest is currently built as a heavy integration test, with a simulated Symfony Kernel and stuff. This on the one hand complicates the setup process - we need to simulate a request to get the filter activated. It also obscures the exact testing conditions, e.g. which FilterStrategy is used.

Also, working around the Doctrine caching could be solved by porting it to our webfactory/doctrine-orm-test-infrastructure.

Also, each test performing multiple assertions could be split.

Also, OneToOne-Relationships are currently only tested with EAGER-Loading - this detail is not visible from the Test case, but hidden in the test entity. Different tests for EAGER and LAZY for documenting the different effects the visibility filter has on each one of them would be helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.