<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>SensioLabs Insight News</title>
 <link href="http://blog.insight.sensiolabs.com/atom.xml" rel="self"/>
 <link href="http://blog.insight.sensiolabs.com/"/>
 <updated>2017-09-01T10:57:33+02:00</updated>
 <id>http://blog.insight.sensiolabs.com/</id>
 <author>
   <name>Fabien Potencier</name>
 </author>

 
 <entry>
   <title>Introducing Slack and HipChat notifications</title>
   <link href="http://blog.insight.sensiolabs.com/2017/09/01/receive-sensiolabsinsight-notifications.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-09-01T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/09/01/receive-sensiolabsinsight-notifications</id>
   <summary>Receive notifications from SensioLabsInsight in Slack and HipChat</summary>
   <content type="html">
    <![CDATA[
    <p>At SensioLabs, we understand how important is the integration of a quality assurance tool in your development process.</p>

<p>In the last few months, we introduced features to improve this aspect of SensioLabsInsight:
<a href="http://blog.insight.sensiolabs.com/2016/11/07/introducing-github-integration.html">GitHub pull requests integration</a>,
<a href="http://blog.insight.sensiolabs.com/2017/06/22/analysis-status-favicons.html">analysis status favicons</a>,
<a href="http://blog.insight.sensiolabs.com/2017/06/06/new-documentation-organization.html">documentation on how to compute statuses</a>
for your analyses, etc.</p>

<p>To go even further, we have added support for notifications. Notifications are simple configurations you can
add to your projects to be notified directly in your favorite messaging app if an analysis succeeded or failed.
For instance, you could add the following configuration to your project to be notified in Slack:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">notifications:
    - type: slack
      url: https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXX
      channel: &#39;#insight&#39;
</code></pre></div>
<div style="margin: 25px 0;">
<img class="screenshot" title="Slack notifications" src="/img/screenshots/notifications-slack-result.png" />
</div>

<p>You can learn more about notifications
<a href="https://insight.sensiolabs.com/docs/notifications.html">in the dedicated section of the documentation</a>.</p>

<p>For now, we support <a href="https://insight.sensiolabs.com/docs/notifications/receive-slack-notifications.html">Slack</a>,
<a href="https://insight.sensiolabs.com/docs/notifications/receive-hipchat-notifications.html">HipChat</a> and
<a href="https://insight.sensiolabs.com/docs/notifications/custom-webhook.html">custom WebHooks</a>.
We plan to add support for other apps so don&#39;t hesitate to write a comment under this blog post to ask for one!</p>

<p>As always, if you have any issue, feel free to contact us using the &quot;Contact us&quot; button on the left side
of each page of SensioLabsInsight.</p>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Adding support for Symfony Flex</title>
   <link href="http://blog.insight.sensiolabs.com/2017/08/11/using-symfony-flex-in-sensiolabsinsight.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-08-11T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/08/11/using-symfony-flex-in-sensiolabsinsight</id>
   <summary>Analyze your Symfony Flex projects with SensioLabsInsight</summary>
   <content type="html">
    <![CDATA[
    <p>The usage of <a href="https://github.com/symfony/flex">Symfony Flex</a> is growing and will continue to grow
as it becomes the standard way to create Symfony projects.</p>

<p>Symfony Flex is a Composer plugin providing several major improvements over the Standard Edition,
the classic way of creating Symfony projects. By default, it is extremely slim to let you add only
what you need. It also automatically configures and uninstalls packages when you need or don&#39;t need
them anymore. Finally, it is suited to much more use cases than just the simple web application
scenario.</p>

<p>As more and more applications start using Symfony Flex, we have added support for it in
SensioLabsInsight. To analyze a Symfony Flex application, create it with the
<strong>Symfony 3/4 web project</strong> project type and everything will work as expected, out of the box!</p>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Support for .env files</title>
   <link href="http://blog.insight.sensiolabs.com/2017/07/24/dotenv-file-support.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-07-24T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/07/24/dotenv-file-support</id>
   <summary>Support for .env files let you configure your project more easily</summary>
   <content type="html">
    <![CDATA[
    <p>A common practice in project development is to store some configuration options as environment variables.
In development, testing, qa mode, using a <code>.env</code> file (pronounced &quot;dot-env&quot;) is common
instead of using &quot;real&quot; environment variables.</p>

<p>The built-in support of this technique was
<a href="http://symfony.com/blog/new-in-symfony-3-3-dotenv-component">added in Symfony 3.3</a>
and <a href="https://github.com/symfony/flex">Symfony Flex</a>, the new way to create projects in Symfony 3.4, will use it
by default.</p>

<p>As more applications are migrating towards the usage of environment variables, we added support for
<code>.env.dist</code> files in SensioLabsInsight.</p>

<p>To use it, create a <code>.env.dist</code> file in the working directory of your project and all environment variables
defined in it will be accessible during Composer installation and during the analysis.</p>

<p>This feature helps supporting Symfony 4 and Symfony Flex on SensioLabsInsight and it also means that any project
you have may now use environment variables easily (even non-Symfony projects).</p>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Improved .sensiolabs.yml handling</title>
   <link href="http://blog.insight.sensiolabs.com/2017/07/06/improved-sensiolabs-yml.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-07-06T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/07/06/improved-sensiolabs-yml</id>
   <summary>We made everything configurable in the .sensiolabs.yml file</summary>
   <content type="html">
    <![CDATA[
    <p>As you may have already experienced with other SaaS tools, storing configuration as a file in the project
has many advantages: the configuration lies close to the code, it is possible to change the
configuration for a specific branch / PR, it is possible to try different configurations, etc.</p>

<p>At SensioLabsInsight, we embrace this by promoting the usage of the <code>.sensiolabs.yml</code> file in your repository
to <a href="https://insight.sensiolabs.com/docs/getting-started/configuring-sensiolabsinsight.html">configure how your project should be analyzed</a>
over the web based configuration.</p>

<p>However, due to how we run analysis internally, some options such as the PHP version or its extensions were only
available in the web configuration.</p>

<p>We improved this experience by adding support for
<a href="https://insight.sensiolabs.com/docs/reference/configuration-options.html">all the configuration options</a> in the YAML
configuration file. Configuring SensioLabsInsight is now possible entirely from the <code>.sensiolabs.yml</code> file!</p>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Improving the project creation experience</title>
   <link href="http://blog.insight.sensiolabs.com/2017/06/28/improving-project-creation-experience.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-06-28T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/06/28/improving-project-creation-experience</id>
   <summary>We improved the project creation forms to be clearer and easier to use.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabsInsight has always been agnostic as to where your code is hosted. Whether it&#39;s in a self-hosted
Git server, on BitBucket or on GitHub, we analyze it.</p>

<p>However, there is always room for improvements, especially for special cases which are a bit more difficult
to setup like when your code cannot be pulled automatically by Insight.</p>

<p>To improve this, we added a new project creation page and updated project creation forms.</p>

<p>The new creation page aims to help you choose the right creation method for your project. As some features differ
from one method to another, we now give you advices on how to create your project the proper way:</p>

<div style="margin: 25px 0;">
<img class="screenshot" title="The page creation method chooser" src="/img/screenshots/project_creation_choose_method.png" />
</div>

<p>Creation forms are also updated to be more expressive about the role of each field:</p>

<div style="margin: 25px 0;">
<img class="screenshot" title="The page creation method chooser" src="/img/screenshots/project_creation_new_form.png" />
</div>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Updating the favicon according to the analysis status</title>
   <link href="http://blog.insight.sensiolabs.com/2017/06/22/analysis-status-favicons.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-06-22T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/06/22/analysis-status-favicons</id>
   <summary>You can see if your analysis succeeded directly from your browser tab.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabsInsight now updates its favicon according to your analysis statuses, letting you see if your analysis
succeeded directly from your browser tab:</p>

<div class="favicon-status">
<img title="Favicon for in progress analysis" src="/img/screenshots/favicon_status_in_progress.png" />
<span>The favicon for <strong>in progress</strong> analysis</span>
<div class="clearfix"></div>
</div>

<div class="favicon-status">
<img title="Favicon for succeeded analysis" src="/img/screenshots/favicon_status_success.png" />
<span>The favicon for <strong>succeeded</strong> analysis</span>
<div class="clearfix"></div>
</div>

<div class="favicon-status">
<img title="Favicon for failed analysis" src="/img/screenshots/favicon_status_failure.png" />
<span>The favicon for <strong>failed</strong> analysis</span>
<div class="clearfix"></div>
</div>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Adding a search engine to the documentation</title>
   <link href="http://blog.insight.sensiolabs.com/2017/06/13/documentation-search-with-algolia.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-06-13T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/06/13/documentation-search-with-algolia</id>
   <summary>The new documentation can now be explored even more quickly.</summary>
   <content type="html">
    <![CDATA[
    <p>Last week, we announced a <a href="/2017/06/06/new-documentation-organization.html">new organization for the documentation</a>.</p>

<p>To help you explore SensioLabsInsight documentation seamlessly, we added a search engine
based on <a href="https://www.algolia.com/">Algolia</a>.</p>

<p>Find it on <a href="https://insight.sensiolabs.com/docs">https://insight.sensiolabs.com/docs</a>.</p>

<div style="margin: 25px 0;">
<a href="https://insight.sensiolabs.com/docs">
<img class="screenshot" title="Adding a search engine to the documentation" src="/img/screenshots/doc_search.jpg" />
</a>
</div>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Improving our documentation</title>
   <link href="http://blog.insight.sensiolabs.com/2017/06/06/new-documentation-organization.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-06-06T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/06/06/new-documentation-organization</id>
   <summary>The documentation has been reorganized to be clearer and more readable.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabsInsight is a powerful tool: by integrating it into your Continuous Integration processes,
it analyzes your code during the whole lifetime of your projects, keeping their quality from
degrading and letting you detect issues at review time.</p>

<p>As SensioLabsInsight needs access to your code, configuring it depends on where your code is hosted
and how you run your test suites. Combined with a wide range of configuration settings, it might be
time consuming to optimize its integration with your projects.</p>

<p>Knowing all this, we rewrote the documentation, aiming it to be clearer, more precise and better
organized to suit most common needs.</p>

<div style="margin: 25px 0;">
<a href="https://insight.sensiolabs.com/docs">
<img class="screenshot" title="The new documentation is clearer and better organized" src="/img/screenshots/new_doc.jpg" />
</a>
</div>

<p>For instance, you can read a new
<a href="https://insight.sensiolabs.com/docs/getting-started.html">Getting started tutorial</a> 
explaining in details the concepts of SensioLabsInsight, new documentation categories dedicated
to the different platforms supported by SensioLabsInsight and 
<a href="https://insight.sensiolabs.com/docs/reference/configuration-options.html">a new reference page</a>
listing all SensioLabsInsight&#39;s options.</p>

<p>Read it on <a href="https://insight.sensiolabs.com/docs">https://insight.sensiolabs.com/docs</a>.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Unveiling a new analysis report for pull requests</title>
   <link href="http://blog.insight.sensiolabs.com/2017/06/02/pr-analysis-view.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-06-02T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/06/02/pr-analysis-view</id>
   <summary>SensioLabsInsight provides analysis reports dedicated to pull requests.</summary>
   <content type="html">
    <![CDATA[
    <p>As you may have noticed in the last blog posts, we are currently working on improving the integration
of SensioLabsInsight into GitHub.</p>

<p>A few months ago, we introduced
<a href="http://blog.insight.sensiolabs.com/2016/11/07/introducing-github-integration.html">pull requests analysis and commit status on GitHub</a>.
You can now configure conditions that check the quality of your project during your development process.</p>

<p><a href="http://blog.insight.sensiolabs.com/2017/05/31/pr-failure-conditions.html">New failure conditions attached to pull requests</a>
ensure the quality of your project stay manageable on each individual pull request.</p>

<p>We continue in this direction by adding a new analysis view dedicated to GitHub pull requests. This new
report displays violations related to the files modified in the pull request. </p>

<div style="margin: 25px 0;">
<a href="https://insight.sensiolabs.com/projects/4857379a-951f-4ce3-8ec7-7f915def69df/analyses/2?status=commit">
<img class="screenshot" title="GitHub pull request dedicated analysis view" src="/img/screenshots/github_pr_analysis_view.jpg" />
</a>
</div>

<p>This feature is a major improvement for anyone using SensioLabsInsight with GitHub as it will be much easier to
find issues introduced in each pull request. We hope this feature will become your new ally during your next Pull
Request reviews!</p>

<p><strong>A smooth experience for GitHub users on SensioLabsInsight</strong></p>

<p>This new feature is a step towards a goal we are targeting since a few weeks: bringing a great and smooth
user experience for GitHub users on SensioLabsInsight.</p>

<p>This will lead us to many more modifications, including some not only targeting GitHub. We hope these
changes will help you to increase your productivity and to focus as much as possible on what really matters:
your business logic.</p>

<p>In the meantime, I would like to share with you a small screencast I made to show how quick it can be to set up
SensioLabsInsight for a Symfony project hosted on GitHub. Enjoy!</p>

<div style="text-align: center; margin: 25px 0;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/sa16_ALQzLo" frameborder="0" allowfullscreen></iframe>
</div>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing new failure conditions related to the current PR</title>
   <link href="http://blog.insight.sensiolabs.com/2017/05/31/pr-failure-conditions.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-05-31T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/05/31/pr-failure-conditions</id>
   <summary>With the introduction of the SensioLabsInsight commit status on GitHub, you can configure conditions that check the quality of your project. We added variables related to the current pull request in these conditions.</summary>
   <content type="html">
    <![CDATA[
    <p>With the introduction of the
<a href="http://blog.insight.sensiolabs.com/2016/11/07/introducing-github-integration.html">the SensioLabsInsight commit status on GitHub</a>,
you can configure conditions that check the quality of your project during your development process.</p>

<p>For example, to ensure that the quality of your project does not decrease on pull requests, you can use a
configuration like the following:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">commit_failure_conditions:
    - &quot;project.severity.critical &gt; 0&quot;
    - &quot;project.severity.major &gt; 0&quot;
    - &quot;project.severity.minor &gt; 0&quot;
    - &quot;project.severity.info &gt;= 15&quot;
</code></pre></div>
<p>Failure conditions and Github statuses were already a big step forward in the integration of SensioLabsInsight into
your development pipeline. We made it even more powerful with failure conditions related to the current pull request.</p>

<p><strong>Pull requests related failure conditions</strong></p>

<p>The concept is quite simple but very useful: in addition of the <code>project</code> variable, you can now use the <code>pr</code> variable 
that gives access to the violations related to files modified by the pull request.</p>

<p>This configuration can be useful for instance in the case of legacy projects needing a migration towards better
practices: instead of having a huge list of issues, you can now use SensioLabsInsight to improve your project
quality steps by steps.</p>

<p>Here is the reference of this new variable:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">commit_failure_conditions:
    - &quot;project.severity.critical &gt; 0&quot;
    - &quot;project.severity.major &gt; 0&quot;

    # Fail by severities count introduced by the current pull request
    # - &quot;pr.severity.critical &gt; 0&quot;
    # - &quot;pr.severity.major &gt; 0&quot;
    # - &quot;pr.severity.minor &gt; 0&quot;
    # - &quot;pr.severity.info &gt;= 15&quot;
    #
    # Fail by categories count introduced by the current pull request
    # - &quot;pr.category.architecture &gt; 0&quot;
    # - &quot;pr.category.bugrisk &gt; 0&quot;
    # - &quot;pr.category.codestyle &gt; 0&quot;
    # - &quot;pr.category.deadcode &gt; 0&quot;
    # - &quot;pr.category.performance &gt; 0&quot;
    # - &quot;pr.category.readability &gt; 0&quot;
    # - &quot;pr.category.security &gt; 0&quot;
    #
    # Fail by total count introduced by the current pull request
    # - &quot;pr.violations &gt; 150&quot;
</code></pre></div>
<p>We hope this feature will help you improve the quality of your projects, enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Updating deprecation rules for PHP 7.2</title>
   <link href="http://blog.insight.sensiolabs.com/2017/02/02/deprecations-php-7-2.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2017-02-02T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2017/02/02/deprecations-php-7-2</id>
   <summary>Following the acceptance of [the PHP 7.2 deprecation RFC](https://wiki.php.net/rfc/deprecations_php_7_2), we updated the SensioLabsInsight deprecation rules</summary>
   <content type="html">
    <![CDATA[
    <p>A few days ago, <a href="https://wiki.php.net/rfc/deprecations_php_7_2">the PHP 7.2 deprecation RFC</a> proposed by Nikita Popov
was accepted, meaning that several deprecations will be added to the PHP engine in 7.2. Therefore, today we updated the
SensioLabsInsight deprecation rules in order to match these changes.</p>

<p><strong>__autoload</strong></p>

<p>The <code>__autoload</code> is now deprecated in favor of <code>spl_autoload_register</code> as it is much more flexible allowing chained
autoloaders to be registered and as these two autoload registration methods are incompatible.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">function __autoload($className) {
    include $className.&#39;.php&#39;;
}

// Should be replaced by

spl_autoload_register(function($className) {
    include $className.&#39;.php&#39;;
});
</code></pre></div>
<p><strong>create_function</strong></p>

<p><code>create_function</code> was a technique used before PHP 5.3 and based on <code>eval</code> to create lambda functions. Due to its nature,
this function is not performant and is not needed anymore. It should not be used anymore.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">create_function(&#39;$a, $b&#39;, &#39;return strlen($b) - strlen($a);&#39;);

// Should be replaced by

function($a, $b) {
    return strlen($b) - strlen($a);
};
</code></pre></div>
<p><strong>gmp_random</strong></p>

<p><code>gmp_random</code> generates a random number between <code>0</code> and <code>2**($n*BITS_PER_LIMB)-1</code>, where <code>BITS_PER_LIMB</code> is platform
specific and not accessible for userland code. Therefore, this function is tied to the platform and should not be used.</p>

<p>PHP 5.6 introduced <code>gmp_random_bits()</code> and <code>gmp_random_range()</code> functions to solve this issue. These functions should
always be preferred over <code>gmp_random()</code>.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">gmp_random();

// Should be replaced by

gmp_random_range($min, $max); // or
gmp_random_bits($bits);
</code></pre></div>
<p><strong>each</strong></p>

<p><code>each</code> is a technique that can be used to iterate over an array, similarly to <code>foreach</code>. However, it is inferior to
foreach in every way, being 10 times slower and posing problems to the engine. Therefore, <code>foreach</code> should always be
preferred.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">while (list($key, $val) = each($array)) {
    echo $key.&#39; =&gt; &#39;.$val.&#39;&lt;br /&gt;&#39;;
}

// Should be replaced by

foreach ($array as $key =&gt; $value) {
    echo $key.&#39; =&gt; &#39;.$val.&#39;&lt;br /&gt;&#39;;
}
</code></pre></div>
<p>Don’t hesitate to drop us a message if you face any issue.</p>

<p>Enjoy!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing the SensioLabsInsight commit status on GitHub</title>
   <link href="http://blog.insight.sensiolabs.com/2016/11/07/introducing-github-integration.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2016-11-07T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2016/11/07/introducing-github-integration</id>
   <summary>Now available: get your analysis results straight to GitHub, and never merge poor code anymore.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabsInsight main goal has always been to give you &quot;insights&quot; of your code in order to monitor its quality
and the technical debt of your project. A few days ago, we introduced a powerful feature to improve your developer
experience in this domain: the SensioLabsInsight commit status on GitHub.</p>

<h3>The challenge of keeping clean code</h3>

<p>Keeping code clean during the first phase of a project is usually not too difficult: the team does not change much,
the architecture was well thought to solve the original problem and the code is written in big chunks, following the
same conventions at each modification.</p>

<p>On the other hand, all along the project lifespan, the team changes, the original problem evolves and the code has to
adapt to these changements. This naturally leads to technical debt.</p>

<p>As developers, technical debt is our worst enemy: it brings bugs and lack of trust in the code, it makes the project&#39;s
architecture fragile and ultimately it dramatically slows down development speed. While keeping code clean is therefore essential, it&#39;s usually very difficult to measure it and act early enough.</p>

<p>That&#39;s where SensioLabsInsight shines: by providing an objective and thorough analysis of your project&#39;s code, it will
give you an idea on when and how you have to act to avoid technical debt.</p>

<h3>The SensioLabsInsight commit status on GitHub: the ultimate tool in your hands</h3>

<p>At SensioLabs, we are developers, just like you. We understand how important Continous Integration is and especially
how its integration in your development process has to be as smooth as possible.</p>

<p>Today, we bring SensioLabsInsight to you by integrating it in your development process directly as a Github status on
your pull requests, just like your other Continous Integration tools.</p>

<p><img class="screenshot" title="SensioLabs Insight integration in the Github repository of Blackfire"
        src="/img/screenshots/github_integration.png" /></p>

<p>This feature is enabled by default on every Github project and has been backported to every repository, even created
before today. You should already get commit statuses on your pull requests!</p>

<h3>Configure it to your needs</h3>

<p>The commit status is processed by analysing your code and evaluating a few conditions called &quot;failure conditions&quot;:
if one of them is evaluated as true, the commit is displayed as failed on Github.</p>

<p>To change the failure conditions, you can add the key <code>commit_failure_conditions</code> to you project configuration (in the
web interface) or to your <code>.sensiolabs.yml</code> file (in your repository).</p>

<p>Here is the reference of this configuration key:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">commit_failure_conditions:
    # By severities count (default configuration, any change will override it)
    - &quot;project.severity.critical &gt; 0&quot;
    - &quot;project.severity.major &gt; 0&quot;

    # # By other severities count
    # - &quot;project.severity.minor &gt; 0&quot;
    # - &quot;project.severity.info &gt;= 15&quot;
    #
    # # By categories count
    # - &quot;project.category.architecture &gt; 0&quot;
    # - &quot;project.category.bugrisk &gt; 0&quot;
    # - &quot;project.category.codestyle &gt; 0&quot;
    # - &quot;project.category.deadcode &gt; 0&quot;
    # - &quot;project.category.performance &gt; 0&quot;
    # - &quot;project.category.readability &gt; 0&quot;
    # - &quot;project.category.security &gt; 0&quot;
    #
    # # By project grade (none, bronze, silver, gold, platinum)
    # - &quot;project.grade &gt;= gold&quot;
    #
    # # By total violations count
    # - &quot;project.violations &gt; 150&quot;
</code></pre></div>
<p>We&#39;re very happy to release this feature, please help us make it better by giving your feedback!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing new rules for PHP 7 and Symfony</title>
   <link href="http://blog.insight.sensiolabs.com/2016/07/27/new-rules-php-7-symfony-3-2.html"/>
   <author>
    <name>Titouan Galopin</name>
   </author>
   <updated>2016-07-27T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2016/07/27/new-rules-php-7-symfony-3-2</id>
   <summary>A few months ago, we [added the support for PHP 7 projects](http://blog.insight.sensiolabs.com/2016/01/11/php-7.html) in SensioLabsInsight. Today, we are glad to announce the addition of several new rules concerning PHP 7 and the upcoming Symfony.</summary>
   <content type="html">
    <![CDATA[
    <p>A few months ago, we <a href="http://blog.insight.sensiolabs.com/2016/01/11/php-7.html">added the support for PHP 7 projects</a>
in SensioLabsInsight. Today, we are glad to announce the addition of several new rules concerning PHP 7 and Symfony.</p>

<h3>New rule for missing visibillity on class methods and properties</h3>

<p>One of the main goals of SensioLabsInsight is to promote the best practices used by professional PHP applications.
With this in mind, we introduced a new rule to ensure a project always uses visibility flags (public/protected/private)
on its class methods and properties.</p>

<p>There are a few reasons to always use visibility flags:</p>

<ul>
<li>it helps to show the intent of classes</li>
<li>it provides coding guidelines on how the code should be used</li>
<li>it reduces the need to validate properties when used internally</li>
</ul>
<div class="highlight"><pre><code class="language-php" data-lang="php">class Example
{
    // This will now trigger a violation
    static $foo = 4;

    // This will now trigger a violation
    function bar() {
        return 0;
    }

    // This is valid
    public static $foob = 4;

    // This is valid
    private function barb() {
        return 0;
    }
}
</code></pre></div>
<h3>New rule for PHP 7 reserved words</h3>

<p>PHP 7 introduced a list of
<a href="http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.other.classes">new reserved keywords</a>
(and <a href="https://github.com/php/php-src/blob/php-7.1.0beta1/UPGRADING">PHP 7.1 is continuing to do so</a>)
which should not be used as classes, interfaces or traits names to avoid issues when migrating.</p>

<p>This rule will warn you if a class, an interface or a trait in your code uses a reserved keyword.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">// Invalid class name
class Int {}

// Invalid interface name
interface Bool {}

// Invalid trait name
trait Void {}
</code></pre></div>
<h3>Return type hints are now properly taken into account</h3>

<p>Until now, return type hints were not taken into account as the usage of a class or an interface and false positive
&quot;Unused use statement&quot; violations were triggered.</p>

<p>This is fixed as return type hints are now handled properly by SensioLabsInsight.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">use Foo\Bar;

// This won&#39;t trigger a &quot;Unused use statement&quot; violation anymore
function myFunction(): Bar {
    return otherFunction();
}
</code></pre></div>
<h3>Allow the usage of the Event annotation</h3>

<p>The usage of the <a href="https://github.com/symfony/symfony/pull/12299">Event annotation in Symfony</a> core code is
progressively increasing to provide a useful autocompletion basis for development environments.</p>

<p>Until now, this annotation was considered as a regular Doctrine annotation and a violation was triggered as it was
not imported with a <code>use</code>. We fixed this behavior to accept this annotation as a native one (on the same level as
<code>@param</code> and <code>@return</code>).</p>

<h3>Updated deprecated functions, classes and methods for PHP 7 and Symfony 3.2</h3>

<p>Following the changes of PHP and Symfony in term of deprecations, we updated our rules to ease your work in migrating
towards new versions.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>GitHub dropping API rate limiting: faster analyses</title>
   <link href="http://blog.insight.sensiolabs.com/2016/03/15/github-composer-rate-limiting-dropped.html"/>
   <author>
    <name>Christophe Dujarric</name>
   </author>
   <updated>2016-03-15T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2016/03/15/github-composer-rate-limiting-dropped</id>
   <summary>Thanks to the Drupal Community, Composer team and GitHub, we could change our dependency management strategy. And your analyses keep being faster, with simple changes on our side.</summary>
   <content type="html">
    <![CDATA[
    <p>At the start of a SensioLabsInsight analysis, we first get all of your
project’s dependencies via Composer.</p>

<p>There’s two ways to do that. Either by downloading it via GitHub’s API, or via
a <code>git clone</code>. The second option can be much more expensive in time.</p>

<p>When we released SensioLabsInsight, GitHub had one limitation: 60 call per hour
on the API. Given the huge number of analyses we run each hour, you can imagine
that we didn’t have a choice but to <code>git clone</code>.</p>

<p>The great news, to some extent, is that we weren’t the only ones to face this
issue. And the Drupal Community was the one to
<a href="https://github.com/composer/composer/issues/4884">trigger the change</a>.
Nils and Jordi got in touch with the GitHub team, who had done some great job
on their infrastructure meanwhile. They were able to drop the API rate
limiting.</p>

<p>Right away, we changed our ComposerInstallScript.php file. Here&#39;s the diff:
<img src="/img/screenshots/diff-composer-github.png" alt="Composer Script diff"></p>

<p>What’s in it for you? Faster analyses!</p>

<p>Enjoy,</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>PHP7 projects analysis support</title>
   <link href="http://blog.insight.sensiolabs.com/2016/01/11/php-7.html"/>
   <author>
    <name>Christophe Dujarric</name>
   </author>
   <updated>2016-01-11T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2016/01/11/php-7</id>
   <summary>You can now analyse PHP7 projects with SensioLabsInsight!</summary>
   <content type="html">
    <![CDATA[
    <p>Last week, we announced <a href="/2016/01/06/symfony-3.html">Symfony3 support</a> on
SensioLabsInsight. Well, good news never come alone, PHP7 is now also supported.</p>

<p>What changes? Nothing. It’s just working.</p>

<p>Don’t hesitate to drop us a message to support@sensiolabs.com if you face any
issue.</p>

<p>Enjoy,</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Symfony 3 projects analysis support</title>
   <link href="http://blog.insight.sensiolabs.com/2016/01/06/symfony-3.html"/>
   <author>
    <name>Christophe Dujarric</name>
   </author>
   <updated>2016-01-06T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2016/01/06/symfony-3</id>
   <summary>You can now analyse Symfony3 projects with SensioLabsInsight!</summary>
   <content type="html">
    <![CDATA[
    <p>In the past year, we’re happy to have brought you a solid and stable service. We
haven’t added much features, but we took a lot of care about quality of service,
by building more reliable infrastructures and queues handling. The main impact
for you as end users has been: analyses launching and executing faster.</p>

<p>End of 2015, two major breakthroughs happened in the PHP world: PHP7 and
Symfony3. We of course had to support it in SensioLabsInsight.</p>

<p>You can now simply analyse Symfony 3 projects, just like you used to analyse
Symfony2, Laravel, Drupal, etc.</p>

<p>Follow our getting started tutorial, and select Symfony3 Web Project at step 2.</p>

<p>Stay tuned for PHP7 support!</p>

<p>Don’t hesitate to drop us a message to support@sensiolabs.com if you face any
issue.</p>

<p>Enjoy,</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing faster code quality analysis</title>
   <link href="http://blog.insight.sensiolabs.com/2015/01/23/introducing-faster-code-quality-analyses.html"/>
   <author>
    <name>Javier Eguiluz</name>
   </author>
   <updated>2015-01-23T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2015/01/23/introducing-faster-code-quality-analyses</id>
   <summary>SensioLabsInsight has introduced some big optimizations to its code analysis engine that reduce the analysis duration up to a third of its previous time.</summary>
   <content type="html">
    <![CDATA[
    <p><a href="https://en.wikipedia.org/wiki/Wirth&#x27;s_law">Wirth&#39;s law</a> is a well-known 
computing adage coined by Niklaus Wirth which states that <em>&quot;software gets 
slower faster than hardware gets faster&quot;</em>.</p>

<p>At SensioLabsInsight we&#39;re committed to break this law as much as possible.
In addition to upgrading our servers hardware on a regular basis, we are 
constantly optimizing our code analyses engine.</p>

<p>Most of the times, these code optimizations provide a small reduction in the
time it takes to analyze projects. However, a few days ago we introduced an
engine optimization that <strong>has reduced analysis time up to a third of the
previous time</strong>.</p>

<p>The following chart plots the analysis duration for a project that contains
about 180,000 lines of code and tens of code quality violations. The red line
marks the moment when the new analysis engine was introduced:</p>

<p><img class="screenshot" title="Evolution of the analysis duration for a sample project of SensioLabsInsight" src="/img/shorter-analysis-duration.png" /></p>

<p>Faster analyses mean that you&#39;ll get earlier feedback whenever your codebase 
introduces code quality violations. Therefore, your development team would be
able to tackle quality problems as soon as they are introduced.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Making a Symfony application bootable again with Doctrine DBAL 2.5</title>
   <link href="http://blog.insight.sensiolabs.com/2014/12/22/making-symfony-bootable-with-dbal-2-5.html"/>
   <author>
    <name>Javier Eguiluz</name>
   </author>
   <updated>2014-12-22T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/12/22/making-symfony-bootable-with-dbal-2-5</id>
   <summary>DBAL 2.5 introduced a change that is making a lot of applications not bootable in SensioLabsInsight. Learn how to fix this problem and how to make your application bootable again.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabsInsight uses a dynamic analysis engine to boot applications in order
to find bugs and errors impossible to find by a simple static analysis. That&#39;s
why, when your application is not bootable, SensioLabsInsight triggers a code
quality violation and disables some analysis rules.</p>

<p>In normal circumstances this error is rarely seen in the analyses performed by
our users, but a recent change introduced by the 2.5 version of the DBAL
project is breaking lots of projects on SensioLabsInsight.</p>

<p>Basically, when calling the <code>getDatabasePlatform()</code> method in DBAL 2.5, that
call needs to establish a connection in order to evaluate the appropriate
database platform class if <code>Doctrine\DBAL\Connection</code> is not already connected.</p>

<p>The workaround is to explicitly configure the database server version used by
Doctrine. In Symfony applications, this is as easy as declaring the <code>server_version</code>
parameter of Doctrine DBAL in the <code>app/config/config.yml</code> file. The
value of this parameter must be the version number of your database server.
For example, if you use MySQL, execute <code>mysql -V</code> to get the version and
configure it as follows:</p>
<div class="highlight"><pre><code class="language-text" data-lang="text"># app/config.yml
doctrine:
    dbal:
        server_version: 5.6
</code></pre></div>
<p>In addition to making your application bootable again for SensioLabsInsight,
this new parameter will save your application one database call/connection on
production environment.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Technical debt of the most relevant PHP projects</title>
   <link href="http://blog.insight.sensiolabs.com/2014/11/04/technical-debt-relevant-projects.html"/>
   <author>
    <name>Javier Eguiluz</name>
   </author>
   <updated>2014-11-04T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/11/04/technical-debt-relevant-projects</id>
   <summary>SensioLabsInsight analyzes PHP projects and calculates an estimation of their technical debt. Tracking the evolution of this value is important to know if your project is improving or deteriorating.</summary>
   <content type="html">
    <![CDATA[
    <p>A few days ago, the following graph about the technical debt of some relevant PHP projects went very popular on Twitter:</p>

<p><img class="screenshot" title="Technical debt of the most relevant PHP projects" src="/img/screenshots/technical_debt_php.png" /></p>

<p>This graph shows the estimated amount of time that it would take for each project to fix all the problems found by the <a href="https://insight.sensiolabs.com/">SensioLabsInsight</a> analysis service.</p>

<p>Some of you made a lot of interesting questions and comments about the graph and we&#39;d like to clarify some things in this article.</p>

<h2>Important information is missing</h2>

<p>First of all, as any other graph, there is a lot of missing information that should be considered to better analyze the results. For starters, <strong>project age</strong> is a determining factor in its quality. WordPress and phpBB were released more than 10 years ago, before most of the modern PHP features were available. This put those projects in a competitive disadvantage over other more modern applications such as Composer or Doctrine.</p>

<p>Another important factor missing on the graph is the <strong>project size</strong>. Projects with large codebases, such as WordPress or Drupal, are always going to have more technical debt than small projects such as Silex or Twig. However, large projects usually have lots of contributing developers and thus, technical debt could be more easily assessed on large projects.</p>

<h2>SensioLabsInsight is not a Symfony service</h2>

<p>SensioLabsInsight is a service provided by <a href="http://sensiolabs.com/">SensioLabs</a>, the company behind the Symfony project. Since all the Symfony ecosystem products (Symfony, Silex, Twig) got excellent results on the analysis, some of you expressed concerns about the analysis impartiality.</p>

<p>First, <strong>SensioLabsInsight is not a Symfony-focused service</strong>. Our motto is <em>&quot;PHP Quality Done right&quot;</em> and we analyze any PHP project or library applying the same analysis rules.</p>

<p>Nevertheless, if you analyze Symfony applications, we apply additional rules specially designed for that framework. And the same goes for Drupal, Laravel and Silex projects. We apply special rules for those projects, meaning that their analyses are stricter.</p>

<p>But if your project is not based on Drupal, Laravel, Silex or Symfony, the special rules are not applied and therefore, the analysis results aren&#39;t impacted. Moreover, if some of the analysis rules affect your project in an unfair way, you can <a href="https://insight.sensiolabs.com/howtos/ignore-all-violations.html">ignore those rules from the technical debt calculation</a>.</p>

<h2>Tracking technical debt evolution</h2>

<p>Some developers interpreted this graph as an absolute score grading the quality of a project. This would mean for instance that Drupal is better than WordPress and Laravel is better than CakePHP. This is simply not true.</p>

<p>This graph only shows the <em>still photo</em> of the total technical debt of some PHP projects at a given time. The truly interesting metric is the <strong>evolution of the technical debt</strong>. If this value increases in time, the technical debt is out of control and using that project may be risky for companies. If the technical debt decreases in time, the project will eventually reach a manageable debt level.</p>

<h2>Analyze your own projects</h2>

<p>SensioLabsInsight lets you <a href="https://insight.sensiolabs.com/">analyze your PHP projects for free</a> and that&#39;s the best way to fully understand how the code quality analyses work and to get a first glimpse of your technical debt.</p>

<p>Analyzing the technical debt of your PHP projects may be useful for comparing them with those of your competitors, to check if your contractors are doing a good job and as an objective quality review before delivering some project.</p>

<p>To get the most out of SensioLabsInsight, read the <a href="https://insight.sensiolabs.com/howtos/getting-started.html">Getting Started tutorial</a>, <a href="https://insight.sensiolabs.com/howtos/phpstorm-plugin.html">install the PHPStorm plugin</a> and don&#39;t forget to proudly show the result using our <a href="https://insight.sensiolabs.com/howtos/medal-widget.html">cool medal widgets</a>.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>New plans, more documentation and unlimited collaborators</title>
   <link href="http://blog.insight.sensiolabs.com/2014/10/20/new-plans.html"/>
   <author>
    <name>Javier Eguiluz</name>
   </author>
   <updated>2014-10-20T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/10/20/new-plans</id>
   <summary>SensioLabsInsight introduces new plans which are more affordable and provide more features. In addition, Symfony-related rules documentation is now public and business plans will be allowed an unlimited number of collaborators.</summary>
   <content type="html">
    <![CDATA[
    <p>Over the past few months, we&#39;ve been listening to your feedback about
SensioLabsInsight, and we&#39;ve been working hard to find new ways so that
everyone can enjoy our services. Today we&#39;re <strong>rolling out new plans that are
cheaper and include more features</strong>.</p>

<h2>Introducing the Lite Individual Plan</h2>

<p>A lot of freelancers reached us to ask for a SensioLabsInsight plan with less
enterprise features and a more affordable price. That&#39;s why today we&#39;re
<strong>introducing a new Lite Individual Plan</strong> which provides all the major
features for one private project starting at <strong>6 euros/month</strong> for the yearly
subscription.</p>

<h2>Open documentation for Symfony rules</h2>

<p>Our code analysis rules are the result from the intensive practice by our
experts in auditing customer quality. When we detect a violation, we&#39;re not
simply telling you: « There&#39;s something wrong with your code ». We&#39;re telling
you why, how to solve it, and support it with references and clear examples.</p>

<p>That&#39;s why documentation is one of the best features of SensioLabsInsight.
Starting today, <strong>we&#39;ve decided to open the Symfony-related rules
documentation to all users</strong>.</p>

<p><img class="screenshot" title="Symfony rule documentation sample" src="/img/screenshots/symfony-documentation.png" /></p>

<h2>Unlimited collaborators for Business Plans</h2>

<p>We noticed that the collaborators feature showed great interest from the
Business plans users. As these plans are used by companies with large
development teams, most of them reached the maximum number of collaborators
limit too quickly. As a result, starting today we are allowing <strong>all business
plans an unlimited amount of collaborators</strong>.</p>

<h2>New plans switching and upgrading</h2>

<p>If you are already a monthly subscriber, at the end of your monthly
subscription, you&#39;ll have to either keep going with your current plan,
or to subscribe to one of the new plans. Users who subscribed yearly will
automatically be upgraded until the end of their current subscription. Check
out the <a href="https://insight.sensiolabs.com/pricing">new plans and pricing page</a> for a complete overview of each plan.</p>

<p>And if you feel like you need to talk with us or have more questions about
these new plans, don&#39;t hesitate to get in touch with our sales representative,
Ludovic Duval: ludovic.duval@sensiolabs.com</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing the SensioLabsInsight PHPStorm plugin</title>
   <link href="http://blog.insight.sensiolabs.com/2014/10/15/introducing-phpstorm-plugin.html"/>
   <author>
    <name>Javier Eguiluz</name>
   </author>
   <updated>2014-10-15T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/10/15/introducing-phpstorm-plugin</id>
   <summary>The new PHPStorm plugin for SensioLabsInsight seamlessly integrates the code quality analyses and reports into your favorite PHP IDE.</summary>
   <content type="html">
    <![CDATA[
    <p><a href="http://en.wikipedia.org/wiki/Technical_debt">Technical debt</a> is a recent metaphor used in the software industry to
refer to <em>&quot;the eventual consequences of poor system architecture or software
development within a codebase&quot;</em>. Following the metaphor, if the debt isn&#39;t
repaid, then it will keep on accumulating interest, making it hard to
implement changes later on.</p>

<p>When dealing with software, the total debt amount at a given moment is not that
important as its evolution in time. SensioLabsInsight premise is to analyze
your code quality on a continuous basis to easily track the evolution of your
technical debt.</p>

<p>In order to simplify the tracking of this evolution, we are proud to introduce
the <strong>new PHPStorm plugin for SensioLabsInsight</strong>. This new plugin seamlessly
integrates SensioLabsInsight <a href="https://insight.sensiolabs.com/howtos/getting-started.html#step-4-running-your-first-analysis">analyses</a> and <a href="https://insight.sensiolabs.com/howtos/getting-started.html#step-5-interpreting-your-first-report">reports</a> into your
favorite IDE.</p>

<p>Once installed, you&#39;ll see new markers that provide insights about the code
quality violations introduced by each line of code:</p>

<p><img class="screenshot" title="SensioLabsInsight marker on PHPStorm" src="/img/screenshots/phpstorm-plugin-code-quality-violation-marker.png" /></p>

<p>Moreover, this plugin displays a new panel at the bottom of PHPStorm window
that provides direct access to the most common tasks on SensioLabsInsight:</p>

<p><img class="screenshot" title="SensioLabsInsight panel in PHPStorm" src="/img/screenshots/phpstorm-plugin-sensiolabsinsight-panel.png" /></p>

<p>Learn how to install this plugin and discover all its features reading our new
tutorial about <a href="https://insight.sensiolabs.com/howtos/phpstorm-plugin.html">How to integrate SensioLabsInsight into PHPStorm</a> and <a href="http://blog.jetbrains.com/phpstorm/2014/10/sensiolabsinsight-integration-with-phpstorm/">the
screencast published at PHPStorm&#39;s official blog</a>.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing new rules for static methods and interfaces</title>
   <link href="http://blog.insight.sensiolabs.com/2014/08/29/introducing-new-rules-for-static-methods-and-interfaces.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2014-08-29T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/08/29/introducing-new-rules-for-static-methods-and-interfaces</id>
   <summary>This week we&#39;ve added two new code quality checks for PHP applications. The first one detects wrong uses of `$this` on static methods. The second one checks that interface classes use the `Interface` suffix.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabsInsight performs <a href="https://insight.sensiolabs.com/what-we-analyse">more than 100 code quality checks</a> for your PHP projects, such as Laravel applications and Drupal modules. Based on the
experience of our Audit Team, we are constantly adding new checks or rules. This week, we&#39;ve just released two new rules.</p>

<h3>Static method should not contain <code>$this</code> reference</h3>

<p>Static methods of PHP classes should not use <code>$this</code> but <code>self</code> to avoid errors at runtime. Although this is an easy rule to follow, it&#39;s not uncommon to introduce the following errors when refactoring your application code:</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php

class FileUtils
{
    private $contents = array();

    // This method used to be static
    // But to handle caching, it had to become an instance method
    public function getContents($filePath)
    {
        if (isset($this-&gt;contents[$filePath])) {
            return $this-&gt;contents[$filePath];
        }
        if (!file_exists($filePath)) {
            throw new \InvalidArgumentException(
                sprintf(&#39;Required file &quot;%s&quot; does not exist&#39;, $filePath)
            );
        }

        return $this-&gt;contents[$filePath] = file_get_contents($filePath);
    }

    public static function countNbLines($filePath)
    {
        // when getContents was turned to non-static, the developer updated
        // the call below. Unfortunately, they forgot to remove the static
        // keyword in the countNbLines() definition
        return substr_count($this-&gt;getContents($filePath), &quot;\n&quot;);
    }
}
</code></pre></div>
<p>Imagine overviewing this error until it&#39;s too late and your application is deployed in production! That&#39;s exactly what SensioLabsInsight is for: we keep on adding rules preventing bugrisks in production, to make your code always more robust.</p>

<h3>Interfaces names should end with &quot;Interface&quot;</h3>

<p>One of the main goals of SensioLabsInsight is to promote the good practices used by professional PHP applications. In the past we couldn&#39;t enforce those code checks because they could affect your analysis results. </p>

<p>However, now that <a href="http://blog.insight.sensiolabs.com/2014/07/29/goodbye-chocolate-medals.html">the chocolate medals are gone</a> we&#39;ll start adding lots of these code style checks on a regular basis.</p>

<p>The first one of these rules checks whether your interface classes include the <code>Interface</code> suffix:</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php

// Wrong interface name
interface Storage { ... }

// Wrong interface name
interface StorageInt { ... }

// Correct interface name
interface StorageInterface { ... }
</code></pre></div>
<p>Although this is not the only way to name interfaces, it&#39;s probably the easiest one to follow consistently in your codebase. Some developers prefer to use names such as <code>Loggable</code> and <code>Cacheable</code>. The problem with this approach is that sometimes is really hard to come up with a good name that follows this strategy.</p>

<p>In any case, as any other SensioLabsInsight rule, you can tweak its behavior. To do so, edit your project configuration and add the <code>interface_name_pattern</code> option to define the regular expression used to validate the name of the interfaces:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">rules:
    # ...
    php.interface_has_no_interface_suffix:
        enabled: true
        interface_name_pattern: /(Interface|Exception|able)$/
</code></pre></div>
<p>You can also <a href="https://insight.sensiolabs.com/howtos/ignore-all-violations.html">disable all violations reported by this rule</a> adding the following option to your project configuration:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">rules:
    # ...
    php.interface_has_no_interface_suffix:
        enabled: false
</code></pre></div>
<h3>False positives, tweaks and bugfixes</h3>

<p>As always, we keep on tuning these and the other rules for false positives. Don&#39;t hesitate to <a href="https://insight.sensiolabs.com/howtos/false-positives.html">report us any false positives</a> on the new rules.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Easier Analyses on GitHub Projects You Collaborate To</title>
   <link href="http://blog.insight.sensiolabs.com/2014/08/25/easier-analyses-on-github-projects-you-collaborate-to.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2014-08-25T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/08/25/easier-analyses-on-github-projects-you-collaborate-to</id>
   <summary>SensioLabsInsight adds full support of GitHub organizations to allow you to analyze any project you collaborate to.</summary>
   <content type="html">
    <![CDATA[
    <p>A few weeks ago we introduced <a href="http://blog.insight.sensiolabs.com/2014/06/13/add-project.html">Single Sign-On for GitHub and BitBucket</a> repositories to speed up the analyses of your projects. Your feedback so far has been enthusiastic and that&#39;s why today we are <strong>introducing a simpler process to analyze projects that belong to GitHub organizations</strong>.</p>

<p>These days it&#39;s common to use the same GitHub account both for personal and professional projects. Indeed, most of our users belong to at least one GitHub organization, where they can collaborate on projects owned by other users.</p>

<p>Starting today, when you click on the <code>Add Project</code> button, the project listing will show not only your personal projects, but also the projects created by all the GitHub organizations you belong to (up to 100 projects):</p>

<p><img class="screenshot" title="GitHub organization projects are now included when adding a new project to SensioLabsInsight" src="/img/screenshots/organizations_new_project.png" /></p>

<p>If you are one of the administrators of the selected project, the analysis will begin as soon as you click on the <code>Analyze</code> button. The reason is that when you are an administrator, SensioLabsInsight can automatically register a new SSH deploy key for you in the repository.</p>

<p>In case you are not an administrator, you&#39;ll see instead the following message:</p>

<p><img class="screenshot" title="Configuration needed for SensioLabsInsight projects where you are not an administrator" src="/img/screenshots/organizations_additional_configuration.png" /></p>

<p>As SensioLabsInsight cannot register a deploy key in these cases, you either have to fork the project to your private account or you have to use the <strong>Private Git</strong> option to analyze the project. The latter is the most convenient way and that&#39;s why SensioLabsInsight shows you the needed configuration.</p>

<p>We hope that this new feature will allow you to analyze the quality of all your organizations&#39; projects and we&#39;d love to get your feedback about it!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Goodbye, Chocolate Medals</title>
   <link href="http://blog.insight.sensiolabs.com/2014/07/29/goodbye-chocolate-medals.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2014-07-29T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/07/29/goodbye-chocolate-medals</id>
   <summary>An automated analyzer always has false positives. We&#39;re acknowledging this fact today by removing the concept of &quot;chocolate medal&quot;.</summary>
   <content type="html">
    <![CDATA[
    <p>When we launched Insight, we thought that the medals we granted to projects would be used to certify that projects reached a certain quality level. A project couldn&#39;t possibly show a Silver medal if there was some ignored major alerts - that would jeopardize the credibility of our medal grading, and that would prevent project quality benchmarks. Therefore, as soon as an analysis was altered (the project configuration was tweaked, or a violation was ignored), it received a chocolate medal.</p>

<p><img class="screenshot" title="A Chocolate medal on SensioLabsInsight" src="/img/screenshots/chocolate_in.png" /></p>

<p>It turns out that about 11% of all our analyses ended up with chocolate medals. That&#39;s much higher than we thought. Also, our users took their analysis medals quite seriously. They complained very loudly if a false positive violation prevented them from reaching a given medal. &quot;No problem,&quot; we used to reply, &quot;just ignore the false positive and you&#39;ll get the medal you want&quot;. The invariable answer sounded like: &quot;But that will give me a chocolate medal. Chocolate medals are cheap, everyone can get one for free in a cereal box. I want a genuine medal!&quot;.</p>

<p><img class="screenshot" title="SensioLabsInsight medals" src="/img/screenshots/medals.png" /></p>

<p>That revealed that our medals had a great value in the eyes of our users. But that was also a huge burden. A statical code analysis tool always has false positives. For Insight, every false positive had to be fixed in the analysis engine to prevent chocolate medals. We ended up tweaking our engine very thoroughly, completely rewriting some rules to take into account all the false positives reported by our users.</p>

<p>In retrospect, the chocolate medal idea was a mistake. When users consider a given violation as a false positive, we can&#39;t possibly interfere with that - they know their codebase, we don&#39;t. When users tweak / disable some rules because, in their organization, different coding standards apply, we can&#39;t tell them they&#39;re wrong. Dealing with false positives took us away from adding new rules to the analysis engine, and adding more features to Insight. Our rules must apply to 80% of the cases, not 100% - that&#39;s just way too expensive.</p>

<p><img class="screenshot" title="No more chocolate medals - genuine medals for everyone!" src="/img/screenshots/chocolate_out.png" /></p>

<p>Today, we&#39;re retiring chocolate medals. Even if you tweak project configurations, even if you ignore violations, <strong>you will always get a genuine medal</strong>. And if you want to benchmark your projects with other projects, don&#39;t stop at the medal. Also look at the score, the number of ignored violations, and the project configuration.</p>

<p>That doesn&#39;t mean that we&#39;ll stop fixing false positives in our rules. But we&#39;ll certainly spend less time doing that, and more time implementing new rules and new features.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing the Insight Score</title>
   <link href="http://blog.insight.sensiolabs.com/2014/06/26/insight-score.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2014-06-26T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/06/26/insight-score</id>
   <summary>In addition to the existing medal and remediation cost, each project is now graded on a 20 to 100 quality scale. Check out what the Insight Score tells about a project.</summary>
   <content type="html">
    <![CDATA[
    <p>What shows the evolution of the code quality of a PHP project? <a href="https://insight.sensiolabs.com/what-we-analyse">SensioLabsInsight medals</a> are a good indicator of the overall quality. But they don&#39;t change very often. A project can see its entire codebase rewritten without switching from bronze to silver. We needed a new way to score the quality of all projects analyzed on Insight. We&#39;ve just added it to all projects: it&#39;s called the Insight Score.</p>

<p>You will see the score under the medal, written on a ribbon: </p>

<p><img class="screenshot" title="SensioLabsInsight analyses now get a score" src="/img/screenshots/analysis_score.png" /></p>

<h3>20 is Bad, 95 is Excellent</h3>

<p>Each project now has a score on 100, based both on the remediation cost and the number of lines of code. Here is the score we computed on of a few <a href="https://insight.sensiolabs.com/analyses">public projects</a>:</p>

<ul>
<li>Silex: 94/100</li>
<li>Symfony2: 86/100</li>
<li>Faker: 77/100</li>
<li>SwiftMailer: 46/100</li>
<li>Doctrine ORM: 45/100</li>
<li>Twig: 27/100</li>
<li>Joomla:  27/100</li>
</ul>

<p>We&#39;re still tweaking our grading algorithm, but that already gives you an idea of where your project might be.</p>

<h3>How We Compute The Insight Score</h3>

<p>We first thought about using exclusively the remediation cost to compute the grade. But it turns out that large projects often have a heavy remediation cost, even though their codebase isn&#39;t necessarily of worse quality. It&#39;s just that the more you write code, the more chances you have to write bad code. Using only the remediation cost would make large projects have a lower score, and that would not be fair. We needed a scoring system to grade a project relative to projects of the same size. </p>

<p>Going further, we made a few statistics on all the analyses computed by Insight. On average, the remediation cost increases by one hour each time a projects gets bigger by about 60 lines of code. That means that the average remediation cost computed by Insight on the thousands of projects already analyzed is of <strong>one minute per line of code</strong>.</p>

<p>Whether a project is above or below that average is a great sign of its quality. That&#39;s why the Insight score is based on a remediation cost / lines of code ratio. The best projects get a 100, the worst get a 20, because we don&#39;t want to give a zero!</p>

<h3>Try It And Send Us Your Feedback</h3>

<p>We hope that this new score will help you assess your quality progression in a fine-grained way. Do you think it&#39;s fair for your project? Do you think it&#39;s not? Send us your feedback about this new feature!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>GitHub and BitBucket Single-Sign-On, Faster "New Project" Workflow</title>
   <link href="http://blog.insight.sensiolabs.com/2014/06/13/add-project.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2014-06-13T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/06/13/add-project</id>
   <summary>Do you want to analyze projects hosted on GitHub or BitBucket? We now support OAuth with these platforms, streamlining the analysis process a great deal.</summary>
   <content type="html">
    <![CDATA[
    <p>Do you want to analyze projects hosted on GitHub or BitBucket? We now support OAuth with these platforms, streamlining the analysis process a great deal.</p>

<h3>We Hear You</h3>

<p>Insight has always been agnostic as to where your code is hosted. Whether it&#39;s in a self-hosted Git server, in a public BitBucket project, or in a private GitHub repository, we analyze it. You just need to allow Insight to pull your code. </p>

<p>But that implies a lot of friction in the project addition process. We&#39;ve received various feedbacks about that process, none was  good. We&#39;ve compared what we do with similar services, and Insight is notoriously harder to dig into. We&#39;ve used our tool over and over, and we&#39;ve been exasperated just like you to have to create an account, setup SSH keys, go through up to 10 steps before the analysis actually starts.</p>

<p>To say the least, adding a new project on Insight has always been a rough path. But adding a new project is the very first thing new users do. The impressions we gave during this first contact weren&#39;t encouraging.</p>

<h3>Introducing GitHub and BitBucket Single-Sign-On via OAuth</h3>

<p>We&#39;ve just pushed the ability to add projects via GitHub and BitBucket directly, using their OAuth APIs. As a result, if your code is hosted by one of these platforms, you don&#39;t have to touch the keyboard anymore. In now takes about five clicks for a newcomer to launch an analysis. Five clicks, and less than a minute.</p>

<p><a href="https://insight.sensiolabs.com/"><img class="screenshot" title="First contact with SensioLabsInsight" src="/img/screenshots/github_bitbucket.png" /></a></p>

<p>And once you&#39;ve authorized SensioLabsInsight to access your repositories hosted on GitHub or BitBucket, analyzing yet another project becomes extremely simple. Our user base uses GitHub a lot, so I hope that this huge improvement will ease your life.</p>

<h3>Adding a Project Has Never Been Easier</h3>

<p>We&#39;ve also improved the usability of the project addition workflow in general, using a &quot;wizard&quot; approach. We&#39;ve minimized the amount of information required to get started. We&#39;ve simplified the process for every use case, including for those who host their code behind a firewall, and who need to push code to SensioLabsInsight rather than let us pull the code.</p>

<p>We&#39;ve done lots of user tests to validate our new design. We believe that adding a new project is not painful anymore, and it&#39;s even so easy that we&#39;ve analyzed more and more projects ourselves!</p>

<p><img class="screenshot" title="Analyzing a project from a private git with SensioLabsInsight" src="/img/screenshots/new_project_private.png" /></p>

<h3>Quality Made Simple</h3>

<p>Our purpose has always been to improve PHP code quality in general. Without the pain of setting up a CI server yourself, and using <a href="https://insight.sensiolabs.com/what-we-analyse">a unique set of PHP and Symfony checks</a> that no other platform provides, you can spot major weaknesses in your code in no time.</p>

<p>Now is the perfect time to <a href="https://insight.sensiolabs.com/">give SensioLabsInsight a try</a>. Tell us what you think about out first contact workflow, and about the service in general.</p>

<p><a href="https://insight.sensiolabs.com/"><img class="screenshot" title="A typical SensioLabsInsight analysis full report" src="/img/screenshots/foo_bar_analysis.png" /></a></p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Branch Analysis Made Easier</title>
   <link href="http://blog.insight.sensiolabs.com/2014/04/11/branch-analysis-made-easier.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2014-04-11T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/04/11/branch-analysis-made-easier</id>
   <summary>You can already analyze a non-master branch, but we&#39;ve refined the way you can launch and visualize branch analyses.</summary>
   <content type="html">
    <![CDATA[
    <p>Many Insight users analyze non-master branches. The support for such analyses was clunky, and we&#39;ve just released an update to make it easier.</p>

<h3>Choose The Branch From The Analyze Button</h3>

<p><img class="screenshot" title="Analyzing a non-master branch on SensioLabsInsight" src="/img/screenshots/analyze_branch.gif" /></p>

<p>Whenever you need to analyze another branch than the default one, click on the left part of the &quot;Analyze&quot; button to reveal the branch choice input. Then type the name of the branch you want, and click on &quot;Analyze&quot;.</p>

<p>The branch dropdown is present on all occurrences of the &quot;analyze&quot; button.</p>

<h3>See Non-Master Branch Analyses In The List</h3>

<p><img class="screenshot" title="Analysis on a non-master branch on SensioLabsInsight" src="/img/screenshots/branch_name.png" /></p>

<p>Every analysis made on a branch different than the default one shows the branch name close to the project name. That way, you can immediately spot those non-master analyses, which is especially useful if you&#39;re using a SCM hook to analyze all pushes to the master repository, including on feature branches. You can set the default branch for a project in the project settings if it&#39;s not <code>master</code>.</p>

<p>By the way, did you notice that the name of the person who triggered the analysis is displayed above the project name? That way, you can know when a collaborator, or the API, launched an analysis for you.</p>

<p><img class="screenshot" title="Analysis on a non-master branch on SensioLabsInsight" src="/img/screenshots/last_commit.png" /></p>

<p>The mention of the branch is also displayed in the full report sidebar, where you can see the title of the last commit in the analyzed branch.</p>

<h3>Detection Of Parent Analysis</h3>

<p><img class="screenshot" title="Fixed and New violations shown on a branch analysis on SensioLabsInsight" src="/img/screenshots/fixed_new.png" /></p>

<p>Each analysis is compared to its &quot;parent&quot; analysis to determine if there are new violations (red arrows), or fixed violations (green arrows). Determining the parent of an analysis in the master branch is easy: it&#39;s the last analysis on the master branch. But how about when you analyze another branch?</p>

<p><img class="screenshot" title="Network view of fabpot/twig Git history on GitHub" src="/img/screenshots/fabpot_twig_network.png" /></p>

<p>We&#39;ve implemented an algorithm using the git history, to find the first ancestor of the analyzed branch already analyzed by Insight. This helps you figure out the real quality evolution of a branch:</p>

<ul>
<li>If this is the first analysis in the branch, the analysis is compared to the latest analysis on master</li>
<li>otherwise, the analysis is compared to the previous analysis on the same branch</li>
</ul>

<h3>Ignore Branches In SCM Hook</h3>

<p>If you use a SCM hook on GitHub, you may not want to have your project analyzed each time you push to the <code>gh-pages</code>. The default project configuration has been updated to take <code>gh-pages</code> into account, using a new setting called <code>ignore_branches</code>:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">ignore_branches:
    - gh-pages
</code></pre></div>
<p>You can add more branches to ignore so that some pushes to your projects don&#39;t automatically trigger an Insight analysis.</p>

<p>We&#39;re still working on the branch analysis feature - make sure you come back in the next weeks to see the changes!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Jenkins integration</title>
   <link href="http://blog.insight.sensiolabs.com/2014/02/12/jenkins-integration.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2014-02-12T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2014/02/12/jenkins-integration</id>
   <summary>SensioLabsInsight provides out-of-the-box Jenkins integration, which can be used to display analysis results inside Jenkins reports and to improve your application deployment process.</summary>
   <content type="html">
    <![CDATA[
    <p>One of the main features of SensioLabsInsight service is that it integrates
smoothly into your existing workflow and technical infrastructure. We know
that most companies use <a href="http://jenkins-ci.org/">Jenkins</a> as their continuous integration server
and for that reason, SensioLabsInsight provides out-of-the-box Jenkins
integration.</p>

<h3>Setting Up the Environment</h3>

<p>Jenkins integration is performed through the SensioLabsInsight API. The easiest
way to use this API is via the PHAR version of its command line tool. Download
it from <a href="http://get.insight.sensiolabs.com/insight.phar">http://get.insight.sensiolabs.com/insight.phar</a>, or execute the
following commands:</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash"># download it with cURL
$ curl -o insight.phar -s http://get.insight.sensiolabs.com/insight.phar

# download it with wget
$ wget http://get.insight.sensiolabs.com/insight.phar
</code></pre></div>
<p>Check that the <code>insight.phar</code> file has been correctly downloaded by executing
the following command that lists all your projects configured on Insight:</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">$ php insight.phar projects
</code></pre></div>
<p>The first time you execute <code>insight.phar</code>, you will be prompted for your
SensioLabsInsight API token and user UUID. You can find this information in
the API/SDK tab of your SensioLabsInsight account preferences:</p>

<p><img class="screenshot" title="SensioLabsInsight API/SDK settings" src="/img/screenshots/api_token_project_uuid.png" /></p>

<p>The <code>insight.phar</code> file will optionally save these credentials for you to
reuse them for the next commands. To override these stored credentials, use
the <code>--api-token</code> and <code>--user-uuid</code> command options.</p>

<h3>Integrating SensioLabsInsight Reports into Jenkins Builds</h3>

<p>First, make sure that you have installed the <a href="http://pmd.sourceforge.net/">PMD plugin</a>, which is
required to process the SensioLabsInsight reports generated in PMD format.
Then, create a new build command that executes the following:</p>
<div class="highlight"><pre><code class="language-text" data-lang="text">#!/bin/sh
php insight.phar analysis --format=pmd &lt;project-UUID&gt; &gt; insight-pmd.xml
</code></pre></div>
<p>Finally, add a new post-build action in Jenkins to publish the PMD analysis results stored in the <code>insight-pmd.xml</code> file.</p>

<p><img class="screenshot" title="Adding a new Jenkins post-build action for SensioLabsInsight" src="/img/screenshots/jenkins_post_build_action.png" /></p>

<p>And that&#39;s all! From there on, whenever a new build is initiated by Jenkins, a
new analysis will be triggered in SensioLabsInsight and the results will be
integrated directly into your Jenkins output.</p>

<p><img class="screenshot" title="SensioLabsInsight analysis results integrated into Jenkins" src="/img/screenshots/sensiolabsinsight_reports_in_jenkins.png" /></p>

<p>Click on the report details to view the complete list of violations, including
the file and line of code where each one was found:</p>

<p><img class="screenshot" title="SensioLabsInsight analysis results integrated into Jenkins" src="/img/screenshots/sensiolabsinsight_detailed_reports_in_jenkins.png" /></p>

<h3>Improving Your Deployment Process</h3>

<p>Deploying code that contains security exploits and performance bottlenecks can
pose a serious threat to your company. Integrating SensioLabsInsight into your
deployment process via Jenkins prevents you from deploying bad code into
production servers.</p>

<p>Start by adding a new <code>fail-condition</code> option to the <code>analysis</code> command and
then set the condition that will cause the build to fail:</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">$ php insight.phar analysis &lt;project-UUID&gt; --format=&quot;pmd&quot; \
      --fail-condition=&quot;counts.security &gt; 0&quot;
</code></pre></div>
<p>The <code>counts.security &gt; 0</code> expression is a good starting point to prevent the
deployment of dangerous code, but you can use any other condition built with
the <a href="http://symfony.com/doc/current/components/expression_language/introduction.html">ExpressionLanguage component</a>.</p>

<p>The two variables that can be used in the expressions are called <code>analysis</code>
and <code>counts</code>. The <code>analysis</code> variable stores all the information about the
analysis as defined by the <a href="https://github.com/sensiolabs/insight/blob/master/Sdk/Model/Analysis.php">Analysis.php</a> model class. The <code>count</code>
variable stores the number of violations grouped by category. Combining both
variables you can build very powerful expressions:</p>
<div class="highlight"><pre><code class="language-text" data-lang="text">// the project has a too low grade
analysis.grade in [&#39;none&#39;, &#39;bronze&#39;]

// the project has a lot of violations, including some performance issues
analysis.nbViolations &gt; 50 and counts.performance &gt; 0

// the technical debt of the project is too high
analysis.remediationCost &gt; 100
</code></pre></div>
    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Counting Lines</title>
   <link href="http://blog.insight.sensiolabs.com/2013/12/20/counting-lines.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2013-12-20T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2013/12/20/counting-lines</id>
   <summary>Many checks done by the Insight analysis engine rely on an accurate count of the number of lines in your code. But how does Insight count lines of code? What if you add comments or whitespace? It doesn&#39;t matter, as we normalize your code before counting its line. Read on to learn how.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabsInsight counts the number of lines of code in the methods and classes of your projects. For instance, one of the rules we check is that your controllers are not too fat. We need the number of lines of code of controller methods for that. Another rule checks the overall class size, to check that the code is decoupled and follows the principle of <a href="http://en.wikipedia.org/wiki/Principle_of_least_privilege">least responsibility</a>.</p>

<p><img class="screenshot" title="Controller size violation" src="/img/screenshots/controller_too_long.png" /></p>

<p>Our first approach to count the number of lines of code was naive. This brought us a lot of feedback about unfair &quot;<em>Symfony controller action method should not be too long</em>&quot;, or &quot;<em>PHP classes should be short</em>&quot; violations. What if the code had a lot of comments? What if your developers followed a coding standard adding more newline characters than PSR-2? </p>

<p>We&#39;ve recently released a new line counting algorithm, but before explaining it, let&#39;s look at some code.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php
/**
 * @Method(&quot;GET&quot;)
 * @Route(
 *     &quot;/books/{bookId}&quot;,
 *     name=&quot;project&quot;
 * )
 */
public function bookAction($bookId)
{
    $book = $this-&gt;getDoctrine()-&gt;getManager()
        -&gt;getRepository(&#39;Book&#39;)
        -&gt;find($bookId);

    if (!$book) {
        throw $this-&gt;createNotFoundException(&#39;Book not found.&#39;);
    }

    return array(
        &#39;book&#39; =&gt; $book
    );
}
</code></pre></div>
<p>How much lines of code do you think this method has? 12? 14? 21? Let&#39;s look at the same code, written differently:</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php
/**
 * @Method(&quot;GET&quot;)
 * @Route(&quot;/books/{bookId}&quot;, name=&quot;project&quot;)
 */
public function bookAction($bookId) {
    $project = $this-&gt;getDoctrine()-&gt;getManager()-&gt;getRepository(&#39;Book&#39;)-&gt;find($bookId);
    if (!$book) { throw $this-&gt;createNotFoundException(&#39;Book not found.&#39;); }
    return array(&#39;book&#39; =&gt; $book);
}
</code></pre></div>
<p>It&#39;s the exact same code, yet it has only 5 lines of code without comments, 9 with comments. And what about this version?</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php
/**
 * @Method(&quot;GET&quot;)
 * @Route(
 *     &quot;/books/{bookId}&quot;,
 *     name=&quot;project&quot;
 * )
 */
public function bookAction($bookId)
{
    /** @var $book \Library\Model\Book */
    $book = $this-&gt;getDoctrine()
        -&gt;getManager()
        -&gt;getRepository(&#39;Book&#39;)
        -&gt;find($bookId)
    ;

    if (!$book) {
        // FIXME: redirect to the book creation page instead
        throw $this-&gt;createNotFoundException(&#39;Book not found.&#39;);
    }

    return array(
        &#39;book&#39; =&gt; $book
    );
}
</code></pre></div>
<p>Now you understand why it&#39;s a difficult problem. Ignoring comments and newlines isn&#39;t a big deal, but counting lines in a consistent manner across all coding styles can&#39;t just be done in a simple way. Even using third-party line counter scripts won&#39;t help us, since they will count the three extracts above in a different way.</p>

<p>SensioLabsInsight already parses your entire codebase to analyze it. The analysis engine turns PHP scripts into an <a href="http://en.wikipedia.org/wiki/Abstract_syntax_tree">Abstract Syntax Tree</a> (AST), an object-oriented representation of all the statements, variables, and expressions in your code. That means that during the analysis, our engine has a normalized version of the code at hand. The only thing that we need to do is to serialize this AST in a consistent manner, and count the lines of the resulting string.</p>

<p>For the code extract above, the normalized version serialized by the Insight engine looks like this:</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php
public function bookAction($bookId)
{
    $book = $this-&gt;getDoctrine()-&gt;getManager()-&gt;getRepository(&#39;Book&#39;)-&gt;find($bookId);
    if (!$book) {
        throw $this-&gt;createNotFoundException(&#39;Book not found.&#39;);
    }
    return array(&#39;book&#39; =&gt; $book);
}
</code></pre></div>
<p>Whatever coding style is used, Insight will always count <strong>8 lines of code</strong> for this piece of code. So don&#39;t be surprised if the line counts displayed in a violation don&#39;t exactly reflect the actual number of lines in your code. Don&#39;t be surprised either if a few violations disappear during your next analysis: this new counting algorithm generally counts less lines than before, and therefore less methods and classes cross the treshold of our &quot;<em>method too long</em>&quot; or &quot;<em>class too long</em>&quot; violations. </p>

<p>We&#39;ll be tweaking our serialization algorithm to better match PSR-2 in the future. And rest assured that when Insight count the lines in your code, it does it in a fair way.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Introducing Monthly Reports</title>
   <link href="http://blog.insight.sensiolabs.com/2013/12/03/introducing-montly-reports.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2013-12-03T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2013/12/03/introducing-montly-reports</id>
   <summary>How can you get a bird&#39;s eye view of the overall quality evolution of all your projects? We&#39;re glad to introduce monthly reports, a fast and efficient way to be alerted when the software quality decreases.</summary>
   <content type="html">
    <![CDATA[
    <p>Quality <em>control</em> is a voluntary process: assess the quality of a project, make it better, until it reaches an acceptable level. Quality <em>assurance</em>, on the other hand, is a different matter. Quality assurance is a continuous process running in the background, producing the lowest noise possible, but raising an alert as soon as the acceptable quality threshold is crossed. </p>

<p>SensioLabsInsight is a quality assurance tool. We&#39;ve put a lot of thinking into this, to determine when SensioLabsInsight should alert you, and what feedback it should provide. You can already <a href="/2013/11/10/private-projects.html">configure a SensioLabsInsight analysis after every commit</a>, but that may bring up too much noise. While not enough notifications implies missed opportunities to detect and solve a major issue, too many notifications may result in ignored alerts.</p>

<p>Today, we&#39;re introducing a new major feature that we think you&#39;re going to love: <strong>Monthly Reports</strong>. Once a month, SensioLabsInsight analyzes all the projects you&#39;ve registered, compares the result with the previous monthly analysis, and summarizes the differences.</p>

<p>Once a month, you will receive a single email from SensioLabsInsight for all your projects, containing a bird&#39;s eye view of the software quality evolution over the past month. It shows the evolution of the technical debt per project, the lost and earned medals, the number of new and fixed violations. We&#39;ve designed this email to go right to the point; it provides just the information you need. Here is an example of how it looks:</p>

<p><img src="/img/screenshots/monthly_email.png" alt="Monthly Report email"></p>

<p>Monthly analyses are triggered automatically, once for every user and for every project. These analyses appear with a special ribbon in your dashboard, so don&#39;t be surprised if you see analyses that you didn&#39;t trigger yourself:</p>

<p><img src="/img/screenshots/monthly_analysis.png" alt="Monthly Analysis on one project"></p>

<p>Even without actively controlling your projects on SensioLabsInsight, you will be able to monitor the quality evolution, and make the right decision at the right time. Incidentally, since we keep on adding new rules every week, that means that you will be alerted if one of your projects has new violations due to these new rules, even if the code doesn&#39;t change.</p>

<p>We are rolling out the feature for every user progressively, so check your inbox for a new SensioLabsInsight email this month. If you&#39;re eager to see what it looks like, head for the <a href="https://insight.sensiolabs.com/analyses">Public Analyses</a> section and check already executed monthly analyses. And don&#39;t hesitate to give us your feedback about the Monthly Report feature!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>A new batch of rules</title>
   <link href="http://blog.insight.sensiolabs.com/2013/11/28/a-new-batch-of-rules.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2013-11-28T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2013/11/28/a-new-batch-of-rules</id>
   <summary>We keep on adding new rules to better qualify your applications. Read on to discover the new rules enabled this week.</summary>
   <content type="html">
    <![CDATA[
    <p>A significant share of the SensioLabsInsight development effort is spent implementing new code checks - or &quot;rules&quot; as we call them. This week, we&#39;ve just released 5 new rules.</p>

<h3>Disabled Twig escaping</h3>

<p>Disabling Twig escaping for an entire application is possible, but it&#39;s strongly discouraged. From now on, any Symfony application with such a huge XSS vulnerability in <code>config.yml</code> will raise a critical security violation.</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">twig:
    # ...
    autoescape: false
</code></pre></div>
<h3>Use of <code>raw</code> filter or <code>autoescape off</code> in Twig templates</h3>

<p>Another possible XSS vulnerability comes from abuse of the <code>|raw</code> filter. Whenever the data piped to this filter comes from a user input, a Cross-Site Scripting attack is possible. Therefore SensioLabsInsight raises a critial security violation each time <code>|raw</code> is used, or when a variable is output inside a <code>&#123;% autoescape off %&#125;</code> block.</p>

<div class="highlight"><pre><code>&#123;&#123; user.header|raw &#125;&#125;

&#123;% autoescape off %&#125;
&#123;&#123; user.header &#125;&#125;
&#123;% endautoescape %&#125;
</code></pre></div>

<h3>Injection of the <code>request</code> service for Symfony 2.4 applications</h3>

<p>The soon-to-be-released Symfony 2.4 deprecates the injection of the <code>request</code> service in favor of the <code>request_stack</code> service, mush more adapted to sub-requests (read <a href="http://symfony.com/blog/new-in-symfony-2-4-the-request-stack">more about it in the Symfony blog</a>).</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">services:
  foo:
    class: Foo\Bar
    calls:
      - [setRequest, [&#39;@request=&#39;]]
</code></pre></div>
<p>SensioLabsInsight can now detect, when you use Symfony 2.4, every occurrence of a <code>request</code> service injection. This will ease your upgrading process and give you no excuse to keep on using the flawed <code>request</code> service.</p>

<h3>Unreachable code</h3>

<p>Do you sometimes move a <code>return</code> statement up during a debugging session, and forget to remove it before committing? Yeah, that happens a lot. SensioLabsInsight can now detect unreachable code, blocked behind a <code>return</code>, a <code>die()</code>, a <code>throw</code>, a <code>continue</code>, or an <code>exit</code>. It&#39;s often a simple mistake, but it may cause a serious bug nevertheless.</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php
class Foo
{
  public function computeStuff($value)
  {
    // added for debugging
    return;

    if ($value &gt; 0) {
      // actual stuff computing
    }
  }
}
</code></pre></div>
<p>Of course, SensioLabsInsight won&#39;t bug you with unreachable code used for consistency&#39;s sake, such as the <code>break</code> statements in the following snippet:</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php
switch ($value) {
  case &#39;foo&#39;:
    return 0;
    break;
  case &#39;bar&#39;:
    return 1;
    break;
  case default:
    return null;    
}
</code></pre></div>
<h3>PHP Syntax Error</h3>

<p>One of the first rule we developed was actually disabled because of a forgotten <code>return</code> (that happens to everybody). Using Insight on Insight helped us track this unreachable code and reenable the rule.</p>

<p>This rule is very simple: it uses the <code>php</code> command to check the syntax of all committed PHP files in your projects. That way you can spot a syntax error even before you execute that code!</p>
<div class="highlight"><pre><code class="language-php" data-lang="php">&lt;?php
// can you spot the syntax error in the next line?
echo &#39;hello, world!&quot;;
</code></pre></div>
<h3>False positives, tweaks and bugfixes</h3>

<p>As always, we keep on tuning these rules for false positives. Don&#39;t hesitate to mention us any false positives on the new rules using the &quot;Feedback&quot; button! </p>

<p>This week, we&#39;ve also removed false violations on the use of the <code>$_GET</code> superglobal, which should obviously be allowed on applications not using Symfony. We&#39;ve also changed the &quot;Commented out code&quot; severity to minor, so that you can get a silver medal even with one or two lines of PHP code commented. And we&#39;ve fixed a lot of small issues to make your quality analysis experience even better.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Continuous Quality Feedbacks for your Projects</title>
   <link href="http://blog.insight.sensiolabs.com/2013/11/10/private-projects.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2013-11-10T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2013/11/10/private-projects</id>
   <summary>Thanks to the SensioLabsInsight API, it&#39;s dead easy to trigger a new analysis each time you push some code to a repository.</summary>
   <content type="html">
    <![CDATA[
    <p>We recently added branches support in SensioLabsInsight. Have a look at the new &quot;Analyze&quot; button and notice how you can now run an analysis on a different branch/reference than the default one (set in your project configuration):</p>

<p><img class="screenshot" src="/img/screenshots/analyze_button.png" /></p>

<p>And when computing the violation diff, SensioLabsInsight smartly guesses the &quot;previous&quot; analysis, even if you are using sha1 references instead of branch names like <code>1.0</code>.</p>

<p>Those new features are very useful if you want to continuously check the evolution of a project quality as it lets you run analyses on all branches of a project and even for pull requests in an independent way. The branch names for the analyzed commit are displayed on the analysis page:</p>

<p><img class="screenshot" src="/img/screenshots/commit_branch.png" /></p>

<p>And triggering an analysis automatically every time you push some code is really easy thanks to our <a href="https://insight.sensiolabs.com/account">API</a> and our <a href="https://github.com/sensiolabs/insight">PHP SDK</a>.</p>

<p><strong>If you are using Github</strong>, go the Account page, and under the <a href="https://insight.sensiolabs.com/account">&quot;API/SDK&quot; tab</a>, there is a special section about Github at the bottom. Copy the webhook URL and add it as a &quot;Services Hook&quot; on the Github settings page for all projects you want to continuously analyze with SensioLabsInsight:</p>

<p><img class="screenshot" src="/img/screenshots/github_webhook.png" /></p>

<p><strong>If you are using Jenkins</strong> or any other continuous integration platform, you can trigger an analysis by using the following URL pattern: https://XXX:YYY@insight.sensiolabs.com/api/projects/ZZZ/analyses.</p>

<p>where XXX is your user id, YYY is your API token, and ZZZ is the project id.  How do you know the values for a specific project? Again, the API page gives you everything you need to get started fast. Select the project you want to analyze in the select box, and copy/paste the URL it gives you below:</p>

<p><img class="screenshot" src="/img/screenshots/api_url.png" /></p>

<p>You can then POST on this URL via Curl:</p>
<div class="highlight"><pre><code class="language-bash" data-lang="bash">curl -X POST -H &quot;Accept: application/vnd.com.sensiolabs.insight+xml&quot; &quot;https://XXX:YYY@insight.sensiolabs.com/api/projects/ZZZ/analyses&quot;
</code></pre></div>
<p>Happy quality!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>Analyzing a Project depending on MongoDB</title>
   <link href="http://blog.insight.sensiolabs.com/2013/11/09/analyzing-a-project-depending-on-mongodb.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2013-11-09T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2013/11/09/analyzing-a-project-depending-on-mongodb</id>
   <summary>A lot of your users are using MongoDB in their projects, and until now, composer with a dependency on MongoDB would fail. Read-on to learn how to fix that easily.</summary>
   <content type="html">
    <![CDATA[
    <p>A good practice when a project depends on MongoDB is to add it as a C
dependency in your <code>composer.json</code> file:</p>
<div class="highlight"><pre><code class="language-json" data-lang="json">{
    &quot;require&quot;: {
        &quot;ext-mongo&quot;: &quot;&gt;=1.2.12,&lt;1.6-dev&quot;
    }
}
</code></pre></div>
<p>When running an analysis on a project, the rules that are activated depends on
a number of different factors like the type of your project and the ability to
boot the Kernel (at least for a Symfony2 application.) And booting a project is
only possible after running the <code>composer install</code> command.</p>

<p>So, if MongoDB is not available or if the MongoDB PHP extension is not
installed on the machine used to run the analysis, Composer will fail and a
large number of interesting rules will be automatically disabled.</p>

<p>Good news is that enabling MongoDB is as simple as adding this snippet of code
in your project configuration:</p>
<div class="highlight"><pre><code class="language-yaml" data-lang="yaml">pre_composer_script: |
    yes &#39;&#39; | pecl install mongo

php_ini: |
    extension=mongo.so
</code></pre></div>
<p>Of course, this snippet can be used if you need any other C extension that is
<a href="https://insight.sensiolabs.com/faq#what-if-my-project-needs-specific-php-extensions">not available by default</a>.</p>

<p>For more tips about SensioLabsInsight, have a look at our
<a href="https://insight.sensiolabs.com/faq">FAQ</a>.</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>First Round Of Improvements Based On Your Feedback</title>
   <link href="http://blog.insight.sensiolabs.com/2013/11/08/feedback-improvements.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2013-11-08T00:00:00+01:00</updated>
   <id>http://blog.insight.sensiolabs.com/2013/11/08/feedback-improvements</id>
   <summary>We&#39;ve gathered a lot of feedback from private beta users. This has allowed us to refine the features you love the most, add missing features, fix bugs, and most importantly: add new rules to the analyzer. Here is a wrap-up of the major improvements to SensioLabsInsight since the first release.</summary>
   <content type="html">
    <![CDATA[
    <p>When we opened the private beta with a &quot;feedback&quot; button on every page, we didn&#39;t think that so many of you would actually send us so much feedback. We&#39;re overwhelmed by your feedback, and it has helped us tremendously to adjust our target, understand your true expectations, and improve the service SensioLabsInsight can bring you.</p>

<p><img class="screenshot" src="/img/screenshots/false_positive.png" /></p>

<h3>False Positives</h3>

<p>Most of your feedback concerned rules showing false positives on your projects. This was particularly frustrating as it usually prevented you to get a good medal without ignoring a rule (which turns the medal into a chocolate medal). Static analysis is a complex task, and we needed these false positives that you pointed us to refine our analyzer. We&#39;ve fixed most of the false positives you reported, including:</p>

<ul>
<li>Reports of unused variable, or unused method parameter that were actually used</li>
<li>Incorrect unused <code>use</code> statement violations (the alias being used in a docbloc, or in a string)</li>
<li>Data found in configuration that were considered sensitive by mistake</li>
<li>Wrong violations on unfixed composer dependency</li>
<li>Violation on logging verbosity in production that were not considering complex loggers</li>
<li>And many more uncommon use cases</li>
</ul>

<p>We&#39;ll continue to refine our analyzer to be sure to raise only violations that make sense in the context of your projects.</p>

<p><img class="screenshot" src="/img/screenshots/new_rule.png" /></p>

<h3>New Rules</h3>

<p>We have given a lot of love to existing rules (including adding documentation to those lacking it). But most important, we have added several new rules that we think will be a great help in your development process.</p>

<ul>
<li>Detect missing <code>use</code> statements (and wrong usage of <code>throw new Exception</code> without a leading slash)</li>
<li>Detect function calls in for loops (bad for performance)</li>
<li>Check that Doctrine mapping data is valid</li>
<li>Detect TODO and FIXME comments</li>
<li>Detect PHP code in public repository (for instance by plugins like ckeditor)</li>
<li>Detect unfixed dependency version in composer</li>
<li>Detect out of maintenance dependencies</li>
<li>Detect injections of the Doctrine <code>EntityManager</code> and of the Dependency Injection Container</li>
</ul>

<p>These rules are automatically enabled for all future analyses. If you analyze a project again, don&#39;t be surprised that new violations appear: that&#39;s because we keep on adding new rules every week!</p>

<p><img class="screenshot" src="/img/screenshots/full_report.png" /></p>

<h3>Usability improvements</h3>

<p>A large share of your feedback concerned the overall usability of the web interface. You reported many small glitches that were fixed quickly and continuously. If you haven&#39;t been on SensioLabsInsight for a while, you might be surprised by how much the interface has changed since you first came. Usability highlights include:</p>

<ul>
<li>The dashboard is now the homepage for connected users</li>
<li>In the full report, the &quot;new&quot; tab is now a filter on the sidebar. That allows you to find the same violation count on the summary and on the full report</li>
<li>The number of new and fixed violations now appear for each analysis in the dashboard</li>
<li>You can easily navigate to the next and previous analysis in a full report</li>
<li>Some hard to understand and badly worded sentences were rewritten to be understood by any English speaker</li>
<li>An FAQ to answer most common questions</li>
<li>The project configuration page was entirely redesigned to show only basic configuration at first</li>
<li>You can now ignore all the violations of a given rule, and disable this rule for future analyses</li>
</ul>

<p>We know we have a lot more to do, and we&#39;ll keep on iterating on the design and interactions. Come back regularly to see our progress. </p>

<p><img class="screenshot" src="/img/screenshots/widget.png" /></p>

<h3>New features</h3>

<p>Lastly, we&#39;ve been hard at work adding the features that you missed the most. You can now:</p>

<ul>
<li>Turn the dashboard into a timeline of events, showing not only analyses, but also new violations, projects you now collaborate to...</li>
<li>Analyze a private repository (either by pushing it to a SensioLabs Git repository, or by sharing your public key)</li>
<li>Display information about the version of the application analyzed (because the date was obviously not enough...)</li>
<li>Run an analysis on a branch</li>
<li>Add a search engine of public project analyses</li>
<li>Display and filter violation by author</li>
<li>Chart the quality evolution over time</li>
<li>Receive email notifications</li>
<li>Export a quality widget for your project</li>
</ul>

<p>And under the hood, SensioLabsInsight has been optimized and stabilized to make it ready for production. This was made possible by all the tests you&#39;ve been doing on the platform, so again thanks a million times to the beta testers.</p>

<p>Keep on analyzing and sending us feedback, together we&#39;ll build an awesome product!</p>

    ]]>
   </content>
 </entry>
 
 <entry>
   <title>The Private Beta Opens</title>
   <link href="http://blog.insight.sensiolabs.com/2013/10/22/welcome-to-sensiolabs-insight.html"/>
   <author>
    <name>Fabien Potencier</name>
   </author>
   <updated>2013-10-22T00:00:00+02:00</updated>
   <id>http://blog.insight.sensiolabs.com/2013/10/22/welcome-to-sensiolabs-insight</id>
   <summary>We&#39;ve been developing SensioLabs Insight in stealth mode for months. Now it&#39;s time to confront our ideas with your usage, get your feedback, and iterate further.</summary>
   <content type="html">
    <![CDATA[
    <p>SensioLabs has been hard at work for almost a year to design, develop, test, and polish our very first SaaS product. Today, we&#39;re very happy to finally release the first beta version of SensioLabs Insight, our quality insurance service for PHP applications.</p>

<p><img class="screenshot" src="/img/screenshots/home.png" /></p>

<p>First of all, since we&#39;re in the beta stage, the product is far from perfect. However, we value feedback, as early as possible. So please share your experience with us using the &quot;feedback&quot; button present on every page - whether for bugs, missing features, UI problems, and also of course if you think that the product fits your needs.</p>

<p>If you read this, it means you have been granted an account with five free private projects and unlimited Open-Source projects. When creating a project, only check the &quot;Open-Source&quot; checkbox if you want other people to get access to your analyses. If you need more than five private projects, contact us to explain your case and we will try to get you more. Also, choose the type of your project carefully as our analysis engine behaves differently based on this setting.</p>

<p>The product evolves very fast as we deploy a new version every day. So don&#39;t hesitate to come back often and re-analyse your projects, even if you did not made big changes to your code. You will notice that SensioLAbs Insight helps not only assessing the current state of your code, but also its evolution trends.</p>

<p>That&#39;s it! Go to <a href="http://insight.sensiolabs.com/">insight.sensiolabs.com</a>, connect with your <a href="https://connect.sensiolabs.com/">SensioLabsConnect</a> account, and analyse your first project! We are thrilled to have you be part of our private beta and we are looking forward to receiving your feedback on our work.</p>

    ]]>
   </content>
 </entry>
 

</feed>
