Skip to content
Permalink
master
Switch branches/tags
Go to file
@samdark
Latest commit 3e54792 Mar 31, 2021 History
4 contributors

Users who have contributed to this file

@samdark @viktorprogger @machour @demonking

003 - Roadmap

We want Yii 3 to:

  • Not limit developer in choosing architecture. Allow anything from "classic" MVC to DDD.
  • Be based on best practices such as SOLID, GRASP etc. and teach them to community.
  • Keep most good things from Yii 2.
  • Be more open to global PHP community and infrastructure.

PSRs compliance

PSR compliance helps with customizability, ability to use general PHP libraries and implement less wrappers. Here's the list of PSRs we want to implement.

PSR-3 Logger

Implemented as a separate package that is not dependent on a framework.

  • Framework packages should depend on interface only.
  • Split drivers into packages.
  • Clean up code.
  • Fix email target.

PSR-4 Autoloading

  • Autoloading is fine already.
  • Document on how it works.

PSR-7 HTTP message

  • Remove our own implementation. At least for now.
  • Framework packages should depend on interfaces only.

PSR-11 Container

Implemented as a separate package that is not dependent on a framework.

  • Framework packages should not use container directly. One should be able to instantiate everything manually.
  • Finish refactoring.
  • Remove all framework-specific implementations from the package. Move to framework.
  • Implement autoloader fallback

PSR-12 Code style

  • Make sure code follows it.
  • Automate fixing style before release.

PSR-14 Event dispatcher

PSR-15 HTTP handlers

  • Rewrite HTTP flow to PSR-7 request-reponse + formatting response via emitter.
  • Provide SAPI emitter out of the box.
  • Make it possible to use alternative emitters such as RoadRunner.
  • Support middleware.
  • Implement filters as middleware:
  • Re-implement router w/ middleware support for route groups.
  • Filters should be middlewares.

PSR-16 Simple cache

Implemented as a separate package that is not dependent on a framework.

  • Framework packages should depend on interfaces only.
  • Split drivers into packages.
  • Clean up code.

PSR-17 HTTP factories

  • Use PSR factories.

PSR-18 HTTP client

  • Remove our own implementation. At least for now.
  • Framework packages should depend on interfaces only.

Stricter types

  • Make sure type hinting is used everywhere.
  • Make sure types are as definitive as possible. Avoid varying types if possible.

Single application template

Router

Implemented as a separate package that is not dependent on a framework.

  • DSL for configuration.
  • Ability to route to any callable.
  • Named routes.
  • Route groups w/ middleware support.

Best practices and SOLID compliance of all classes/packages

  • Make sure interfaces follow "interface segregation" principle.
  • Do not use public properties.
  • Do not use init().
  • Do not inherit from BaseObject or Component. Remove these.
  • No globals.
  • No static calls except helpers that are final.
  • Prefer throwing exceptions to fixing input.

Development toolkit

  • Release command line tool
  • Development command line tool (symlinks packages into usable application)

Console

  • Separate web and console application
  • Possibly eliminate base application (still needed)
  • Create interface for console (using Symfony one)
  • Implementation may be one of the popular ones (using Symfony one)
  • Ensure application can add commands via config

Documentation

  • Follow best practices.
  • Don't use "MVC" term.
  • Upgrading from Yii 2.

RBAC

RBAC is implemented as framework-independent package.

  • Finish refactoring.
  • Make sure it follows best practices.
  • Split drivers into packages.

View

View is implemented as framework-independent package.

  • Finish refactoring (see issues).
  • Port widgets.
  • Rethink and implement active form widgets.
  • Implement caching widgets.

Data abstractions and Grid

  • Finish data abstractions.
  • Port sort, make it use data abstractions. Should be part of yii-dataview.
  • Port paging, make it use data abstractions. Should be part of yii-dataview.
  • Port grid, make it use data abstractions. Should be part of yii-dataview.
  • Port list, make it use data abstractions. Should be part of yii-dataview.

Validators

Debug toolbar

  • Port debug toolbar.

Gii

  • Port Gii.

Infrastructure

Others