Any plugin conversion tool available/necessary for Vanilla 2.5?

2»

Comments

  • LincLinc Director of Development Detroit Vanilla Staff

    @R_J said:
    ... and when we are already talking about naming conventions (something I really love), may I ask another question?

    From looking at newer plugins I got the impression that the convention now seems to be "/plugins/newfunctionality/NewFunctionalityPlugin.php". Is that correct?

    That's a good question.

    As far as I can tell, everyone on the team but Todd & Ryan does /plugins/newfunctionality/class.newfunctionality.plugin.php. Todd does what you did above, and Ryan does /plugins/newfunctionality/newfunctionalityplugin.php basically combining the two. I hadn't even noticed the divergence. I'll have a word with them.

    R_J
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @Linc said:

    @R_J said:
    ... and when we are already talking about naming conventions (something I really love), may I ask another question?

    From looking at newer plugins I got the impression that the convention now seems to be "/plugins/newfunctionality/NewFunctionalityPlugin.php". Is that correct?

    That's a good question.

    As far as I can tell, everyone on the team but Todd & Ryan does /plugins/newfunctionality/class.newfunctionality.plugin.php. Todd does what you did above, and Ryan does /plugins/newfunctionality/newfunctionalityplugin.php basically combining the two. I hadn't even noticed the divergence. I'll have a word with them.

    Did you have found the time to raise this question?

    Since Vanillas coding standard is moving towards PSR standards, I think it is logical to adopt the PSR-4 standard: "The terminating class name corresponds to a file name ending in .php." which wouldbe the same standard as it is already used in /library/Garden & /library/Vanilla resulting in SomeFeaturePlugin.php. I would prefer that.


  • LincLinc Director of Development Detroit Vanilla Staff
    edited March 2018

    @R_J said:
    Did you have found the time to raise this question?

    I slid it into a conversation not 10 minutes ago. The verdict is full PSR-4 (SomeNamePlugin.php) from now on. We're not retroactively updating old files at this time, primarily because I think it will cause widespread issues with open source updates not deleting the renamed files and therefore isn't worth it yet.

    R_J
  • LincLinc Director of Development Detroit Vanilla Staff

    Todd has also requested that folder + key be formatted in dashed-case.

    We'll update the coding standards soon.

Sign In or Register to comment.