Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update php requirements : PHP >= 7.3+ #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

marcimat
Copy link
Contributor

Correct also some warnings in PHP 8+ and PHP 8.2

@marcimat marcimat force-pushed the update_php_requirements branch from d5dcd63 to c25d2ae Compare February 15, 2023 15:13
Config:
```php
$ecsConfig->sets([SetList::PSR_12, SetList::SYMPLIFY, SetList::COMMON, SetList::CLEAN_CODE]);
$ecsConfig->rule(NoExtraBlankLinesFixer::class);
$ecsConfig->indentation('tab');
$ecsConfig->paths(['AdaptiveImages.php']);
```
@marcimat marcimat force-pushed the update_php_requirements branch from c25d2ae to 4008746 Compare February 15, 2023 15:44
@marcimat
Copy link
Contributor Author

Au final j’ai appliqué un coup de ECS, même si certaines règles s’éloignent un peu de ce qui est fait chez SPIP.

<?php

// ecs.php
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ECSConfig $ecsConfig): void {
    $ecsConfig->sets([
        SetList::PSR_12, 
        SetList::SYMPLIFY, 
        SetList::COMMON, 
        SetList::CLEAN_CODE
    ]);
    $ecsConfig->skip([
        DeclareStrictTypesFixer::class, 
        AssignmentInConditionSniff::class,
        DeclareStrictTypesFixer::class,
        GeneralPhpdocAnnotationRemoveFixer::class,
    ]);
    $ecsConfig->indentation('tab');
    $ecsConfig->paths(['AdaptiveImages.php']);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant