-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
added a paragraph about experimental features #2622
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
Conversation
i guess we can then provide a similar solution to |
Also note that I don't want us to abuse this. It should only be used for big new features that are difficult to think of without some real-world usage. |
I suppose "subsequent versions" does not include 2.3.x, but it might be worth specifying. |
So, to make things clear with the security example; we have two options:
|
Personnally I would include it in the 2.3, specified as experimental, since it would allow to gather feedback before releasing the 2.4 and consequently to have a better final feature. |
Can't we have a 2.3-experimental branch so that developers will not risk to use experimental features in their critical projects? The main problem is that we have to maintain 2 branches: 2.3 and 2.3-experimental. Otherwise, why not creating a new SymfonyExperimentalBundle that contains all experimental features? If these features are approved by the community then we can move them from the bundle to the core in 2.4, 2.5... The main problem is how to deal with namespaces without breaking BC when moving everything to the core. |
Or what about a symfony-experimental third party repository/package like we have for Twig extensions? I don't think mixing experimental features in 2.3 is a good idea. Having a third party bundle/repository/package is probably better. This package will have to be explicitly added to the composer.json file by the developer if he wants to use experimental features. |
It makes sense to add it as a third part bundle but if the goal is to have as many feedback as possible, you'll have to find a way to encourage web dev to use these features. |
I do like @hhamon idea. We can have a |
We can always advertise for installing a third party dependency that contains such experimental API in the documentation, blog post and even in the code with commented code. |
The |
That being said, I'm not sure it is worth it (creating another repository). I don't expect using this experimental thing that often: the PR on security, perhaps the one about the request context. I don't have any other example for which we would have used this (perhaps the proxy thing too). |
The |
I like this approach, it make sense to keep new feature out of core until they are ready. Merging early into core would discourage to make BC breaks on non final stuff. |
I like the @hhamon approach that not mixed experimental features with stable features. If you want use experimental, you change your composer file. |
2.3 should be considered completely stable, because it is a LTS. Developers and organizations seek this in this kind of releases. Please correct me if I'm wrong. |
As a Symfony developer I agree with @jonsxaero , I want the main channel to be reliable. Having a separate repository for experimental features seems like a good choice. |
I'm agree with @hhamon and @jonsxaero. Experimental features have not to be on 2.3 LTS |
I disagree a bit with previous speakers, marking features experimental is a very explicit and good way to include unfinished functionality even in an LTS release. Python did this with Without something like experimental, new features have to become stable between any minor release (2.3 -> 2.4 etc). This is a timeframe much too small for some things. |
@beberlei how would you do an equivalent of |
@hhamon just mark the API as |
All releases, except LTS, are good to include new features and experiment with them, but in my opinion LTS is focuses on stabilizing everything as we can and give a long support. I insist that stabilizing is a reason to take into account by developers and organizations to adopt this new release. Therefore, we should not mix stable and experimental features in 2.3. Maybe It's a good idea to create a separate experimental bundle. |
What about modifying the autoloader slightly to try to load classes in an Experimental namespaces, so, if you try to load You should be able to turn on and off this behaviour somehow. |
@loalf That is hackery :-) and it violates PSR-0, breaking composer and such |
@beberlei you expect this kind of things from experimental stuff, no? ;) Yeah, you are right, discard it. |
What about cases where experimental features break BC of existing functionality? Are we talking here of only new features which don't change the existing API? |
|
@gunnarlium the problem with |
What will be the commitment of an experimental feature in 2.3 LTS? Are you going to backport any changes made in subsequent versions if something changes? I think given that experimental means that there is no guarantee of stability of the code, that it should have to be specifically imported from somewhere else (another repository or namespace like Symfony\Experimental) means that the developer has to make a conscious decision to opt into unstable code in a stable branch. |
I agree with @hhamon. Most devs will rely on IDE autocompletion and won't even notice the |
This is impossible for code that extends existing classes. Preventing accidental use of experimental code could be done in the Debug autoloader (just for dev mode): https://gist.github.com/beberlei/1ee7d78c181ca1abf796 But this would still require some mechanism for collaborators to check if experimental is enabled or not. So its not perfect |
It looks quite hacky for me. If I may compare this problem to the car industry, I would say that when you buy a car, you buy a car ready for production use. You don't buy a car that has experimental airbags. This is for your own safety. My opinion is that it should be the same for Symfony. The 2.3 branch should just contain the stable API which is safe. If you want to live on the bleeding edge you have to install a 3rd party package that provides the non stable API. |
No need to create yet another repository for experimental features as it would be only interesting for big ones (and we don't have that many of them). I prefer to wait for the next version to include these features. Thanks for your comments. |
As Symfony 2.3 will freeze most of its API, we need a way to explicitly mark things as being experimental.
The goal of experimental features is to be able to gather feedback from our users as early as possible, by keeping the possibility to change things based on this feedback.
The first feature that will be marked as experimental in 2.3 is the simplification of the security customization (see symfony/symfony#6069 -- and Seldaek/symfony#3).