Giter Site home page Giter Site logo

userbundle's People

Contributors

damien-carcel avatar

Watchers

 avatar  avatar

userbundle's Issues

Use Symfony Guard authentication system

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
UserBundle version 1.0
  • Should this be done in the bundle directly, or only in a Symfony application?
  • If in the bundle, this could imply adding API controllers.

Remove the FOS UserBundle

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
UserBundle version 1.0

Each of the following main points will be done in a dedicated pull request.

  • Remove entirely the dependency to FOSUserBundle
    • move the code in the bundle as a first step (should it just be completely rewritten following Symfony documentation?)
    • remove UI related code and dependencies, keep only needed Symfony components
    • Doctrine mapping should remain unchanged (no need for DB migration)
    • KhatovarWeb application should still be able to work with this code
  • Add akeneo/php-coupling-detector to enforce respect of layers and use it on Travis CI
  • Reorganize the code with a clear separation between domain, application and infrastructure
    • at this point, there should be adapters only for database (remove useless code from FOS User bundle that could remain, if not already done)
    • service declaration are framework related and so should be in the infrastructure layer
    • acceptance tests added in #4 should still work
  • Add console commands to manage the bundle
    • this will be, with the database, the only adapters implemented directly in the bundle, others (like UI/API) may be in a final Symfony application only
    • add system tests for these commands

Test the bundle correctly

This is a needed step before rewriting the bundle following a true DDD pattern (if it is ever done).

  • Write acceptance tests
    • they need to cover all the use cases of the bundle (including what is directly done by the FOS User bundle)
    • this means the bundle must have clear entry points (services) for these use cases, only those services should be used in controllers => very likely to be repositories
    • storage must be replaced with an in-memory variant
  • Add needed integration tests
  • Add possibly missing unit tests
  • Define the system tests by tagging some of the acceptance tests
    • commands => these tests will be executed directly in the bundle
    • controllers => these tests will be executed in the applications using the bundle

Add Integration and acceptance tests configuration

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
UserBundle version 1.0

Don't add the tests themselves, only what is needed to run them.

  • Update the dependencies to remove the framework-bundle, keep only needed components, and Symfony v4
  • Organize the tests
    • phpspec is used for unit tests
    • behat is used for acceptance and integration tests

Look at https://github.com/damien-carcel/app-skeleton/tree/symfony-api for tests organization.

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.