ZF-24: Need PHP code formatter for JIRA and Confluence Wiki


JIRA does not currently have a formatter for PHP code. For example, the following block:

    echo "Hello world!";

generates an error:

    echo "Hello world!";

A workaround is to omit the language parameter to the {``` block, but this falls back to Java syntax highlighting.


Atlassian has one underway for Confluence that does PHP, but it is a bit too buggy at the moment, and that one will move to JIRA as well when done. Right now, use ``` with no language specified.

Down the road, if they do not come through, I can modify the existing code to add the language formatting.

Eventually, a syntax highlighter for PHP will be released for Confluence. We would greatly appreciate If community members could help monitor their progress, and notify us when the plugin reaches a "pre-release" quality:…

Also, as you find more information about the PHP highlighter, please post it here.



I might be wrong, but to me it looks like a new code plugin has been released:…

Currently these are the supported languages and the aliases for them:

*  C Sharp - c#, csharp, c-sharp
* Delphi - delphi
* HTML - html, xhtml
* Java - java
* Javascript - js, jscript, javascript
* Pascal - pascal
* PHP - php
* Python - python, py
* Shell scripts - shell
* SQL - sql
* VB - vb,
* XML - xml

Gavin completed this task yesterday.

According to the live example provided in the Issue description, this has not yet been addressed in JIRA.

The macro is for Confluence, not JIRA. So the example won't work in JIRA, but does work in our wiki. Imperfect world ...

So .. we should continue to monitor and see if this Confluence macro becomes available for JIRA.

Changing fix version to unknown.

I believe this is fixed now. (At least in confluence) Trying an example here, if this works, this issue can be closed.

    echo 'Hello world!';

To be clear, this issue was opened in June when both Confluence and JIRA lacked PHP code formatting. Confluence has since been updated, but JIRA has not, as evidenced by the comment above.

I believe this issue should remain open as a minor priority to-do item until a plug-in for JIRA is available.

This needs to be revisited.

It's egg on Zend's face when their issue tracker doesn't even highlight PHP code.

Agree with the last poster, and this issue is approaching it's 5 year birthday. That is a LONG time to be running without proper syntax highlighting. Zend, you have some clout...can you kindly suggest to the JIRA team that they need to finish this up?

You can follow JRA-23604 on the JIRA bug tracker for progress.