バージョン選択

フォーラム

メニュー

オンライン状況

41 人のユーザが現在オンラインです。 (33 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 41
もっと...

サイト内検索

質問 > 管理機能 > composer show時のFlex.phpでのParseエラーについて

管理機能

新規スレッドを追加する

スレッド表示 | 古いものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
gwkozaki
投稿日時: 2020/6/30 15:49
対応状況: 解決済
常連
登録日: 2019/7/30
居住地: 日本
投稿: 53
Re: composer show時のFlex.phpでのParseエラーについて
red 様

早速のご回答をいただき、ありがとうございます!

ご助言を受けてコマンドのPHPのバージョンの指定方法をいくつか試したところ、表示させることが出来ました!!
ご教授いただき、誠にありがとうございます!

以前PHPのバージョンを疑い、下記のようなコマンドを試してはいたのですが上手くいかず、PHPのバージョンが低い可能性を早々に排除してしまっておりました。
・間違った指定の仕方
php7.2 composer show | grep symfony/http-foundation


改めてPHPのバージョン指定方法を調査・試行したところ、composerのパスの指定が誤っていることが判明し、以下のコマンドで表示させることが出来ました。
・正しい指定の仕方
php7.2 /usr/bin/composer show | grep symfony/http-foundation


このような初歩的な部分でお手を煩わせてしまい、お恥ずかしい限りです。。
今後同じ過ちを繰り返さないよう、注意いたします。

この度は初歩的なことにも関わらず、
ご助言・ご教授を賜り、誠にありがとうございました。

今後ともどうぞ、よろしくお願いいたします!
red
投稿日時: 2020/6/30 15:13
対応状況: −−−
登録日: 2010/2/15
居住地: 東京都
投稿: 1567
Re: composer show時のFlex.phpでのParseエラーについて
コマンドのPHPのバージョンが低くはないですか?


----------------
EC-CUBEのカスタマイズ、トラブル解決承ります
お気軽にお問い合わせ下さい
https://www.ec-cube.net/integrate/partner/partner.php?partner_id=690

gwkozaki
投稿日時: 2020/6/30 12:50
対応状況: −−−
常連
登録日: 2019/7/30
居住地: 日本
投稿: 53
composer show時のFlex.phpでのParseエラーについて
▼テンプレート
[EC-CUBE] EC-CUBE4.0.2 (4.0.1からのアップデート)
[レンタルサーバ] Xserver
[PHP] PHP7.2.29
[導入プラグインの有無]
 ・全ページ対応パンくずリスト表示プラグイン for EC-CUBE4
 ・EC-CUBEアップデートプラグイン
 ・商品オプションプラグイン
 ・売上集計プラグイン
 ・商品並び替えプラグイン
 ・ゼウス決済プラグイン
 ・ART(アンバサダーマーケティングツール)導入プラグイン for EC-CUBE 4.0
[カスタマイズの有無] 有り
[現象]
4系の脆弱性対応を行おうと思い、まず下記のコマンドでhttp-foundationのバージョンを確認しようとしたところ、エラーが返されました。
composer show | grep symfony/http-foundation


エラーとしては、以下のようなFlex.phpのparseエラーが表示されている状態です。
PHP Parse error:  syntax error, unexpected '?' in /EC-CUBE本体までのパス/vendor/symfony/flex/src/Flex.php on line 118


エラーが出ている箇所には、以下のようなコードが記載されておりました。
$symfonyRequire = getenv('SYMFONY_REQUIRE') ?: ($composer->getPackage()->getExtra()['symfony']['require'] ?? null);


【試したこと】
 ・composer update symfony/flex --no-plugins --no-scripts  →下記のようなWarningなどが表示される。そして、解消もされない。
Deprecation warning: require.ec-cube/BreadcrumbList4 is invalid, it should not contain uppercase characters. Please use ec-cube/breadcrumblist4 instead. Make sure you fix this as Composer 2.0 will error.
Deprecation warning: require.ec-cube/ProductOption is invalid, it should not contain uppercase characters. Please use ec-cube/productoption instead. Make sure you fix this as Composer 2.0 will error.
Deprecation warning: require.ec-cube/SalesReport4 is invalid, it should not contain uppercase characters. Please use ec-cube/salesreport4 instead. Make sure you fix this as Composer 2.0 will error.
Deprecation warning: require.ec-cube/SortProduct is invalid, it should not contain uppercase characters. Please use ec-cube/sortproduct instead. Make sure you fix this as Composer 2.0 will error.
Deprecation warning: require.ec-cube/ZeusPayment4 is invalid, it should not contain uppercase characters. Please use ec-cube/zeuspayment4 instead. Make sure you fix this as Composer 2.0 will error.
Deprecation warning: require-dev.mikey179/vfsStream is invalid, it should not contain uppercase characters. Please use mikey179/vfsstream instead. Make sure you fix this as Composer 2.0 will error.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package easycorp/easy-log-handler is abandoned, you should avoid using it. No replacement was suggested.
Package facebook/webdriver is abandoned, you should avoid using it. Use php-webdriver/webdriver instead.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Package sensio/generator-bundle is abandoned, you should avoid using it. Use symfony/maker-bundle instead.
Package setasign/fpdi-tcpdf is abandoned, you should avoid using it. No replacement was suggested.
Package symfony/lts is abandoned, you should avoid using it. Use symfony/flex instead.
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Generating optimized autoload files
Warning: Ambiguous class resolution, "Eccube\Entity\CartItem" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/CartItem.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/CartItem.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\Customer" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Customer.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/Customer.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\CustomerAddress" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/CustomerAddress.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/CustomerAddress.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\Member" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Member.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/Member.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\OrderItem" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/OrderItem.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/OrderItem.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\Shipping" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Shipping.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/Shipping.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\Cart" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Cart.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/Cart.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\Order" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Order.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/Order.php", the first will be used.
Warning: Ambiguous class resolution, "Eccube\Entity\Product" was found in both "$baseDir . '/app/proxy/entity/src/Eccube/Entity/Product.php" and "/ECCUBE本体までのパス/src/Eccube/Entity/Product.php", the first will be used.


/vendor内のファイルであるため、直接修正するのは望ましくないような気もして、どう対処すべきか判断しかねている状態です。
こちらのエラーの解消法について、ご存知の方がおられましたら、ご教授いただけるとありがたいです。

何卒、よろしくお願いいたします。
スレッド表示 | 古いものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,287名です
総投稿数は109,688件です

投稿数ランキング

1
seasoft
7365
2
468
3217
3
AMUAMU
2712
4
nanasess
2303
5
umebius
2085
6
yuh
1818
7
h_tanaka
1610
8
red
1567
9
mcontact
1240
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
796
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.