Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Any plugin conversion tool available/necessary for Vanilla 2.5?

rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one"NJ ✭✭✭
edited September 24 in Development

Noticed the new json format in the vanilla plugin source of 2.5 and I wonder whether the changes to the plug-ins were manual or perhaps there's a conversion tool. Or perhaps it's not necessary because vanilla will support both old and new formats;-)

Comments

  • LincLinc Vanilla's Bard (and Director of Development) Detroit Vanilla Staff

    We're trying to support both formats for a sunset period. Trying to guarantee the addons directory can do both is actually the thing that's got me stuck on the 2.4 release lately - we'd already moved to it for that.

    rbrahmson
  • LincLinc Vanilla's Bard (and Director of Development) Detroit Vanilla Staff

    Also, for the record, 2.5 is not anywhere near release. It's an alpha build, which means more features are yet to be added. I really don't recommend building anything for it yet.

    rbrahmson
  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NJ ✭✭✭

    Thanks. I'm in the final phase of developing a plugin (being beta tested by some users over here) and wanted to check whether I need something to make it "future proof". If you care to learn about the plugin shoot me a pm.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I have tried something similar (making a plugin futureproof) and had not many problems on the frontend side.
    The backend has many changes though. Most things work out of the box, but they might look a little bit awkward. The only thing that you most probably will stumble upon is that addSideMenu is replaced by setHighlightRoute. I have come up with this simple snippet:

            if (method_exists($sender, 'setHighlightRoute')) {
                $sender->setHighlightRoute('settings/plugins');
            } else {
                $sender->addSideMenu('settings/plugins');
            }
    
    rbrahmson
  • @Linc a dit :
    We're trying to support both formats for a sunset period. Trying to guarantee the addons directory can do both is actually the thing that's got me stuck on the 2.4 release lately - we'd already moved to it for that.

    I know that the ideal would be to keep the compatibility of addons and plugins back, but also remember that php has had many changes, and sometimes many systems lose those compatibility due to new developments which is normal, in my personal opinion, launch a version 2.4.x incorporating the automatic cache cleanup function for themes, addons and plugins, and launch a new branch vanilla 3.0, which indicates that the addons and plugins should update, the truth I do not see more problem, the addons and more important plugins are maintained by the team vanilla, it will be a great job but the reward will be more efficient, faster and safer software using the new api.

    Regards,

    R_JK17
  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NJ ✭✭✭

    I still vote for a long sunset period of backward compatibility. The reality is that for various reasons many communities are late to upgrade.

    It would be great if there was an automated script (even an editor macro) that would apply the compatibility changes. I don't know if R_J's code snippet above is the only required change... Would be nice to know the answer to this question.

    P.S. I don't even know whether the statement that the "more important plugins are maintained by the team " is accurate. There will be users out there for whom a specific plugin is very important regardless of it's authors.

  • @rbrahmson What is being proposed is to leave the compatibility to version 2.4.X, imagine all the PHP systems that have broken for not supporting the version 7.X +, also up to version 2.4.X will have an excellent forum, and after that version if you have an incompatible plugin will have to work a little in the, my specific case I did not know vanilla until two months ago and until a plugin I have programmed with the help of the forum moderators, so I do not see problem in moving forward,

    Regards,

  • There is a conversion tool:
    https://github.com/vanilla/vanilla-cli

    In my experience you don't need to worry about deprecated functions as they will tell you if they are deprecated and there is an alternative.
    See addSideMenu, for example:
    https://github.com/vanilla/vanilla/blob/63bfdded1a2ed818857cb4a101c20405a56a2b76/applications/dashboard/controllers/class.dashboardcontroller.php#L146

    You basically just need to turn on debug mode and go through all warnings and notices.

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

    rbrahmson
  • LincLinc Vanilla's Bard (and Director of Development) Detroit Vanilla Staff

    @rbrahmson said:
    I still vote for a long sunset period of backward compatibility.

    We too are fans of backwards compatibility. When we decide against it, it's because we don't have the resources necessary to keep doing it.

    rbrahmson
Sign In or Register to comment.