Documentation

Doc index page

Sample configuration file

In our configuration options reference we list every option available to configure SymfonyInsight file. In the document, we provide a complete sample file.

You probably don’t need to include every setting here, most people need only one or two. You don’t have to include any section you don’t need.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Configure the PHP version SymfonyInsight should use to analyze
# your project. It can be defined to 7.1, 7.2, 7.3, or 7.4. If not
# present, it will prefer the latest PHP version.
php_version: 7.4

# Configure which PHP extensions your project need to be analyzed.
php_ini: |
    extension=openssl.so
    extension=mcrypt.so

# Ignore some branches to avoid triggering analysis for these
ignore_branches:
    - gh-pages

# Configure the failure conditions for your commit status.
# If at least one of these conditions is verified, the commit status is displayed as failed.
commit_failure_conditions:
    - "pr.severity.critical > 0"
    - "pr.severity.major > 0"

# Configure rules.
rules:
    # Disable a rule
    php.duplicated_code:
        enabled: false

    # Configure a rule
    php.class_too_long:
        max_length: 2000
        threshold:  10

# Configure in which directory your code is located.
# This can be set to any subdirectory of your project.
working_directory: myapp

# This section will be executed before installing dependencies.
# You should configure here what is needed for Composer to run without
# issue: install libraries, prepare the database, etc.
pre_composer_script: |
    #!/bin/bash
    cp app/config/parameters.yml.dist app/config/parameters.yml
    sed -i -e "s/assets_version:.*/assets_version: `date +'%s'`" app/config/parameters.yml