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

2.x Drop plugin support #2005

Merged
merged 4 commits into from
May 21, 2019
Merged

2.x Drop plugin support #2005

merged 4 commits into from
May 21, 2019

Conversation

gchtr
Copy link
Member

@gchtr gchtr commented May 19, 2019

Issue

I already discussed this with @jarednova and we suggest to drop the support for installing Timber as a plugin as of 2.x.

Supporting a plugin version of Timber has been quite a hassle lately. And when we’re honest, Timber is not really a plugin. And it’s not really a framework or a library either. It’s something in-between. It’s a tool to develop themes (and private plugins) with. And it’s evolving constantly. There will be breaking changes that require developers to update their themes – like the huge 2.x update. When Timber can be installed as a plugin, it’s really hard to introduce those breaking changes. Composer allows us to do that, because it won’t automatically install major versions. Installing a major requires more work than just pressing a button in the plugins menu. And that’s a good thing, because as a developer, installing a new major version requires you to test your project with the new version.

Related tickets:

Solution

This pull request

  • Removes the timber.php plugin file.
  • Removes the script to deploy Timber to the plugin repository.
  • Removes the readme.txt file. For release notes, I suggest we continue to use the Releases section.
  • Updates the Usage Changes section in the Pull Request Template. A list of changes is probably enough. We will have to fill in the details for the release notes ourselves.
  • Updates the documentation.
  • Updates the Upgrade Guide.

Impact

Projects that have Timber installed as a plugin won’t see the 2.x update. The sites will stay on 1.x and continue to work as they did.

Usage Changes

It will only be possible to install Timber as a Composer dependency.

Considerations

Anything?

Testing

No testing.

@codecov
Copy link

codecov bot commented May 19, 2019

Codecov Report

Merging #2005 into 2.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##                2.x    #2005   +/-   ##
=========================================
  Coverage     93.64%   93.64%           
  Complexity     1545     1545           
=========================================
  Files            50       50           
  Lines          4030     4030           
=========================================
  Hits           3774     3774           
  Misses          256      256

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e58da7e...0e46548. Read the comment docs.

@codecov
Copy link

codecov bot commented May 19, 2019

Codecov Report

Merging #2005 into 2.x will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##                2.x    #2005   +/-   ##
=========================================
  Coverage     93.64%   93.64%           
  Complexity     1545     1545           
=========================================
  Files            50       50           
  Lines          4030     4030           
=========================================
  Hits           3774     3774           
  Misses          256      256

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e58da7e...4aa1542. Read the comment docs.

Copy link
Member

@jarednova jarednova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢 the end of plugin days! (honestly, good riddance). I think just one tweak to make here then we're 👍

@jarednova
Copy link
Member

@gchtr looks good! Just one small tweak and then we can say "hello" to a much simpler Composer-only future

@gchtr gchtr requested a review from jarednova May 21, 2019 07:17
@jarednova jarednova merged commit cf32f84 into 2.x May 21, 2019
@jarednova jarednova deleted the 2.x-drop-plugin-support branch May 21, 2019 14:11
@tomlecki
Copy link

tomlecki commented Aug 1, 2019

@jarednova @gchtr
If I can say something here I would like to vote against this change.
I can explain it from a different view than yours.

In last few years I've used Timber in many websites using mostly plugin version as it was just quicker. I introduced Timber to a few 'non-techy' people and they fell in love with it because of simplicity. You just install plugin, download starter theme and it works just like that. You just edit the .twig and .php files.

If the only reason is a problem with informing users about 2.0 update and changes that will brake site - maybe consider creating another plugin like "Timber 2". Current one would stay as it is and people could just install the second version for new websites that would be compatible with new features and not using deprecated stuff. If it's not technically possible for some reason just ignore this idea.

I personally can handle this change, I've used composer in a few projects with Timber but for those who wanted simplicity it's gonna be another obstacle - installing composer, using terminal etc. It's another thing to learn.

Right now Timber has 30 000+ active installs from WP repository. I don't know this for sure, but I assume a lot of those installs are just websites made by people attracted by Timber's low entry-level knowledge and that it works as I said before "out of the box". It is powerful but to start you don't need much. In fact that was the reason that attracted me 5 years ago.

Of course I don't know what is going on behind the scene with the current plugin. Maybe it would consume too much time to stay up-to-date with composer version? If yes, I understand it totally and I would also support this plugin removal change. But if the reason is not work and time but just this update issue, maybe consider leaving plugin as optional install method.

@gsalkin
Copy link

gsalkin commented Aug 5, 2019

@tomlecki I respect a lot of the appeal of the plugin version of Timber for fast development. But the truth is as said above: Timber is not a plugin. Shipping it as such is misleading and can cause tons of issues for site maintainers. Especially as technical debt piles up, I'm concerned about vulnerabilities. For instance, the plugin version of Timber never adopted full Twig 2.0 support.

I think there should be a sunsetting plan. Can we think about a period of time for maintenance updates? And of course we'll need to work on migration documentation.

@jarednova
Copy link
Member

@tomlecki @gsalkin thanks for following-up on this. I really appreciate the passion and enthusiasm. It means that what we're doing is important and reaches people (this is good!)

The plan is to continue development into the 2.x branch as Composer-only. That doesn't mean that Timber's presence in WP.org will be going away though.

We want to maintain the best possible developer experience, so we'll leave the existing plugin on WP.org for the indefinite future. If we find any critical bugs, we'll update them too. But what we can't do is maintain two versions into the distant future. Syncing the versions is an error-prone process and I'm very wary of (and have made mistakes with, despite scripts and other tools to automate the process).

All that said, these are plans and things could change (especially if someone volunteers for a role reaching out to new devs just getting into WordPress and templating!??!??!?!) — but for now we're planning on making 2.0 Composer-only once it's released.

@jarednova
Copy link
Member

... and of course as @gsalkin notes, we'll be sure to document a migration path and on-boarding materials. I hope @tomlecki you can keep us honest on this front to ensure the great experience you have (and have introduced others too) can continue!

@arun369
Copy link

arun369 commented Nov 14, 2023

Some of the points raised by @tomlecki are pretty good and I agree and I have a bit of mixed reviews about this as for now, it will definitely take away the usability for not-so-tech users of timber but considering the long term impacts and how it should be treated, I appreciate the decision. It absolutely puts it out as a more mature solution for developers and clears the confusion about where it stands as a plugin/tool/framework.

Here is an interesting thing, a few weeks back I installed Twig using Composer directly into wordpress theme which I was developing because timber as plugin didn't feel like the right choice, mostly because it does feel like part of a theme more than a plugin and it worked well (minus all the features that timber has but twig can not for obvious reasons). For that particular instance Timber would have been a better choice if it was available with Composer, although for most of developments I install Timber as a plugin.

I've been using Timber for about 3 years and initally I hated 😡 it but as I came to know more, I now prefer to make a whole theme on top of it because of the clean separation it provides which gives ability to a bigger team (designing & development) to work on things simultaneously. ♥😍

Composer does have a bit of learning curve but all serious developers have to learn it at some point anyway, because any complex development will also have additional libraries such as emogrifier, emailer libraries, data validation libraries, pdf generation and such which have to be installed with Composer.

I don't know all ins and outs of Timber yet, but I think this steps makes it adapt the newer twig versions easier than before. (or may be I'm incorrect and someone should correct me 😛)

Keep up the good work 👍👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants