GithubHelp home page GithubHelp logo

dotkernel / dot-controller Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 321 KB

DotKernel controller like middleware component

Home Page: https://docs.dotkernel.org/dot-controller/

License: MIT License

PHP 100.00%

dot-controller's Introduction

DotKernel 3 Logo

GitHub issues GitHub forks GitHub stars GitHub license

Packagist Version (including pre-releases) PHP from Packagist

DotKernel 3 Official Documentation Repository

Documentation ( version 1.0 , based on Zend namespace and Zend Expressive )

Roadmap April 2020

TARGET:

NEW APPLICATIONS

  • api-mail ? service to send emails only
  • PINGU queue system, based on Redis + swoole + Mezzio + deployed as a standalone service

Package versioning:

  1. version 1.x related to Zend Framework and Expressive [deprecated]
  2. version 2.x related to Mezzio and Laminas, without modification of the flow. No new functions, only compatibility [deprecated]
  3. version 3.x related to the new Mezzio and Laminas architecture , in preparation for DK3 version 3

Documentation on each package please !!!!

Requirements for V 3:

  • bump require version of PHP to 7.4
  • doctrine 2.7.x ( latest)
  • twig 3.x (latest)
  • update documentation to reflect changes ( readme.md)

How to:

  • create the branch 3.0 from 2.0 !!!
  • make default branch 3.0 ( not master anymore )
  • enjoy

Package list: see the checllist https://github.com/dotkernel/dotkernel/blob/master/checklist-v3-packages.md

dot-controller's People

Contributors

alexmerlin avatar arhimede avatar gabidj avatar marioradu avatar n3vrax avatar onitaandrei avatar sergiubota1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dot-controller's Issues

Shouldn't indexAction() be mandatory in `AbstractController` class?

In Dot\Controller\AbstractActionController::dispatch() the index action is the default action. If it doesn't exist next middleware will be called will generate a 404 error.

Dot\Controller\AbstractController::getMethodFromAction() will return indexAction for no action given.

Wouldn't it be better to add the indexAction() method ?

It helps the developer see his middleware was routed.

Return type and type hint invalid

Dot\Controller\Factory\ControllerEventListenersInitializer::__invoke(): Argument 2 ($instance)
This must be type "mixed" because as is now (?AbstractController) accept only null and AbstractController but through this pass multiple types.

Dot\Controller\AbstractController::dispatchEvent(string $name, array $data = [], object|string|null $target = null): Dot\Controller\Event\ControllerEvent|Laminas\EventManager\ResponseCollection

The return type of this must be the common class (extended one) "Event" (from dot-event) because in this way you lock the package to be able to use only ControllerEvent from this package.

Controllers - missing plugins problem

When forgetting to register a controller in the service manager, Zend Expressive will instantiate the controller using the new. This leads to improper controller setup, as the plugin manager or plugins won't be injected. This is because the controller initializer responsible for that is called only for controllers instantiated via the service manager.

This is all good, but the error message about the invalid controller plugins is misleading as this problem is a cause of the problem described above.

This is worth an improvement if possible, regarding the displayed error, to be less confusing and to point the developer to the actual problem

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.