Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/webpack-5.93.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess authored Oct 10, 2024
2 parents 2691915 + cffd2d2 commit f2c0d50
Show file tree
Hide file tree
Showing 655 changed files with 25,326 additions and 22,292 deletions.
40 changes: 40 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

if (php_sapi_name() !== 'cli') {
throw new \LogicException();
}

$rules = [
'@Symfony' => true,
'@Symfony:risky' => true,
// '@PHP83Migration' => true,

// @Symfony のうち、以下のルールを無効化
'phpdoc_align' => false, // phpdoc の内容が削除されてしまう場合がある
'phpdoc_summary' => false, // 日本語なので不要
'phpdoc_annotation_without_dot' => false, // 日本語なので不要
'no_superfluous_phpdoc_tags' => false, // 副作用があるため
'increment_style' => false, // 強制しなくて良い
'yoda_style' => false, // 強制しなくて良い

// @Symfony:risky のうち、以下のルールを無効化
'psr_autoloading' => false, // PSR-4 に準拠していないため
'is_null' => false, // 副作用があるため
'native_constant_invocation' => false, // namespace を使用していないため不要
'string_length_to_empty' => false, // 副作用があるため
'ternary_to_elvis_operator' => false, // 副作用があるため
];

$finder = \PhpCsFixer\Finder::create()
->in(__DIR__.'/data/class')
->in(__DIR__.'/data/class_extends')
->in(__DIR__.'/data/module')
->in(__DIR__.'/data/smarty_extends')
->in(__DIR__.'/tests')
->name('*.php')
;
$config = new \PhpCsFixer\Config();
return $config
->setRules($rules)
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-configure gd ${GD_OPTIONS} && docker-php-ext-install ${EXT_INSTALL_ARGS}
RUN docker-php-ext-configure gd ${GD_OPTIONS} && docker-php-ext-install -j$(nproc) ${EXT_INSTALL_ARGS}
RUN if [[ ${APCU} ]]; then pecl install ${APCU} && docker-php-ext-enable apcu; fi

# composer
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
"require-dev": {
"doctrine/instantiator": "~1.5.0",
"fakerphp/faker": "^1.23",
"friendsofphp/php-cs-fixer": "^3.9",
"nanasess/ec-cube2-class-extends-stubs": "^1.0",
"nanasess/eccube2-fixture-generator": "^2.0",
"php5friends/phpunit48": ">=4.8.41",
"phpdocumentor/reflection-docblock": "~5.4.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.6",
"symfony/yaml": "^5.4 || ^6.4"
},
"require": {
Expand Down
Loading

0 comments on commit f2c0d50

Please sign in to comment.