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

[CLEANUP beta] Remove deprecated Controller#controllerFor #11771

Merged
merged 1 commit into from Jul 21, 2015
Merged

[CLEANUP beta] Remove deprecated Controller#controllerFor #11771

merged 1 commit into from Jul 21, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jul 16, 2015

Controller#controllerFor has been deprecated, this commit removes the functionality.

Needs rebase once #11770 is merged.

@stefanpenner
Copy link
Member

Although deprecated, we should do our due diligence and explore some points:

  1. what needs to be supported by legacy addon
  2. what needs to continue to be in core to support basic controllers (since we dont have routable components yet)
  3. anything else i'm missing?

@rwjblue
Copy link
Member

rwjblue commented Jul 16, 2015

Ready for rebase.

@ghost
Copy link
Author

ghost commented Jul 16, 2015

Rebase'd

@ghost
Copy link
Author

ghost commented Jul 16, 2015

@stefanpenner Use Ember.inject.controller() instead. ?

@rwjblue
Copy link
Member

rwjblue commented Jul 16, 2015

This isn't removing the fundamental capability (since inject.controller() works just fine), it is only removing the syntax of using needs instead of inject.controller(). This seems unlike {{view}} and friends where there is no alternative path, so we need an addon.

@stefanpenner
Copy link
Member

This seems likely it may want to be part of the legacy controllers addon, what do others think? cc @cibernox

@ghost ghost changed the title [ClEANUP beta] Remove deprecated Controller#controllerFor [CLEANUP beta] Remove deprecated Controller#controllerFor Jul 16, 2015
@cibernox
Copy link
Contributor

It could go into the addon, but I don't see a strong necessity since there is an alternative syntax to get the same result. I see this more like a ember-watson task for help in the migration.

@cibernox
Copy link
Contributor

@abuiles you think that it's viable to to create a task that transform needs into Ember.inject.controller() and the replaces occurences of this.controllerFor('whatever') by this.get('whatever')?

@ghost
Copy link
Author

ghost commented Jul 16, 2015

@cibernox @abuiles You would also have to transform this.get('controllers.whatever')

@cibernox
Copy link
Contributor

True.
Even if it's not really viable to automate the transformation I don't think that we should keep that feature alive in the addon since the functionality is still here just under a different syntax.

@stefanpenner
Copy link
Member

I see this more like a ember-watson task for help in the migration.

true – although code that violates the law of demeter won't be transformable.

I suspect we can merge this, and circle back if it turns out to be extremely painful (i suspect it will) but we can implement the missing features in the legacy-addon on-demand.

@ghost ghost closed this Jul 17, 2015
@ghost ghost deleted the remove-controller-controller-for branch July 17, 2015 16:32
@ghost ghost restored the remove-controller-controller-for branch July 18, 2015 17:04
@ghost ghost reopened this Jul 18, 2015
@ghost
Copy link
Author

ghost commented Jul 18, 2015

I removed this branch per accident.

stefanpenner added a commit that referenced this pull request Jul 21, 2015
…r-for

[CLEANUP beta] Remove deprecated Controller#controllerFor
@stefanpenner stefanpenner merged commit e532dcd into emberjs:master Jul 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants