Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] REFS #11294 Controller class become abstract #12457

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

Merged
merged 1 commit into from
Jan 3, 2015
Merged

[FrameworkBundle] REFS #11294 Controller class become abstract #12457

merged 1 commit into from
Jan 3, 2015

Conversation

mickaelandrieu
Copy link
Contributor

Q A
Bug fix? [no]
New feature? [no]
BC breaks? [yes]
Deprecations? [no]
Tests pass? [no]
Fixed tickets [#11294]
License MIT
Doc PR []

@mickaelandrieu mickaelandrieu changed the title [WIP][FrameworkBundle] REFS #11294 Controller class become abstract [FrameworkBundle] REFS #11294 Controller class become abstract Nov 11, 2014
@linaori
Copy link
Contributor

linaori commented Nov 11, 2014

The protected, I can understand. But why the abstract?

@mickaelandrieu
Copy link
Contributor Author

@iltar I agree @hhamon on this point: if all methods are now protected/private, the class shouldn't be intantiable. As an abstract class can't be instantiated, we improve the behavior of the use of this (helper/sugar) class.

Curiously, Travis now complain and want to remove symfony 3.x release ... /c @fabpot

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Conclusion: remove symfony/symfony 3.0.x-dev

@linaori
Copy link
Contributor

linaori commented Nov 12, 2014

I tend to not use abstract on a class if it doesn't provide abstract methods nor missing methods from an interface, it looks weird to me. But I guess there's something to say for that as you shouldn't initiate this class yourself. If for any reason the abstract should be removed in a future patch, it will stay backwards compatible so it won't be a problem either way. 👍

@mickaelandrieu
Copy link
Contributor Author

@iltar the abstract keyword embrace 2 differents concepts:

  • an abstract class means you can't instanciate it, but only classes that extends it.
  • abstract method is more than a contract - like interface - enforce you to make your own implementation of this methods in children classes

The point is you don't need to have abstract methods to be allowed to use abstract keyword on a class as the abstract keyword has not the same sense.

@stof
Copy link
Member

stof commented Nov 23, 2014

👍

@mickaelandrieu
Copy link
Contributor Author

wow, I wasn't stofized o_O such happy day ^^

@Tobion
Copy link
Contributor

Tobion commented Nov 24, 2014

👍

@mickaelandrieu
Copy link
Contributor Author

Can someone relaunch travis build?
I confirm tests pass.

ping @fabpot

@fabpot
Copy link
Member

fabpot commented Jan 3, 2015

Thank you @mickaelandrieu.

@fabpot fabpot merged commit 0ab13b9 into symfony:master Jan 3, 2015
fabpot added a commit that referenced this pull request Jan 3, 2015
…abstract (mickaelandrieu)

This PR was merged into the 3.0-dev branch.

Discussion
----------

[FrameworkBundle] REFS #11294 Controller class become abstract

| Q             | A
| ------------- | ---
| Bug fix?      | [no]
| New feature?  | [no]
| BC breaks?    | [yes]
| Deprecations? | [no]
| Tests pass?   | [no]
| Fixed tickets | [#11294]
| License       | MIT
| Doc PR        | []

Commits
-------

0ab13b9 Publics methods are protected, class become abstract
@mickaelandrieu mickaelandrieu deleted the feat-11294 branch January 3, 2015 14:48
@fabpot fabpot mentioned this pull request Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants