Commit 80056a86 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

2 configs PHAN différentes : une pour les modules unicaen/*, une autre pour les vendors.

parent c0aa6087
Pipeline #3871 passed with stage
in 19 seconds
<?php <?php
/**
* Config PHAN pour les modules unicaen/*.
*/
/** /**
* This configuration will be read and overlaid on top of the * This configuration will be read and overlaid on top of the
* default configuration. Command line arguments will be applied * default configuration. Command line arguments will be applied
...@@ -20,7 +24,7 @@ return [ ...@@ -20,7 +24,7 @@ return [
// and expensive, but you should consider running // and expensive, but you should consider running
// it before upgrading your version of PHP from 5.x to 7.0, // it before upgrading your version of PHP from 5.x to 7.0,
// due to the backward compatibility breaks of parsing in PHP 7.0 // due to the backward compatibility breaks of parsing in PHP 7.0
'backward_compatibility_checks' => false, 'backward_compatibility_checks' => true,
// Added in 0.10.0. Set this to false to emit // Added in 0.10.0. Set this to false to emit
// PhanUndeclaredFunction issues for internal functions // PhanUndeclaredFunction issues for internal functions
...@@ -33,34 +37,45 @@ return [ ...@@ -33,34 +37,45 @@ return [
// If this white-list is non-empty, only issues within the list // If this white-list is non-empty, only issues within the list
// will be emitted by Phan. // will be emitted by Phan.
'whitelist_issue_types' => [ 'whitelist_issue_types' => [
'PhanCompatiblePHP7', // This only checks for **syntax** where the parsing may have changed. This check is enabled by `backward_compatibility_checks`
'PhanDeprecatedFunctionInternal', // Warns about a few functions deprecated in 7.0 and later. 'PhanDeprecatedFunctionInternal', // Warns about a few functions deprecated in 7.0 and later.
'PhanUndeclaredFunction', // Check for removed functions such as split() that were deprecated in php 5.x and removed in php 7.0. 'PhanUndeclaredFunction', // Check for removed functions such as split() that were deprecated in php 5.x and removed in php 7.0.
// 'PhanDeprecatedClass' => 'PhanDeprecatedClass', 'PhanCompatibleExpressionPHP7',
// 'PhanDeprecatedFunction' => 'PhanDeprecatedFunction', 'PhanCompatibleKeyedArrayAssignPHP70',
// 'PhanDeprecatedInterface' => 'PhanDeprecatedInterface', 'PhanCompatibleNullableTypePHP70',
// 'PhanDeprecatedTrait' => 'PhanDeprecatedTrait', 'PhanCompatiblePHP7', // This only checks for **syntax** where the parsing may have changed. This check is enabled by `backward_compatibility_checks`
'PhanParamSignatureMismatch' => 'PhanParamSignatureMismatch', 'PhanCompatibleShortArrayAssignPHP70',
// 'PhanParamSignatureRealMismatchHasParamType' => 'PhanParamSignatureRealMismatchHasParamType', 'PhanCompatibleUseIterablePHP71',
// 'PhanParamSignatureRealMismatchParamType' => 'PhanParamSignatureRealMismatchParamType', 'PhanCompatibleUseObjectPHP71',
// 'PhanParamSignatureRealMismatchTooFewParameters' => 'PhanParamSignatureRealMismatchTooFewParameters', 'PhanCompatibleUseObjectPHP71',
'PhanParamTooFew' => 'PhanParamTooFew', 'PhanCompatibleUseVoidPHP70',
// 'PhanParamTooMany' => 'PhanParamTooMany', 'PhanCompatibleVoidTypePHP70',
// 'PhanParamTooManyInternal' => 'PhanParamTooManyInternal',
// 'PhanSyntaxError' => 'PhanSyntaxError', // 'PhanDeprecatedClass',
// 'PhanTypeMismatchArgument' => 'PhanTypeMismatchArgument', // 'PhanDeprecatedFunction',
// 'PhanTypeMismatchArgumentInternal' => 'PhanTypeMismatchArgumentInternal', // 'PhanDeprecatedInterface',
// 'PhanTypeMismatchDeclaredParam' => 'PhanTypeMismatchDeclaredParam', // 'PhanDeprecatedTrait',
// 'PhanTypeMismatchDeclaredParamNullable' => 'PhanTypeMismatchDeclaredParamNullable', // 'PhanParamSignatureMismatch',
// 'PhanTypeMismatchDefault' => 'PhanTypeMismatchDefault', // 'PhanParamSignatureRealMismatchHasParamType',
// 'PhanTypeMismatchForeach' => 'PhanTypeMismatchForeach', // 'PhanParamSignatureRealMismatchParamType',
// 'PhanTypeMismatchProperty' => 'PhanTypeMismatchProperty', 'PhanParamSignatureRealMismatchTooFewParameters',
// 'PhanTypeMismatchReturn' => 'PhanTypeMismatchReturn', 'PhanParamSignatureRealMismatchTooFewParametersInternal',
// 'PhanTypeMissingReturn' => 'PhanTypeMissingReturn', 'PhanParamTooFew',
// 'PhanUndeclaredClassInstanceof' => 'PhanUndeclaredClassInstanceof', // 'PhanParamTooMany',
// 'PhanUnreferencedUseNormal' => 'PhanUnreferencedUseNormal', // 'PhanParamTooManyInternal',
'PhanContinueTargetingSwitch' =>'PhanContinueTargetingSwitch', // This detects code causing a warning in PHP 7.3. // 'PhanSyntaxError',
// 'PhanTypeMismatchArgument',
// 'PhanTypeMismatchArgumentInternal',
// 'PhanTypeMismatchDeclaredParam',
// 'PhanTypeMismatchDeclaredParamNullable',
// 'PhanTypeMismatchDefault',
// 'PhanTypeMismatchForeach',
// 'PhanTypeMismatchProperty',
// 'PhanTypeMismatchReturn',
// 'PhanTypeMissingReturn',
// 'PhanUndeclaredClassInstanceof',
// 'PhanUnreferencedUseNormal',
'PhanContinueTargetingSwitch', // This detects code causing a warning in PHP 7.3.
], ],
// A list of directories that should be parsed for class and // A list of directories that should be parsed for class and
...@@ -71,10 +86,8 @@ return [ ...@@ -71,10 +86,8 @@ return [
// Thus, both first-party and third-party code being used by // Thus, both first-party and third-party code being used by
// your application should be included in this list. // your application should be included in this list.
'directory_list' => [ 'directory_list' => [
'module',
'vendor', 'vendor',
'vendor/unicaen', 'vendor/unicaen',
'vendor/zf-commons',
], ],
// A directory list that defines files that will be excluded // A directory list that defines files that will be excluded
...@@ -119,7 +132,7 @@ return [ ...@@ -119,7 +132,7 @@ return [
// 'vendor/unicaen', // 'vendor/unicaen',
'vendor/webmozart', 'vendor/webmozart',
'vendor/zendframework', 'vendor/zendframework',
// 'vendor/zf-commons', 'vendor/zf-commons',
'vendor/unicaen/code/code/template', 'vendor/unicaen/code/code/template',
'vendor/unicaen/bjy-authorize/tests', 'vendor/unicaen/bjy-authorize/tests',
......
<?php
/**
*
* Config PHAN pour ...
*
*/
/**
* This configuration will be read and overlaid on top of the
* default configuration. Command line arguments will be applied
* after this file is read.
*/
return [
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`, `null`.
// If this is set to `null`,
// then Phan assumes the PHP version which is closest to the minor version
// of the php executable used to execute Phan.
//
// Note that the **only** effect of choosing `'5.6'` is to infer that functions removed in php 7.0 exist.
// (See `backward_compatibility_checks` for additional options)
// TODO: Set this.
'target_php_version' => null,
// Backwards Compatibility Checking. This is very slow
// and expensive, but you should consider running
// it before upgrading your version of PHP from 5.x to 7.0,
// due to the backward compatibility breaks of parsing in PHP 7.0
'backward_compatibility_checks' => true,
// Added in 0.10.0. Set this to false to emit
// PhanUndeclaredFunction issues for internal functions
// that Phan has signatures for,
// but aren't available in the codebase or the
// internal functions used to run phan
'ignore_undeclared_functions_with_known_signatures' => false,
// If empty, no filter against issues types will be applied.
// If this white-list is non-empty, only issues within the list
// will be emitted by Phan.
'whitelist_issue_types' => [
'PhanDeprecatedFunctionInternal', // Warns about a few functions deprecated in 7.0 and later.
'PhanUndeclaredFunction', // Check for removed functions such as split() that were deprecated in php 5.x and removed in php 7.0.
'PhanCompatibleExpressionPHP7',
'PhanCompatibleKeyedArrayAssignPHP70',
'PhanCompatibleNullableTypePHP70',
'PhanCompatiblePHP7', // This only checks for **syntax** where the parsing may have changed. This check is enabled by `backward_compatibility_checks`
'PhanCompatibleShortArrayAssignPHP70',
'PhanCompatibleUseIterablePHP71',
'PhanCompatibleUseObjectPHP71',
'PhanCompatibleUseObjectPHP71',
'PhanCompatibleUseVoidPHP70',
'PhanCompatibleVoidTypePHP70',
// 'PhanDeprecatedClass',
// 'PhanDeprecatedFunction',
// 'PhanDeprecatedInterface',
// 'PhanDeprecatedTrait',
'PhanParamSignatureMismatch',
// 'PhanParamSignatureRealMismatchHasParamType',
// 'PhanParamSignatureRealMismatchParamType',
'PhanParamSignatureRealMismatchTooFewParameters',
'PhanParamSignatureRealMismatchTooFewParametersInternal',
'PhanParamTooFew',
// 'PhanParamTooMany',
// 'PhanParamTooManyInternal',
// 'PhanSyntaxError',
// 'PhanTypeMismatchArgument',
// 'PhanTypeMismatchArgumentInternal',
// 'PhanTypeMismatchDeclaredParam',
// 'PhanTypeMismatchDeclaredParamNullable',
// 'PhanTypeMismatchDefault',
// 'PhanTypeMismatchForeach',
// 'PhanTypeMismatchProperty',
// 'PhanTypeMismatchReturn',
// 'PhanTypeMissingReturn',
// 'PhanUndeclaredClassInstanceof',
// 'PhanUnreferencedUseNormal',
'PhanContinueTargetingSwitch', // This detects code causing a warning in PHP 7.3.
],
// A list of directories that should be parsed for class and
// method information. After excluding the directories
// defined in exclude_analysis_directory_list, the remaining
// files will be statically analyzed for errors.
//
// Thus, both first-party and third-party code being used by
// your application should be included in this list.
'directory_list' => [
'vendor',
'vendor/doctrine',
'vendor/zendframework',
'vendor/zf-commons',
],
// A directory list that defines files that will be excluded
// from static analysis, but whose class and method
// information should be included.
//
// Generally, you'll want to include the directories for
// third-party code (such as "vendor/") in this list.
//
// n.b.: If you'd like to parse but not analyze 3rd
// party code, directories containing that code
// should be added to both the `directory_list`
// and `exclude_analysis_directory_list` arrays.
'exclude_analysis_directory_list' => [
'vendor/bin',
'vendor/composer',
'vendor/container-interop',
'vendor/dealerdirect',
// 'vendor/doctrine',
'vendor/easybook',
'vendor/felixfbecker',
'vendor/jasig',
'vendor/microsoft',
'vendor/mpdf',
'vendor/myclabs',
'vendor/netresearch',
'vendor/paragonie',
'vendor/phan',
'vendor/phpcompatibility',
'vendor/phpdocumentor',
'vendor/phpspec',
'vendor/phpunit',
'vendor/psr',
'vendor/ramsey',
'vendor/sabre',
'vendor/sebastian',
'vendor/setasign',
'vendor/slevomat',
'vendor/squizlabs',
'vendor/symfony',
'vendor/true',
'vendor/unicaen',
'vendor/webmozart',
// 'vendor/zendframework',
// 'vendor/zf-commons',
],
];
...@@ -4,29 +4,35 @@ DIR=$(cd `dirname $0` && pwd) ...@@ -4,29 +4,35 @@ DIR=$(cd `dirname $0` && pwd)
cd ${DIR}/.. cd ${DIR}/..
docker build --rm -t skeleton-app-7.0 -f Dockerfile-7.0 . v=7.0 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
docker rm -f skeleton-app-7.0-container v=7.0 ; docker rm -f skeleton-app-${v}-container
docker run --rm -d -p 8070:80 -p 8470:443 -v ${PWD}/.phan:/app/.phan -v ${PWD}/composer.json:/app/composer.json --name skeleton-app-7.0-container skeleton-app-7.0 v=7.0 ; docker run -d -p 8070:80 -p 8470:443 -v ${PWD}/composer.json:/app/composer.json --name skeleton-app-${v}-container skeleton-app-${v}
docker exec skeleton-app-7.0-container composer update --no-suggest --optimize-autoloader v=7.0 ; docker run -v ${PWD}/composer.json:/app/composer.json skeleton-app-${v} composer update --no-suggest --optimize-autoloader
docker build --rm -t skeleton-app-7.1 -f Dockerfile-7.1 . v=7.1 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
docker rm -f skeleton-app-7.1-container v=7.1 ; docker rm -f skeleton-app-${v}-container
docker run --rm -d -p 8071:80 -p 8471:443 -v ${PWD}/.phan:/app/.phan -v ${PWD}/composer.json:/app/composer.json --name skeleton-app-7.1-container skeleton-app-7.1 v=7.1 ; docker run -d -p 8071:80 -p 8471:443 -v ${PWD}/composer.json:/app/composer.json --name skeleton-app-${v}-container skeleton-app-7.1
docker exec skeleton-app-7.1-container composer update --no-suggest --optimize-autoloader v=7.1 ; docker run -v ${PWD}/composer.json:/app/composer.json skeleton-app-${v} composer update --no-suggest --optimize-autoloader
docker build --rm -t skeleton-app-7.2 -f Dockerfile-7.2 . v=7.2 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
docker rm -f skeleton-app-7.2-container v=7.2 ; docker rm -f skeleton-app-${v}-container
docker run --rm -d -p 8072:80 -p 8472:443 -v ${PWD}/.phan:/app/.phan -v ${PWD}/composer.json:/app/composer.json --name skeleton-app-7.2-container skeleton-app-7.2 v=7.2 ; docker run -d -p 8072:80 -p 8472:443 --name skeleton-app-${v}-container skeleton-app-${v}
docker exec skeleton-app-7.2-container composer update --no-suggest --optimize-autoloader v=7.2 ; docker run -v ${PWD}/composer.json:/app/composer.json skeleton-app-${v} composer update --no-suggest --optimize-autoloader
docker build --rm -t skeleton-app-7.3 -f Dockerfile-7.3 . v=7.3 ; docker build --rm -t skeleton-app-${v} -f Dockerfile-${v} .
docker rm -f skeleton-app-7.3-container v=7.3 ; docker rm -f skeleton-app-${v}-container
docker run --rm -d -p 8073:80 -p 8473:443 -v ${PWD}/.phan:/app/.phan -v ${PWD}/composer.json:/app/composer.json --name skeleton-app-7.3-container skeleton-app-7.3 v=7.3 ; docker run -d -p 8073:80 -p 8473:443 -v ${PWD}/composer.json:/app/composer.json --name skeleton-app-${v}-container skeleton-app-${v}
docker exec skeleton-app-7.3-container composer update --no-suggest --optimize-autoloader v=7.3 ; docker run -v ${PWD}/composer.json:/app/composer.json skeleton-app-${v} composer update --no-suggest --optimize-autoloader
# analyse des modules unicaen/* :
# v=7.0 ; docker exec skeleton-app-$v-container vendor/bin/phan --target-php-version $v > /tmp/phan-$v.log # v=7.0 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# v=7.1 ; docker exec skeleton-app-$v-container vendor/bin/phan --target-php-version $v > /tmp/phan-$v.log # v=7.1 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# v=7.2 ; docker exec skeleton-app-$v-container vendor/bin/phan --target-php-version $v > /tmp/phan-$v.log # v=7.2 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# v=7.3 ; docker exec skeleton-app-$v-container vendor/bin/phan --target-php-version $v > /tmp/phan-$v.log # v=7.3 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-unicaen.php --target-php-version $v > /tmp/phan-unicaen-$v.log
# analyse des vendors :
# v=7.0 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
# v=7.1 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
# v=7.2 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
# v=7.3 ; docker run -v ${PWD}/.phan:/app/.phan skeleton-app-$v vendor/bin/phan --config-file .phan/config-vendor.php --target-php-version $v > /tmp/phan-vendor-$v.log
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment