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

PHP7.4 対応 #74

Open
nanasess opened this issue Dec 12, 2019 · 2 comments
Open

PHP7.4 対応 #74

nanasess opened this issue Dec 12, 2019 · 2 comments
Labels
improvement 機能改善
Milestone

Comments

@nanasess
Copy link
Collaborator

概要(Overview)

PHP7.4 で動作するよう対応する

期待する内容(Expect) or 要望 (Requirement)

PHP7.4 でユニットテスト・E2Eテストがすべて通ること

課題(Problem)

Warning, Deprecated が発生する

PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /Users/nanasess/git-repos/ec-cube3/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2640
[Thu Dec 12 10:23:23 2019] PHP Deprecated:  Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /Users/nanasess/git-repos/ec-cube3/vendor/twig/twig/lib/Twig/Node.php on line 44
[Thu Dec 12 10:23:34 2019] PHP Notice:  Trying to access array offset on value of type null in /Users/nanasess/git-repos/ec-cube3/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php on line 531

セレクトボックスが表示されない

<select></select>selectid に変化してしまう模様

<selectid="classcategory_id2" name="classcategory_id2" class="form-control"><option value="__unselected">選択してください</option></select>

再現手順(Procedure)

PHP7.4でユニットテスト・E2Eテストを実行する

環境 (environment)

  • EC-CUBE: 3.0.18
  • PHP: 7.4.0
  • DB:
    • PostgreSQL x.x.x
    • MySQL x.x.x

関連情報 (Ref)

@Yangsin Yangsin added this to the 3.0.x milestone Apr 20, 2020
@k-yamamura
Copy link
Contributor

k-yamamura commented Nov 19, 2020

Twigエラーの対応は、php5.4.0以上になってしまいますが、

"twig/twig": "1.41.0",

を導入する事でPHP7.4でも無理やり動作させる事が可能です。

composer require --ignore-platform-reqs twig/twig "1.41.0"

を実行すれば導入可能です。

@riccardovalley
Copy link

セレクトボックスが表示されない
が selectid に変化してしまう模様
<selectid="classcategory_id2" name="classcategory_id2" class="form-control">選択してください

/www/vendor/twig/twig/lib/Twig/Lexer.php
を修正することで対処できます。

if (isset($this->positions[2][$this->position][0]) ) {
$text = rtrim($text);
}

if (isset($this->positions[2][$this->position][0]) && ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0])) {
$text = rtrim($text);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement 機能改善
Projects
None yet
Development

No branches or pull requests

4 participants