Monthly Archives

October 2016

Uncategorized

phpBB Extension Version Control

October 5, 2016

When you are developing an extension for phpBB, you will have to setup your own version control. Once an extension has been approved for the customization database, phpBB will handle the version control.

To manage the version control require changes to your composer.json file and the creation of a version xml file. The version xml file will need to be stored on a webserver that is publicly available.

Version File

The version file is an xml file with the following format:

{
"stable":
     {
     "1.0":
          {
          "current":"1.0.0",
          "download":"https:\/\/www.yoursite.com\/folder\/folder\/folder\/extension.zip",
          "announcement":"",
          "eol":null,
          "security":false
          }
     }
}

As you can tell the xml file is pretty self explanatory. The key values are the stable, current and download. This file will need to be hosted where it publicly available on the internet.

Composer.json file

The composer.json file will need to tell phpBB where to look for the version file. The following lines should be in your composer.json file, but are probably blank. The xml code needs to look like:

	"extra": {
		"display-name": "Extension Name",
		"soft-require": {
			"phpbb/phpbb": ">=3.1.0-RC2,<3.2@dev"
		},
		"version-check": {
			"host": "www.site_version_file_hosted.com",
			"directory": "/directory/structure/to/file",
			"filename": "filename.xml",
			"ssl": "true"
		}
	}

The SSL flag will need to be changed based on your sites requirement to use https or regular http.

Hope this helps.