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

Rename Phalcon\Mvc\Url #13742

Closed
ekmst opened this issue Jan 8, 2019 · 6 comments
Closed

Rename Phalcon\Mvc\Url #13742

ekmst opened this issue Jan 8, 2019 · 6 comments
Assignees
Labels
breaks bc Functionality that breaks Backwards Compatibility discussion Request for comments and discussion enhancement Enhancement to the framework

Comments

@ekmst
Copy link
Contributor

ekmst commented Jan 8, 2019

I propose to rename Phalcon\Mvc\Url to Phalcon\Url. Since the Url is used not only in web applications but also in console (and micro) applications too. I think it will be semantic more correct.

  • Phalcon\Mvc\Url to Phalcon\Url
  • Phalcon\Mvc\UrlInterface to Phalcon\UrlInterface
  • Phalcon\Mvc\Url\Exception to Phalcon\Url\Exception
@dschissler

This comment was marked as abuse.

@ekmst
Copy link
Contributor Author

ekmst commented Jan 8, 2019

There is entirely too much stuff in the Phalcon\Mvc namespace.

I agree.

I also suggest renaming Phalcon\Mvc\User\*, as they do not directly relate to the MVC pattern.

For example:

  • Phalcon\Mvc\User\Component to Phalcon\User\Component
  • Phalcon\Mvc\User\Module to Phalcon\User\Module
  • Phalcon\Mvc\User\Plugin to Phalcon\User\Plugin

@ViltusVilks
Copy link

If they are empty then can be abandoned also, because Injectable can be used directly in PHP.
Less code is better.

And why User\Module exists? we have...
class Module implements ModuleDefinitionInterface { ... }

@niden
Copy link
Member

niden commented Jan 9, 2019

@ekmst The Phalcon\Mvc\User\* classes will be removed for sure. We were thinking about leaving only one of them, something in the lines of Phalcon\Plugin maybe?

Honestly those classes do nothing. They just offer a more intuitive way to make a class DI aware which one can do easily by extending InjectionAware.

As for the Url. Yes I agree. It would be best if we move it out of the Mvc namespace and I would love to see if I can introduce also the Uri implementation for PSR7 and make those two work together.

@niden niden added the enhancement Enhancement to the framework label Jan 9, 2019
@niden niden self-assigned this Jan 9, 2019
@niden
Copy link
Member

niden commented Feb 16, 2019

This has been resolved

@niden niden closed this as completed Feb 16, 2019
@sergeyklay sergeyklay added discussion Request for comments and discussion breaks bc Functionality that breaks Backwards Compatibility labels Feb 16, 2019
@ghost
Copy link

ghost commented Apr 4, 2019

I agree with @ekmst for

Phalcon\Mvc\User\Component to Phalcon\User\Component
Phalcon\Mvc\User\Module to Phalcon\User\Module
Phalcon\Mvc\User\Plugin to Phalcon\User\Plugin

But for Url it would be better to do something like;

Phalcon\Mvc\Url to Phalcon\Link
Phalcon\Mvc\UrlInterface to Phalcon\Link\Interface
Phalcon\Mvc\Url\Exception to Phalcon\Link\Exception

@niden niden added the 4.0 label Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks bc Functionality that breaks Backwards Compatibility discussion Request for comments and discussion enhancement Enhancement to the framework
Projects
None yet
Development

No branches or pull requests

5 participants