Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
SonarQube
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="icon=false|title=Table of Contents" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86aWNvbj1mYWxzZXx0aXRsZT1UYWJsZSBvZiBDb250ZW50c30&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvYzptYXhMZXZlbD0yfQ&locale=en_GB&version=2" data-macro-name="toc" data-macro-parameters="maxLevel=2"></p></td></tr></table><h1>Recommended Way for Test</h1><p>It is the recommended way to quickly give a try to this plugin. Indeed, since version 1.2, all the external tools (PHP Depend, PHPMD, etc.) are shipped with the plugin and thus, no longer need to be installed separately.</p><p>The only prerequisite then is to install PHP version 5.3.3 or newer (actually, version 5.4.7 or later is recommended for PHPUnit 3.7). You can <a href="http://www.php.net/downloads.php">download PHP at this location</a> and follow the <a href="http://www.php.net/manual/en/install.php">instructions</a> to install it.</p><p>Versions of the external tools embedded as PHAR in the plugin:</p><table class="confluenceTable"><tbody><tr><th class="confluenceTh">SonarQubePHP plugin</th><th style="text-align: right;" class="confluenceTh">1.2</th></tr><tr><td class="highlight confluenceTd"><strong>PHP Depend</strong></td><td style="text-align: right;" class="confluenceTd">1.1.0</td></tr><tr><td class="highlight confluenceTd"><p><strong>PHPMD</strong></p></td><td style="text-align: right;" class="confluenceTd">1.4.1</td></tr><tr><td class="highlight confluenceTd"><strong>PHP_CodeSniffer</strong></td><td style="text-align: right;" class="confluenceTd">1.5.0-RC2</td></tr><tr><td class="highlight confluenceTd" colspan="1"><strong>PHPUnit</strong></td><td colspan="1" style="text-align: right;" class="confluenceTd">3.7.20</td></tr></tbody></table><h1>Recommended Way for Production Environment</h1><p>It is the recommended way for a production environment as you can install your own version of each external tool.<strong><br /></strong></p><p>You have to be logged in as an administrator to run the commands below.</p><ol><li>Install <a href="http://www.php.net/manual/en/install.php">PHP</a>. You can <a href="http://www.php.net/downloads.php">download PHP at this location</a> and follow the <a href="http://www.php.net/manual/en/install.php">instructions</a> to install it.</li><li><p>Install <a href="http://pear.php.net/">PEAR</a>. To ensure PEAR version and to upgrade it, type the following commands in command prompt:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>pear version pear upgrade pear </pre></td></tr></table><p>If you, for some reason, need the latest PEAR and the commands above don't get it then download <a href="http://pear.php.net/go-pear.phar">http://pear.php.net/go-pear.phar</a> and execute it with php (don't use the old go-pear without the .phar extension, it will likely fail):</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>php go-pear.phar </pre></td></tr></table><p><br /><br /></p></li><li><p>Install <a href="http://www.phpunit.de">PHPUnit</a> from pear using the following command lines:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>pear channel-discover pear.phpunit.de pear channel-discover pear.symfony.com pear install phpunit/PHPUnit-X.Y.Z </pre></td></tr></table><p><br /><br /></p></li><li>Install <a href="http://xdebug.org">XDebug</a> to allow code instrumentation used for instance by phpunit to compute coverage.<br /><ul><li><p><strong>If you are running Linux or Mac, </strong>you must install phpize and php headers (normally found in php dev packages) and then compile xdebug via pecl:<br /><br />Example:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>apt-get install make apt-get install php5-dev pecl install xdebug</pre></td></tr></table><p>Another example on Fedora 18:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>yum install make yum install php-devel pecl install xdebug</pre></td></tr></table><p>And then edit your $PHP_HOME/php.ini file to add the following line:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>zend_extension="FULL_PATH_TO/xdebug.so"</pre></td></tr></table><p><br /><br /></p></li><li><p><strong>If you are running Windows</strong>, you should <a href="http://xdebug.org/download.php">download the binary version matching your PHP installation from this location</a>. And then edit your $PHP_HOME/php.ini file to add the following line:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>zend_extension="FULL_PATH_TO/xdebug.dll"</pre></td></tr></table><p><br /><br /></p></li></ul></li><li><p>Install <a href="http://www.pdepend.org">PHP Depend</a>:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>pear channel-discover pear.pdepend.org pear install pdepend/PHP_Depend-X.Y.Z </pre></td></tr></table><p><br /><br /></p></li><li><p>Install <a href="http://phpmd.org">PHPMD</a>:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>pear channel-discover pear.phpmd.org pear install --alldeps phpmd/PHP_PMD-X.Y.Z </pre></td></tr></table><p><br /><br /></p></li><li><p>Install <a href="http://pear.php.net/package/PHP_CodeSniffer/redirected">PHP_CodeSniffer</a>:</p><table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>pear install PHP_CodeSniffer-X.Y.Z </pre></td></tr></table></li></ol><p> </p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced