WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#40663 closed enhancement (invalid)

Allow SemVer Extensions for Plugins

Reported by: jhabdas Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: Plugins Keywords:
Focuses: Cc:

Description

Hello! I'm helping build a WordPress plugin managed in GitHub which follows [SemVer] (​http://semver.org/) and at current we are at 1.0.0-beta.

From the SemVer docs:

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

However, from what I understand Semantic Versioning extensions are not currently possible for WordPress plugins or for @since indicators in code docs. Is this true? If so, what would be the best way to go about having this adjusted so plug-in authors can follow Semantic Versioning for their plugins?

Sidebar: I understand it's quite common for individuals to build in GitHub and sync their WP plugins with SVN. Do you have any officially sanctioned or recommended methods for accomplishing this. Or should we find our own best approach? What did you guys do when you moved TwentySeventeen out of GH?

Change History (6)

#1 @jhabdas
2 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @jhabdas
2 years ago

Someone was kind enough to adjust my understanding. Sorry for the noise.

#3 @dd32
2 years ago

  • Milestone Awaiting Review deleted

Plugins are free to use whatever versioning scheme they wish to - WordPress is not an opinionated platform which forces you into any specific development/versioning methods.

WordPress itself does not use semver, but rather a decimal versioning system (4.9 -> 5.0 -> 5.1) but that has no bearing upon plugins.

There exist many Github -> SVN scripts, WordPress does not suggest one over the other - search them up and use whatever fits your development philosophy.

#4 @jhabdas
2 years ago

There exist many Github -> SVN scripts, WordPress does not suggest one over the other - search them up and use whatever fits your development philosophy.

πŸ‘πŸΌ

#5 @jhabdas
2 years ago

There exist many Github -> SVN scripts, WordPress does not suggest one over the other - search them up and use whatever fits your development philosophy.

So I did some poking around and keep hitting brick walls because none of the deployment migration scripts I've found were properly licensed, or were old (circa 2011) and unmaintained. It would be stellar if WordPress did something about this given it's in the best interest of the platform's long-term viability (unless you're planning on moving to Git). As it stands individuals are having to reinvent the wheel each time they try and use a modern VCS to create a theme or plugin, or face using potentially unlicensed code.

I'm still searching after sinking 4 hours and at least one false start due to licensing issues. Fancy a Core ticket?

Last edited 2 years ago by jhabdas (previous) (diff)

#6 @jhabdas
2 years ago

About 16 hours into my search and I finally landed on Ben Balter's wordpress-plugin-tests which pointed me to sample-plugin and appears to achieve what met my development philosophy: work smarter not harder.

​https://github.com/wp-cli/sample-plugin

I've worked with Ben on Jekyll development so I know he wouldn't steer me wrong. During this journey I've uncovered quite a bit of information I'm going to dump here for autodidactic plugin developers:

Sample Plugin
​https://github.com/wp-cli/sample-plugin
referenced by Ben B ​https://github.com/benbalter/wordpress-plugin-tests in his suggestion to use the WP-CLI test scaffold

WordPress Essentials: How To Create A WordPress Plugin
​https://www.smashingmagazine.com/2011/09/how-to-create-a-wordpress-plugin/

How Commercial Plugin Developers Are Using The WordPress Repository
​https://www.smashingmagazine.com/2012/01/commercial-plugin-developers-wordpress-repository/

Development Tools
​https://github.com/KnowTheCode/UpDevTools

Deploying WordPress Plugins with Travis
​https://deliciousbrains.com/deploying-wordpress-plugins-travis/

Smashing Article (2015)
​https://www.smashingmagazine.com/2015/05/how-to-use-autoloading-and-a-plugin-container-in-wordpress-plugins/

Autoloading standard with Closure and example tests
​https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md

Simple composer file example (with scripts)
​https://github.com/magento/marketplace-eqp/blob/master/composer.json

PHPDoc format:
​https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#5-the-phpdoc-format

Travis docs for building PHP projects:
​https://docs.travis-ci.com/user/languages/php/

Ben to the rescue:
​https://github.com/benbalter/wordpress-plugin-tests

How To Improve Your WordPress Plugin’s Readme.txt (2011)
​https://www.smashingmagazine.com/2011/11/improve-wordpress-plugins-readme-txt/

Note: See TracTickets for help on using tickets.