Commit 4c38b791 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

wip reprise ne main et simplification : partie phan

parent b54a641d
Loading
Loading
Loading
Loading
Loading

.phan/.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
phan/
+10 −10
Original line number Diff line number Diff line
@@ -42,16 +42,16 @@ return [
        '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',
//        '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',
+78 −54
Original line number Diff line number Diff line
@@ -33,50 +33,50 @@ return [
    // 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.
    ],
//    // 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
@@ -86,8 +86,7 @@ return [
    // Thus, both first-party and third-party code being used by
    // your application should be included in this list.
    'directory_list' => [
        'vendor',
        'vendor/unicaen',
        'vendor/unicaen'
    ],

    // A directory list that defines files that will be excluded
@@ -102,39 +101,64 @@ return [
    //       should be added to both the `directory_list`
    //       and `exclude_analysis_directory_list` arrays.
    'exclude_analysis_directory_list' => [
        'vendor/apereo',
        'vendor/aws',
        'vendor/beberlei',
        'vendor/bin',
        'vendor/brick',
        'vendor/bshaffer',
        'vendor/cboden',
        'vendor/composer',
        'vendor/container-interop',
        'vendor/dealerdirect',
        'vendor/devizzent',
        'vendor/doctrine',
        'vendor/easybook',
        'vendor/evenement',
        'vendor/fakerphp',
        'vendor/felixfbecker',
        'vendor/jasig',
        'vendor/friendsofphp',
        'vendor/guzzlehttp',
        'vendor/icecave',
        'vendor/justinrainbow',
        'vendor/laminas',
        'vendor/laminas-api-tools',
        'vendor/league',
        'vendor/marc-mabe',
        'vendor/masterminds',
        'vendor/michelf',
        'vendor/microsoft',
        'vendor/monolog',
        'vendor/mpdf',
        'vendor/mtdowling',
        'vendor/myclabs',
        'vendor/netresearch',
        'vendor/nikic',
        'vendor/paragonie',
        'vendor/phan',
        'vendor/phar-io',
        'vendor/phpcompatibility',
        'vendor/phpdocumentor',
        'vendor/phpspec',
        'vendor/phpstan',
        'vendor/phpunit',
        'vendor/psr',
        'vendor/ralouphie',
        'vendor/ramsey',
        'vendor/ratchet',
        'vendor/react',
        'vendor/respect',
        'vendor/riverline',
        'vendor/sabre',
        'vendor/sebastian',
        'vendor/setasign',
        'vendor/slevomat',
        'vendor/squizlabs',
        'vendor/symfony',
        'vendor/true',
        'vendor/theseer',
        'vendor/twig',
        'vendor/tysonandre',
//        'vendor/unicaen',
        'vendor/webimpress',
        'vendor/webmozart',
        'vendor/zendframework',
        'vendor/zf-commons',

        'vendor/unicaen/code/code/template',
        'vendor/unicaen/bjy-authorize/tests',
    ],
];
+10 −10
Original line number Diff line number Diff line
@@ -42,16 +42,16 @@ return [
        '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',
//        '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',
+6 −17
Original line number Diff line number Diff line
ARG PHP_VERSION
FROM unicaen-dev-php${PHP_VERSION}-apache
FROM phanphp/phan

LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"

ARG PHP_VERSION
#COPY --from=composer/composer:2-bin /composer /usr/bin/composer

ADD . /app
RUN #pecl install ast \
#	&& docker-php-ext-enable ast

ENV APACHE_CONF_DIR=/etc/apache2
ENV PHP_CONF_DIR=/etc/php/${PHP_VERSION}

RUN pecl install ast && \
    echo "extension=ast.so" > ${PHP_CONF_DIR}/cli/conf.d/ast.ini

# PHAN n'aime pas xdebug
RUN phpdismod xdebug

# Nettoyage
RUN apt-get autoremove -y && apt-get clean && rm -rf /tmp/* /var/tmp/*

WORKDIR /app
#RUN apt-get update -y && \
#    apt-get install -y git
Loading