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

Feature/level 0 fixes #11

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5173db2
PHPStan Doctrine プラグイン追加後に発生した問題を修正
chrisL-meier Oct 27, 2023
9a2c7bd
PHPStanバッチ機能の作成
sai-gillingham Oct 27, 2023
a5f5c9b
Symfony ServiceのLevel 0定義ミスの修正
sai-gillingham Nov 6, 2023
73a9b86
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
0fd9f4f
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
39430dc
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
f202f22
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
b8f9ab4
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
4b0f2ce
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
2f9311e
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
3eaa920
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
e92359b
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
ff1b7eb
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
0d247c0
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
9909a12
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
bf9081b
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
a17f574
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
d14f1f8
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
70985f7
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
3f7d6ff
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
b716c40
ゲッター・セッターのタイプヒント修正。
sai-gillingham Nov 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG TAG=7.4-apache-bullseye
ARG TAG=8.1-apache-bullseye
FROM php:${TAG}

ENV APACHE_DOCUMENT_ROOT /var/www/html
Expand Down Expand Up @@ -32,10 +32,13 @@ RUN apt update \
&& echo "en_US.UTF-8 UTF-8" >/etc/locale.gen \
&& locale-gen \
;
RUN pecl search xdebug-3.1.6\
&& pecl install xdebug-3.1.6

RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install -j$(nproc) zip gd mysqli pdo_mysql opcache intl pgsql pdo_pgsql \
&& docker-php-ext-enable xdebug \
;

RUN pecl install apcu && echo "extension=apcu.so" > /usr/local/etc/php/conf.d/apc.ini
Expand Down
20 changes: 17 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"minimum-stability": "stable",
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1",
"ext-curl": "*",
"ext-intl": "*",
"ext-json": "*",
Expand Down Expand Up @@ -115,7 +115,9 @@
"dama/doctrine-test-bundle": "^6.6",
"fakerphp/faker": "^1.16",
"mikey179/vfsstream": "^1.6",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.7",
"phpstan/phpstan-doctrine": "^1.3",
"symfony/browser-kit": "^5.4",
"symfony/phpunit-bridge": "^5.4"
},
Expand Down Expand Up @@ -186,7 +188,7 @@
},
"config": {
"platform": {
"php": "7.4.0"
"php": "8.1.18"
},
"preferred-install": {
"*": "dist"
Expand All @@ -197,7 +199,19 @@
"composer/*": true,
"kylekatarnls/update-helper": true,
"ec-cube/plugin-installer": true,
"symfony/flex": true
"symfony/flex": true,
"phpstan/extension-installer": true
}
},
"repositories": {
"eccube": {
"type": "composer",
"url": "https://package-api-c2.ec-cube.net/v42",
"options": {
"http": {
"header": ["X-ECCUBE-KEY: d285840e84bb5ab7c5650250818a75970877c761"]
}
}
}
}
}
106 changes: 106 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions phpdoc_result_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#bin/bash

for level in {0..9}
do
docker exec my_eccube-ec-cube-1 bash -c "vendor/bin/phpstan analyse src --level ${level} > tests/results/level_${level}.json"
done

php tests/results/convert.php
9 changes: 8 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
parameters:
level: 1
level: 0
doctrine:
objectManagerLoader: tests/object-manager.php
ormRepositoryClass: Eccube\Repository\AbstractRepository
errorFormat: json
services:
errorFormatter.csv:
class: Eccube\Service\Command\CsvErrorFormatter
4 changes: 2 additions & 2 deletions src/Eccube/Entity/AuthorityRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AuthorityRole extends \Eccube\Entity\AbstractEntity
private $update_date;

/**
* @var \Eccube\Entity\Master\Authority
* @var \Eccube\Entity\Master\Authority|null
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Authority")
* @ORM\JoinColumns({
Expand All @@ -68,7 +68,7 @@ class AuthorityRole extends \Eccube\Entity\AbstractEntity
private $Authority;

/**
* @var \Eccube\Entity\Member
* @var \Eccube\Entity\Member|null
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
* @ORM\JoinColumns({
Expand Down
16 changes: 8 additions & 8 deletions src/Eccube/Entity/BaseInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,21 +257,21 @@ class BaseInfo extends \Eccube\Entity\AbstractEntity
private $option_point = true;

/**
* @var string
* @var string|null
*
* @ORM\Column(name="basic_point_rate", type="decimal", precision=10, scale=0, options={"unsigned":true, "default":1}, nullable=true)
*/
private $basic_point_rate = '1';

/**
* @var string
* @var string|null
*
* @ORM\Column(name="point_conversion_rate", type="decimal", precision=10, scale=0, options={"unsigned":true, "default":1}, nullable=true)
*/
private $point_conversion_rate = '1';

/**
* @var \Eccube\Entity\Master\Country
* @var \Eccube\Entity\Master\Country|null
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Country")
* @ORM\JoinColumns({
Expand All @@ -282,7 +282,7 @@ class BaseInfo extends \Eccube\Entity\AbstractEntity
private $Country;

/**
* @var \Eccube\Entity\Master\Pref
* @var \Eccube\Entity\Master\Pref|null
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref")
* @ORM\JoinColumns({
Expand Down Expand Up @@ -1074,7 +1074,7 @@ public function isOptionPoint()
/**
* Set pointConversionRate
*
* @param string $pointConversionRate
* @param string|null $pointConversionRate
*
* @return BaseInfo
*/
Expand All @@ -1088,7 +1088,7 @@ public function setPointConversionRate($pointConversionRate)
/**
* Get pointConversionRate
*
* @return string
* @return string|null
*/
public function getPointConversionRate()
{
Expand All @@ -1098,7 +1098,7 @@ public function getPointConversionRate()
/**
* Set basicPointRate
*
* @param string $basicPointRate
* @param string|null $basicPointRate
*
* @return BaseInfo
*/
Expand All @@ -1112,7 +1112,7 @@ public function setBasicPointRate($basicPointRate)
/**
* Get basicPointRate
*
* @return string
* @return string|null
*/
public function getBasicPointRate()
{
Expand Down
12 changes: 7 additions & 5 deletions src/Eccube/Entity/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ class Block extends \Eccube\Entity\AbstractEntity
private $update_date;

/**
* @var \Doctrine\Common\Collections\Collection
* @var \Doctrine\Common\Collections\Collection<int,BlockPosition>
*
* @ORM\OneToMany(targetEntity="Eccube\Entity\BlockPosition", mappedBy="Block", cascade={"persist","remove"})
*/
private $BlockPositions;

/**
* @var \Eccube\Entity\Master\DeviceType
* @var \Eccube\Entity\Master\DeviceType|null
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\DeviceType")
* @ORM\JoinColumns({
Expand Down Expand Up @@ -294,6 +294,8 @@ public function addBlockPosition(BlockPosition $blockPosition)
* Remove blockPosition
*
* @param \Eccube\Entity\BlockPosition $blockPosition
*
* @return void
*/
public function removeBlockPosition(BlockPosition $blockPosition)
{
Expand All @@ -303,7 +305,7 @@ public function removeBlockPosition(BlockPosition $blockPosition)
/**
* Get blockPositions
*
* @return \Doctrine\Common\Collections\Collection
* @return \Doctrine\Common\Collections\Collection<int,BlockPosition>
*/
public function getBlockPositions()
{
Expand All @@ -313,7 +315,7 @@ public function getBlockPositions()
/**
* Set deviceType
*
* @param \Eccube\Entity\Master\DeviceType $deviceType
* @param \Eccube\Entity\Master\DeviceType|null $deviceType
*
* @return Block
*/
Expand All @@ -327,7 +329,7 @@ public function setDeviceType(Master\DeviceType $deviceType = null)
/**
* Get deviceType
*
* @return \Eccube\Entity\Master\DeviceType
* @return \Eccube\Entity\Master\DeviceType|null
*/
public function getDeviceType()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Entity/BlockPosition.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class BlockPosition extends \Eccube\Entity\AbstractEntity
private $block_row;

/**
* @var \Eccube\Entity\Block
* @var \Eccube\Entity\Block|null
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Block", inversedBy="BlockPositions")
* @ORM\JoinColumns({
Expand All @@ -72,7 +72,7 @@ class BlockPosition extends \Eccube\Entity\AbstractEntity
private $Block;

/**
* @var \Eccube\Entity\Layout
* @var \Eccube\Entity\Layout|null
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Layout", inversedBy="BlockPositions")
* @ORM\JoinColumns({
Expand Down
6 changes: 3 additions & 3 deletions src/Eccube/Entity/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function isDefaultCalendar()
private $id;

/**
* @var string
* @var string|null
*
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
Expand Down Expand Up @@ -92,7 +92,7 @@ public function getId()
/**
* Set title.
*
* @param string $title
* @param string|null $title
*
* @return Calendar
*/
Expand All @@ -106,7 +106,7 @@ public function setTitle($title)
/**
* Get title.
*
* @return string
* @return string|null
*/
public function getTitle()
{
Expand Down
Loading
Loading