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

[4.1] PHP8 Support #4793

Closed
wants to merge 12 commits into from
Closed

[4.1] PHP8 Support #4793

wants to merge 12 commits into from

Conversation

nanasess
Copy link
Contributor

@nanasess nanasess commented Dec 10, 2020

概要(Overview・Refs Issue)

方針(Policy)

  • PHP8 で動作するよう修正する

実装に関する補足(Appendix)

  • Doctrine ORM 2.8.x にアップグレードしたのに伴い、以下の修正が必要
    • doctrine/persistence 2.0.x 対応(namespace 変更)
    • doctrine/migrations 2.3.x 対応(実装の変更)
    • Doctrine EventSubscriber の修正(namespace 変更)
  • Mock を使用したテストケースがエラーになる
  • MySQL のユニットテストが PDOException: SQLSTATE[42000]: Syntax error or access violation: 1305 SAVEPOINT DOCTRINE2_SAVEPOINT_3 does not exist でエラーになる
  • プラグインインストール時、composer.json の config.platform が書き変わるため以下のようなエラーが発生する
    Problem 1
     - Root composer.json requires php ^7.3 but your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 2
     - doctrine/doctrine-cache-bundle is locked to version 1.4.0 and an update of this package was not requested.
     - doctrine/doctrine-cache-bundle 1.4.0 requires php ^7.1 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 3
     - doctrine/doctrine-migrations-bundle is locked to version 2.2.1 and an update of this package was not requested.
     - doctrine/doctrine-migrations-bundle 2.2.1 requires php ^7.1 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 4
     - doctrine/migrations is locked to version 2.3.0 and an update of this package was not requested.
     - doctrine/migrations 2.3.0 requires php ^7.1 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 5
     - friendsofphp/php-cs-fixer is locked to version v2.16.7 and an update of this package was not requested.
     - friendsofphp/php-cs-fixer v2.16.7 requires php ^7.1 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 6
     - setasign/fpdi is locked to version v2.3.4 and an update of this package was not requested.
     - setasign/fpdi v2.3.4 requires php ^5.6 || ^7.0 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 7
     - skorp/detect-incompatible-samesite-useragents is locked to version 1.0.0 and an update of this package was not requested.
     - skorp/detect-incompatible-samesite-useragents 1.0.0 requires php ^7.0 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 8
     - codeception/codeception is locked to version 2.4.5 and an update of this package was not requested.
     - codeception/codeception 2.4.5 requires php >=5.6.0 <8.0 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 9
     - dama/doctrine-test-bundle is locked to version v5.0.5 and an update of this package was not requested.
     - dama/doctrine-test-bundle v5.0.5 requires php ^7.1 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 10
     - fzaninotto/faker is locked to version v1.9.1 and an update of this package was not requested.
     - fzaninotto/faker v1.9.1 requires php ^5.3.3 || ^7.0 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 11
     - phpunit/phpunit is locked to version 6.5.14 and an update of this package was not requested.
     - phpunit/phpunit 6.5.14 requires php ^7.0 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
    Problem 12
     - doctrine/doctrine-migrations-bundle 2.2.1 requires php ^7.1 -> your php version (8.0.0; overridden via config.platform, same as actual) does not satisfy that requirement.
     - symfony/orm-pack v1.0.8 requires doctrine/doctrine-migrations-bundle * -> satisfiable by doctrine/doctrine-migrations-bundle[2.2.1].
     - symfony/orm-pack is locked to version v1.0.8 and an update of this package was not requested.
    

テスト(Test)

TODO

相談(Discussion)

  • Doctrine DBAL 2.12.x にアップグレードしたのに伴い、システム要件が PHP7.3 or higer に変更となる

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更
  • フックポイントの呼び出しタイミングの変更
  • フックポイントのパラメータの削除・データ型の変更
  • twigファイルに渡しているパラメータの削除・データ型の変更
  • Serviceクラスの公開関数の、引数の削除・データ型の変更
  • 入出力ファイル(CSVなど)のフォーマット変更

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか

@okazy okazy added this to the 4.1 milestone Dec 10, 2020
@okazy okazy mentioned this pull request Dec 25, 2020
@nanasess
Copy link
Contributor Author

#4603 (comment)

互換性のなくなるいくつかの変更が必要なので、EC-CUBE4.1では互換性を優先し、PHP8対応は実施しません。
次のメジャーバージョンにてSymfony5対応と共にPHP8対応を検討します。

とのことですので、 本 PR は #4528 にマージして引き継ぎます。

@nanasess nanasess closed this Dec 25, 2020
@nanasess nanasess mentioned this pull request Dec 25, 2020
16 tasks
@chihiro-adachi chihiro-adachi modified the milestones: 4.1.0, 4.2 Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP8 Support
3 participants