marcimat
Repos
3
Followers
25
Following
10

Events

opened issue
Function `http_status` is a SPIP function. Use `http_response_code` instead...
Created at 4 days ago
issue comment
Erreur d’exécution (PHP 8.2) "Constant _MONETICOPAIEMENT_VERSION already defined"

Je suppose que ce sont les autorisations qui chargent include_spip("presta/$mode/config"); qui fait que ça passe avant presta/cmcic/inc/cmcic.php.

Est-ce que simplement supprimer la déclaration de cette constante dans config.php convient ?

Created at 1 week ago
opened issue
Erreur d’exécution (PHP 8.2) "Constant _MONETICOPAIEMENT_VERSION already defined"

presta/cmcic/inc/cmcic.php Line 138 : Constant _MONETICOPAIEMENT_VERSION already defined

Effectivement, c’est ausis défini dans presta/cmcic/config.php

Created at 1 week ago
opened issue
Deprecated when snserializing a DateTimeImmutable object

Hi

Some deprecated are shown when unserializing a DateTimeImmutable object, like :

Creation of dynamic property DateTimeImmutable::$date is deprecated (in JsonSerializer.php on line 463)

I think this could be treated like DateTime object, on unserializeObject() method like

        if ($className === 'DateTime' || $className === 'DateTimeImmutable') {
            $obj = $this->restoreUsingUnserialize($className, $value);
            $this->objectMapping[$this->objectMappingIndex++] = $obj;
            return $obj;
        }

Hope it helps :)

Created at 2 weeks ago
opened issue
Support of UnitEnum and BackedEnum unserialization for PHP 8.1+

Hi,

Both Enum types can’t be deserialized and create a fatal error : Fatal error: Uncaught Error: Cannot instantiate enum ...

I think they could be both managed into unserializeObject method by adding :

if (is_subclass_of($className, \BackedEnum::class) || is_subclass_of($className, \UnitEnum::class)) {
    return constant("$className::{$value['name']}");
}
Created at 2 weeks ago
Created at 3 weeks ago
Created at 3 weeks ago
Created at 3 weeks ago
Created at 3 weeks ago
issue comment
Update php requirements : PHP >= 7.3+

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']);
};
Created at 1 month ago

chore(cs-fix): Passe de ECS

Config:

$ecsConfig->sets([SetList::PSR_12, SetList::SYMPLIFY, SetList::COMMON, SetList::CLEAN_CODE]);
$ecsConfig->rule(NoExtraBlankLinesFixer::class);
$ecsConfig->indentation('tab');
$ecsConfig->paths(['AdaptiveImages.php']);

fix: Use native php function (not old SPIP function)

Created at 1 month ago

chore(cs-fix): Passe de ECS

Config:

$ecsConfig->sets([SetList::PSR_12, SetList::SYMPLIFY, SetList::COMMON, SetList::CLEAN_CODE]);
$ecsConfig->rule(NoExtraBlankLinesFixer::class);
$ecsConfig->indentation('tab');
$ecsConfig->paths(['AdaptiveImages.php']);

fix: Use native php function (not old SPIP function)

Created at 1 month ago
pull request opened
Update php requirements : PHP >= 7.3+

Correct also some warnings in PHP 8+ and PHP 8.2

Created at 1 month ago
create branch
marcimat create branch update_php_requirements
Created at 1 month ago
create branch
marcimat create branch v3
Created at 1 month ago
Created at 1 month ago
started
Created at 1 month ago
Created at 1 month ago