Skip to content

Instantly share code, notes, and snippets.

View chihiro-adachi's full-sized avatar

Chihiro Adachi chihiro-adachi

View GitHub Profile
## playwright実行するとエラー
```
HTTP_PROXY=127.0.0.1:8090 HTTPS_PROXY=127.0.0.1:8090 yarn run playwright test
yarn run v1.22.17
$ /Users/chihiro_adachi/repos/eccube41/zap/selenium/ci/TypeScript/node_modules/.bin/playwright test
Using config at /Users/chihiro_adachi/repos/eccube41/zap/selenium/ci/TypeScript/playwright.config.ts
Running 35 tests using 2 workers
1) [chromium] › front_guest/contact.test.ts:20:3 › お問い合わせフォームのテストをします › お問い合わせページを表示します ==========
namespace Customize\EventListener;
use Eccube\Request\Context;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
class XssProtector implements EventSubscriberInterface
{
/**
@chihiro-adachi
chihiro-adachi / AdminUserCommand.php
Last active May 20, 2024 05:57
AdminUserCommand.php
<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
@chihiro-adachi
chihiro-adachi / gist:eeec052e816c083dbbfea9e528c8ce4a
Created September 2, 2019 23:49
EC-CUBE 4.0.2 -> 4.0.3 テンプレート差分
商品購入(Shopping/index.twig)
```diff
diff --git a/src/Eccube/Resource/template/default/Shopping/index.twig b/src/Eccube/Resource/template/default/Shopping/index.twig
index 48a937a..a49da89 100644
--- a/src/Eccube/Resource/template/default/Shopping/index.twig
+++ b/src/Eccube/Resource/template/default/Shopping/index.twig
@@ -1,9 +1,9 @@
{#
This file is part of EC-CUBE
@chihiro-adachi
chihiro-adachi / TestType
Created February 21, 2019 09:01
FormEventのサンプル
<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
*
* http://www.lockon.co.jp/
*
* For the full copyright and license information, please view the LICENSE
@chihiro-adachi
chihiro-adachi / LoginEventListeiner.php
Created February 21, 2019 08:44
イベントリスナ
<?php
namespace Eccube\EventListener;
use Eccube\Entity\Customer;
use Eccube\Request\Context;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
@chihiro-adachi
chihiro-adachi / repository.md
Last active September 19, 2017 07:15
レポジトリの例外処理

現状

  • レポジトリ内で、\Exceptionで例外をcatchし、true/falseでハンドリングしている箇所が多々ある
    • ログ出力も行っておらず、何が発生したかわかりづらい
    • 外部キー制約違反など、コントローラ側で制御したほうがよいのでは
  • 不要なトランザクション
    • TransactionListenerにより、アプリケーションの起動、終了タイミングでbegin/commitが行われるようになっているため、レポジトリ内でのトランザクションは不要

修正イメージ

https://github.com/chihiro-adachi/ec-cube/commit/fefcf43819c6a77d0d920b5df8b259d933ad28a3

@chihiro-adachi
chihiro-adachi / ecomerce.md
Last active August 29, 2017 09:02
ecomerce cms比較