Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/4.3' into bugfix_annotation_dr…
Browse files Browse the repository at this point in the history
…iver
  • Loading branch information
nanasess committed Apr 2, 2024
2 parents 53fd424 + 01337a0 commit fc22eac
Show file tree
Hide file tree
Showing 1,834 changed files with 65,901 additions and 42,006 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"service": "ec-cube",
"workspaceFolder": "/var/www/html",
"settings": {
"intelephense.environment.phpVersion": "7.3",
"intelephense.environment.phpVersion": "7.4",
"php-cs-fixer.allowRisky": false,
"php-cs-fixer.config": "/var/www/html/.php_cs.dist",
"php-cs-fixer.executablePath": "/var/www/html/vendor/bin/php-cs-fixer",
Expand Down
16 changes: 8 additions & 8 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
APP_ENV=prod
APP_DEBUG=0
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS=localhost,example.com
#TRUSTED_HOSTS=^localhost$,^example\.com$
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
Expand All @@ -21,15 +21,14 @@ DATABASE_URL=sqlite:///var/eccube.db

# The version of your database engine
DATABASE_SERVER_VERSION=3

# The charset of your database engine
DATABASE_CHARSET=utf8
###< doctrine/doctrine-bundle ###

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# For a debug SMTP server, use: "smtp://mailcatcher:1025"
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###
###> symfony/mailer ###
MAILER_DSN=null://null
###< symfony/mailer ###

###> APPLICATION CONFIG ###
# EC-CUBE Configs. The default value is defined in app/config/packages/eccube.yaml.
Expand All @@ -54,5 +53,6 @@ MAILER_URL=null://localhost
#ECCUBE_2FA_ENABLED=true
#ECCUBE_2FA_COOKIE_NAME=eccube_2fa
#ECCUBE_2FA_EXPIRE=14
#ECCUBE_RESTRICT_FILE_UPLOAD=0

###< APPLICATION CONFIG ###
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!-- ****************************************************************************
脆弱性報告 (Vulnerability report)
脆弱性のご報告は弊社[問い合わせフォーム](https://www.ec-cube.net/contact/)からお願いします。
**************************************************************************** -->

## 概要(Overview)


Expand Down
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/1_Bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 🐛 不具合報告(Bug Report)
description: 脆弱性に関する報告はこちらからしないでください。
labels: bug
body:
- type: textarea
id: overview
attributes:
label: 概要(Overview)
validations:
required: true
- type: textarea
id: procedure
attributes:
label: 再現手順(Procedure)
validations:
required: true
- type: textarea
id: affected-versions
attributes:
label: 環境(Environment)
description:
placeholder: |
EC-CUBE: 4.2.x
PHP: 8.x.x
DB:
PostgresSQL x.x.x
MySQL x.x.x
validations:
required: true
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/2_Feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 🚀 改善要望(Feature Request)
description: こんな機能が欲しいなど
body:
- type: textarea
id: overview
attributes:
label: 概要(Overview)
description:
validations:
required: true
- type: textarea
id: example
attributes:
label: 期待する内容(Expect) or 要望(Requirement)
description:
validations:
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 脆弱性報告(Vulnerability Report)
url: https://www.ec-cube.net/contact/
about: 公式サイトのお問い合わせフォームへ(概要と再現手順を必ずご記載ください)
- name: 質問(Question)
url: https://xoops.ec-cube.net/
about: 開発中に困ったことの相談や質問などは開発コミュニティへ
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<!-- 以下を参考にコメントを作成してください。 -->

<!-- ****************************************************************************
脆弱性報告 (Vulnerability report)
脆弱性のご報告は弊社[問い合わせフォーム](https://www.ec-cube.net/contact/)からお願いします。
**************************************************************************** -->

## 概要(Overview・Refs Issue)
<!-- PullRequestの目的、関連するIssue番号など -->

Expand Down
19 changes: 19 additions & 0 deletions .github/actions/composer/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
runs:
using: "Composite"
steps:
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
shell: bash

- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: composer install
run: composer install --dev --no-interaction -o --apcu-autoloader
shell: bash
98 changes: 41 additions & 57 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ on:
jobs:
phpunit:
name: PHPUnit
runs-on: ${{ matrix.operating-system }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-18.04 ]
php: [ 7.4 ]
php: [ 8.3 ]
db: [ pgsql ]
include:
- db: pgsql
Expand All @@ -41,34 +40,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: composer install
run: composer install --dev --no-interaction -o --apcu-autoloader

- name: Setup pcov
run: |
sudo apt-fast install -y php7.4-pcov
sudo apt-fast install -y php8.3-pcov
sudo phpenmod -s cli pcov
composer require pcov/clobber --dev
vendor/bin/pcov clobber
- name: Initialize Composer
uses: ./.github/actions/composer

- name: Setup EC-CUBE
env:
APP_ENV: 'test'
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
run: |
Expand All @@ -83,7 +70,10 @@ jobs:
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_URL: 'smtp://127.0.0.1:1025'
continue-on-error: true
run: bin/phpunit --exclude-group cache-clear,cache-clear-install,update-schema-doctrine --coverage-clover=coverage1.xml
run: |
echo "session.save_path=$PWD/var/sessions/test" > php.ini
echo "memory_limit=512M" >> php.ini
php -c php.ini -dpcov.enabled=1 vendor/bin/phpunit --exclude-group cache-clear,cache-clear-install,update-schema-doctrine --coverage-clover=coverage1.xml
- name: Upload report
if: success()
uses: actions/upload-artifact@v2
Expand All @@ -92,12 +82,11 @@ jobs:
path: coverage1.xml
codeception:
name: Codeception
runs-on: ${{ matrix.operating-system }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-18.04 ]
php: [ 7.4 ]
php: [ 8.3 ]
db: [ pgsql ]
group: [ admin01, admin02, admin03, front, installer ]
include:
Expand Down Expand Up @@ -135,37 +124,36 @@ jobs:
- name: Checkout
uses: actions/checkout@master

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: composer install
run: |
sudo composer selfupdate
composer install --dev --no-interaction -o --apcu-autoloader
- name: Initialize Composer
uses: ./.github/actions/composer

- name: Setup to EC-CUBE
env:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_DSN: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
TRUSTED_HOSTS: '127.0.0.1,localhost'
run: |
echo "APP_ENV=${APP_ENV}" > .env
echo "DATABASE_URL=${DATABASE_URL}" >> .env
echo "DATABASE_SERVER_VERSION=${DATABASE_SERVER_VERSION}" >> .env
echo "MAILER_DSN=${MAILER_DSN}" >> .env
echo "ECCUBE_PACKAGE_API_URL=${ECCUBE_PACKAGE_API_URL}" >> .env
echo "TRUSTED_HOSTS=${TRUSTED_HOSTS}" >> .env
bin/console doctrine:database:create --env=dev
bin/console doctrine:schema:create --env=dev
bin/console eccube:fixtures:load --env=dev
- name: Install fonts
run: sudo apt install fonts-ipafont fonts-ipaexfont

- name: setup-chromedriver
uses: nanasess/setup-chromedriver@master

Expand All @@ -181,37 +169,33 @@ jobs:
run: |
if [[ ! -d ${PWD}/repos ]]; then mkdir -p ${PWD}/repos ; fi
docker run -d --rm -v ${PWD}/repos:/repos -e MOCK_REPO_DIR=/repos -p 8080:8080 eccube/mock-package-api:composer2
cp codeception/_data/plugins/*-1.0.0.tgz repos
for d in $(ls codeception/_data/plugins | grep 1.0.0)
do
(cd codeception/_data/plugins/$d; tar zcf ../../../../repos/${d}.tgz *)
done
- name: Setup xdebug
- name: Setup pcov
run: |
sudo apt-fast install -y php8.3-pcov
sudo phpenmod -s cli pcov
- name: Setup codeception
run: |
composer config --no-plugins allow-plugins.codeception/c3 true
composer require --dev codeception/c3 "2.*"
sudo phpenmod -s cli xdebug
sed -i "7a include __DIR__.'/c3.php';" index.php
- name: Start PHP Development Server
env:
APP_ENV: 'codeception'
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_URL: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
XDEBUG_MODE: coverage
run: php -S 127.0.0.1:8000 &
run: php -S 127.0.0.1:8000 codeception/router.php &

- name: Codeception
env:
APP_ENV: ${{ matrix.app_env }}
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}
MAILER_URL: 'smtp://127.0.0.1:1025'
ECCUBE_PACKAGE_API_URL: 'http://127.0.0.1:8080'
GROUP: ${{ matrix.group }}
SYMFONY_DEPRECATIONS_HELPER: weak
XDEBUG_MODE: coverage
continue-on-error: true
run: vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group excludeCoverage --coverage --coverage-xml
run: |
sed -i "s|%GITHUB_WORKSPACE%|${GITHUB_WORKSPACE}|g" codeception/_envs/github_action.yml
php -dpcov.enabled=1 vendor/bin/codecept -vvv run acceptance --env chrome,github_action -g ${GROUP} --skip-group excludeCoverage --coverage --coverage-xml
- name: Upload outputs
uses: actions/upload-artifact@v2
with:
Expand Down
Loading

0 comments on commit fc22eac

Please sign in to comment.