EC-CUBE / ec-cube

EC-CUBE is the most popular e-commerce solution in Japan
https://www.ec-cube.net
Other
735 stars 645 forks source link

Symfony への移行に伴う config 関連の変更を整理する #2703

Closed nanasess closed 5 years ago

nanasess commented 6 years ago

変更方針

変更内容

config.yml

パラメータ 変更場所
auth_magic ENV
password_hash_algos parameters
shop_name 廃止
force_ssl ENV
admin_allow_host ENV
cookie_lifetime parameters (TODO)
locale parameters
timezone parameters (TODO)
eccube_install ENV
trusted_proxies_connection_only Bundle に任せる
trusted_proxies Bundle に任せる
cookie_name parameters (TODO)
pageinrange 廃止

constant.yml

基本方針は eccube.constants に定義する。

パラメータ 定義場所
auth_type parameters
csv_size post_max_size, upload_max_filesize に任せればよい?
csv_temp_realdir upload_tmp_dir に任せればよい?
default_country_id parameters
default_password parameters
deliv_addr_max parameters
deliv_date_end_max parameters
device_type_admin クラス定数
device_type_pc クラス定数
device_type_smarphone クラス定数
eccube_payment (TODO) 決済プラグインで利用あり?
id_max_len parameters
id_min_len parameters
image_save_realdir parameters
image_save_urlpath asset 使う
image_temp_realdir upload_tmp_dir に任せればよい?
image_temp_urlpath asset つかう
int_len 最大値で制御したい
category_nest_level parameters
lltext_len parameters
locale parameters
ltext_len parameters
max_total_fee parameters
mltext_len parameters
mtext_len parameters
order_back_order クラス定数
order_cancel クラス定数
order_deliv クラス定数
order_new クラス定数
order_pay_wait クラス定数
order_pending クラス定数
order_pre_end クラス定数
order_processing クラス定数
plugin_html_realdir parameters
plugin_html_urlpath asset 使う
plugin_realdir parameters
plugin_temp_realdir upload_tmp_dir に任せればよい?
price_len 最大値で制御したい
search_pmax parameters
sltext_len parameters
smtext_len parameters
tax_rule_priority parameters(Array にする)
template_temp_realdir upload_tmp_dir に任せればよい?
url_len parameters
default_page_count parameters
admin_product_stock_status parameters
eccube_info_url parameters
customer_reset_expire parameters
csv_export_separator parameters
csv_export_encoding parameters
csv_export_date_format parameters
csv_export_multidata_separator parameters
csv_import_delimiter parameters
csv_import_enclosure parameters
csv_import_escape parameters
owners_store_url parameters
name_len parameters
kana_len parameters
address1_len parameters
address2_len parameters
birth_max parameters
product_order_price_lower parameters
product_order_newer parameters
product_order_price_higher parameters
admin_home_urlpath 廃止
admin_id 廃止
admin_log_realfile 廃止
admin_login_urlpath 廃止
admin_logout_urlpath 廃止
admin_mode 廃止
admin_news_startyear 廃止
admin_order_edit_urlpath 廃止
admin_order_mail_urlpath 廃止
admin_order_urlpath 廃止
admin_products_urlpath 廃止
admin_system_urlpath 廃止
amount_len 廃止
api_enable_flag 廃止
birth_month_point 廃止
birth_year 廃止
bloc_dir 廃止
cart_url 廃止
category_head 廃止
category_max 廃止
cert_string 廃止
char_code 廃止
close_day 廃止
compile_admin_realdir 廃止
compile_realdir 廃止
cookie_expire 廃止
credit_add_year 廃止
credit_no_len 廃止
csv_line_max 廃止
customer_confirm_mail 廃止
customer_log_realfile 廃止
cv_payment_limit 廃止
db_log_realfile 廃止
debug_log_realfile 廃止
debug_mode 廃止
default_product_disp 廃止
default_product_down 廃止
default_template_name 廃止
deliv_free_amount 廃止
deliv_urlpath 廃止
delivfee_max 廃止
delivtime_max 廃止
device_type_mobile 廃止
disabled_rgb 廃止
down_save_realdir 廃止
down_size 廃止
down_temp_realdir 廃止
download_block 廃止
download_days_len 廃止
download_extension 廃止
downloads_temp_plugin_install_dir 廃止
downloads_temp_plugin_update_dir 廃止
eccube_info 廃止
entry_limit_hour 廃止
entry_url 廃止
err_color 廃止
error_log_realfile 廃止
favorite_error 廃止
file_name_len 廃止
file_size 廃止
forgot_mail 廃止
form_country_enable 廃止
graph_label_max 廃止
graph_pie_max 廃止
graph_realdir 廃止
graph_urlpath 廃止
hook_point_preprocess 廃止
hook_point_process 廃止
http_request_timeout 廃止
image_rename 廃止
image_save_rss_url 廃止
image_size 廃止
image_temp_rss_url 廃止
input_deliv_fee 廃止
input_zip_urlpath 廃止
large_image_height 廃止
large_image_width 廃止
large_subimage_height 廃止
large_subimage_width 廃止
log_realfile 廃止
login_frame 廃止
login_retry_interval 廃止
main_frame 廃止
master_data_realdir 廃止
max_lifetime 廃止
max_log_quantity 廃止
max_log_size 廃止
member_pmax 廃止
mobile_cart_urlpath 廃止
mobile_compile_realdir 廃止
mobile_default_template_name 廃止
mobile_image_realdir 廃止
mobile_image_urlpath 廃止
mobile_p_detail_urlpath 廃止
mobile_session_lifetime 廃止
mobile_shopping_complete_urlpath 廃止
mobile_shopping_confirm_urlpath 廃止
mobile_shopping_payment_urlpath 廃止
mobile_template_name 廃止
mobile_template_realdir 廃止
mobile_top_urlpath 廃止
module_dir 廃止
module_realdir 廃止
multiple_urlpath 廃止
mypage_delivaddr_urlpath 廃止
mypage_order_status_disp_flag 廃止
navi_pmax 廃止
no_image_realfile 廃止
normal_image_height 廃止
normal_image_width 廃止
normal_subimage_height 廃止
normal_subimage_width 廃止
nostock_hidden 廃止
option_class_regist 廃止
option_deliv_fee 廃止
option_favorite_product 廃止
option_product_deliv_fee 廃止
option_recommend 廃止
order_status_max 廃止
ostore_log_realfile 廃止
ostore_sslurl 廃止
ostore_url 廃止
p_detail_urlpath 廃止
page_display_time_log_min_exec_time 廃止
page_display_time_log_mode 廃止
password_max_len 廃止
password_min_len 廃止
pear_db_debug 廃止
pear_db_persistent 廃止
pending_order_cancel_flag 廃止
pending_order_cancel_time 廃止
percentage_len 廃止
plugin_activate_flag 廃止
plugin_dir 廃止
plugin_extension 廃止
plugin_log_realfile 廃止
plugin_upload_realdir 廃止
point_rule 廃止
point_value 廃止
product_type_download 廃止
product_type_normal 廃止
products_total_max 廃止
productsub_max 廃止
recommend_num 廃止
recommend_product_max 廃止
release_year 廃止
review_allow_url 廃止
review_regist_max 廃止
rfc_compliant_email_check 廃止
search_category_len 廃止
select_rgb 廃止
sepa_catnavi 廃止
session_keep_method 廃止
session_lifetime 廃止
shopping_complete_urlpath 廃止
shopping_confirm_urlpath 廃止
shopping_module_urlpath 廃止
shopping_payment_urlpath 廃止
shopping_url 廃止
site_frame 廃止
small_image_height 廃止
small_image_width 廃止
smartphone_compile_realdir 廃止
smartphone_default_template_name 廃止
smartphone_template_name 廃止
smartphone_template_realdir 廃止
smarty_force_compile_mode 廃止
smarty_templates_realdir 廃止
sql_query_log_min_exec_time 廃止
sql_query_log_mode 廃止
start_birth_year 廃止
tel_len 廃止
tel_len_min 廃止
tel_item_len 廃止
template_admin_realdir 廃止
template_name 廃止
template_realdir 廃止
template_size 廃止
top_url 廃止
transaction_id_name 廃止
update_http 廃止
update_send_site_info 廃止
use_mobile 廃止
use_multiple_shipping 廃止
use_normalize_hostname 廃止
use_point 廃止
use_verbose_log 廃止
user_def_php_realfile 廃止
user_dir 廃止
user_package_dir 廃止
user_realdir 廃止
user_template_realdir 廃止
user_url 廃止
zip_download_url 廃止
zip01_len 廃止
zip02_len 廃止
enabled 廃止
disabled 廃止

path.yml

その他

bundle の設定に移行する

別の実装を検討する

課題

相談(Discussion)

Symfony マスターな方、つっこみなどありましたらよろしくお願いします 🙏

ttsuru commented 6 years ago

Symfony も Flex なのか以前からのBundleシステムなのかによってすこしベストプラクティスが異なるように思います。 https://symfony.com/doc/current/setup/flex.html Sylius はFlexではないですね。

Symfony3.4 以降かつFlexをターゲットとすると、設定も config/packages/ 以下にパッケージ(Bundle)ごとに設定を行うようになってます。 config自体もConfigurationInterfaceを利用してvalidationしていますね。 https://symfony.com/doc/current/components/config/definition.html

nanasess commented 6 years ago

@ttsuru Bundle を使うのであれば、ConfigurationInterfaceを 使用して Bundle ごとに設定すればいいと思うんですが、EC-CUBE 3.0 で $app['config'] から取得していたような設定をどうするか悩んでいます。 上記 変更内容 のようなかたちになるのかなぁと。

ttsuru commented 6 years ago

@nanasess config自体のベストプラクティスは以下のような感じですね。 https://symfony.com/doc/current/bundles/configuration.html

設定も必要な内容をそれぞれconstructorにinjectしていくスタイルですかね。。。

nanasess commented 6 years ago

constant.yml の内容をクラス定数にしようと進めていましたが、やはり設定変更の柔軟性が欲しいということで、 parameters を使用するよう説明を変更しました。

tao-s commented 6 years ago

すいません、Symfonyに移行は確定ですか?

Yangsin commented 6 years ago

3.nでこれまで進めてきた内容が一通りいけるようであれば移行する前提で検証中です。