Issues (145)

config/shop.php (2 issues)

1
<?php
2
3
return [
4
5
	'apc_enabled' => false, // enable for maximum performance if APCu is available
6
	'apc_prefix' => 'laravel:', // prefix for caching config and translation in APCu
7
	'num_formatter' => 'Locale', // locale based number formatter (alternative: "Standard")
8
	'pcntl_max' => 4, // maximum number of parallel command line processes when starting jobs
9
	'version' => env( 'APP_VERSION', 1 ), // shop CSS/JS file version
10
	'roles' => ['admin', 'editor'], // user groups allowed to access the admin backend
11
	'panel' => 'dashboard', // panel shown in admin backend after login
12
13
	'routes' => [
14
		// Docs: https://aimeos.org/docs/latest/laravel/extend/#custom-routes
15
		// Multi-sites: https://aimeos.org/docs/latest/laravel/customize/#multiple-shops
16
		// 'admin' => ['prefix' => 'admin', 'middleware' => ['web']],
17
		// 'jqadm' => ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth']],
18
		// 'graphql' => ['prefix' => 'admin/{site}/graphql', 'middleware' => ['web', 'auth']],
19
		// 'jsonadm' => ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth']],
20
		// 'jsonapi' => ['prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
21
		// 'account' => ['prefix' => 'profile', 'middleware' => ['web', 'auth']],
22
		// 'default' => ['prefix' => 'shop', 'middleware' => ['web']],
23
		// 'basket' => ['prefix' => 'shop', 'middleware' => ['web']],
24
		// 'checkout' => ['prefix' => 'shop', 'middleware' => ['web']],
25
		// 'confirm' => ['prefix' => 'shop', 'middleware' => ['web']],
26
		// 'supplier' => ['prefix' => 's', 'middleware' => ['web']],
27
		// 'page' => ['prefix' => 'p', 'middleware' => ['web']],
28
		// 'home' => ['middleware' => ['web']],
29
		// 'update' => [],
30
	],
31
32
	'page' => [
33
		'account-index' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'account/profile', 'account/review', 'account/subscription', 'account/basket', 'account/history', 'account/favorite', 'account/watch', 'catalog/session'],
34
		'basket-index' => ['locale/select', 'catalog/tree', 'catalog/search', 'basket/standard', 'basket/bulk', 'basket/related'],
35
		'catalog-count' => ['catalog/count'],
36
		'catalog-detail' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/stage', 'catalog/detail', 'catalog/session'],
37
		'catalog-home' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/home'],
38
		'catalog-list' => ['locale/select', 'basket/mini', 'catalog/filter', 'catalog/tree', 'catalog/search', 'catalog/price', 'catalog/supplier', 'catalog/attribute', 'catalog/session', 'catalog/stage', 'catalog/lists'],
39
		'catalog-session' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'catalog/session'],
40
		'catalog-stock' => ['catalog/stock'],
41
		'catalog-suggest' => ['catalog/suggest'],
42
		'catalog-tree' => ['locale/select', 'basket/mini', 'catalog/filter', 'catalog/tree', 'catalog/search', 'catalog/price', 'catalog/supplier', 'catalog/attribute', 'catalog/session', 'catalog/stage', 'catalog/lists'],
43
		'checkout-confirm' => ['catalog/tree', 'catalog/search', 'checkout/confirm'],
44
		'checkout-index' => ['locale/select', 'catalog/tree', 'catalog/search', 'checkout/standard'],
45
		'checkout-update' => ['checkout/update'],
46
		'supplier-detail' => ['locale/select', 'basket/mini', 'catalog/tree', 'catalog/search', 'supplier/detail', 'catalog/lists'],
47
		'cms' => ['cms/page', 'catalog/tree', 'basket/mini'],
48
	],
49
50
	'resource' => [
51
		'db' => [
52
			'adapter' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.driver', 'mysql' ),
0 ignored issues
show
'database.default' of type string is incompatible with the type array expected by parameter $options of config(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

52
			'adapter' => config( 'database.connections.' . config( /** @scrutinizer ignore-type */ 'database.default', 'mysql' ) . '.driver', 'mysql' ),
Loading history...
The call to config() has too many arguments starting with 'mysql'. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

52
			'adapter' => config( 'database.connections.' . /** @scrutinizer ignore-call */ config( 'database.default', 'mysql' ) . '.driver', 'mysql' ),

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
53
			'host' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.host', '127.0.0.1' ),
54
			'port' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.port', '3306' ),
55
			'socket' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.unix_socket', '' ),
56
			'database' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.database', 'forge' ),
57
			'username' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.username', 'forge' ),
58
			'password' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.password', '' ),
59
			'stmt' => config( 'database.default', 'mysql' ) === 'mysql' ? ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8mb4'; SET SESSION sql_mode='ANSI'"] : [],
60
			'limit' => 3, // maximum number of concurrent database connections
61
			'defaultTableOptions' => [
62
				'charset' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.charset' ),
63
				'collate' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.collation' ),
64
			],
65
			'driverOptions' => config( 'database.connections.' . config( 'database.default', 'mysql' ) . '.options' ),
66
		],
67
		'fs' => [
68
			'adapter' => 'Standard',
69
			'tempdir' => storage_path( 'tmp' ),
70
			'basedir' => public_path(),
71
			'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/'),
72
		],
73
		'fs-media' => [
74
			'adapter' => 'Standard',
75
			'tempdir' => storage_path( 'tmp' ),
76
			'basedir' => public_path( 'aimeos' ),
77
			'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/aimeos',
78
		],
79
		'fs-mimeicon' => [
80
			'adapter' => 'Standard',
81
			'tempdir' => storage_path( 'tmp' ),
82
			'basedir' => public_path( 'vendor/shop/mimeicons' ),
83
			'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/mimeicons',
84
		],
85
		'fs-theme' => [
86
			'adapter' => 'Standard',
87
			'tempdir' => storage_path( 'tmp' ),
88
			'basedir' => public_path( 'vendor/shop/themes' ),
89
			'baseurl' => rtrim(env('ASSET_URL', PHP_SAPI == 'cli' ? env('APP_URL') : ''), '/') . '/vendor/shop/themes',
90
		],
91
		'fs-admin' => [
92
			'adapter' => 'Standard',
93
			'tempdir' => storage_path( 'tmp' ),
94
			'basedir' => storage_path( 'admin' ),
95
		],
96
		'fs-export' => [
97
			'adapter' => 'Standard',
98
			'tempdir' => storage_path( 'tmp' ),
99
			'basedir' => storage_path( 'export' ),
100
		],
101
		'fs-import' => [
102
			'adapter' => 'Standard',
103
			'tempdir' => storage_path( 'tmp' ),
104
			'basedir' => storage_path( 'import' ),
105
		],
106
		'fs-secure' => [
107
			'adapter' => 'Standard',
108
			'tempdir' => storage_path( 'tmp' ),
109
			'basedir' => storage_path( 'secure' ),
110
		],
111
		'mq' => [
112
			'adapter' => 'Standard',
113
			'db' => 'db',
114
		],
115
		'email' => [
116
			'from-email' => config( 'mail.from.address' ),
117
			'from-name' => config( 'mail.from.name' ),
118
		],
119
	],
120
121
	'admin' => [],
122
123
	'client' => [
124
		'html' => [
125
			'basket' => [
126
				'cache' => [
127
					// 'enable' => false, // Disable basket content caching for development
128
				],
129
			],
130
			'common' => [
131
				'cache' => [
132
					// 'force' => true // enforce caching for logged in users
133
				],
134
			],
135
			'catalog' => [
136
				'lists' => [
137
					'basket-add' => true, // shows add to basket in list views
138
					// 'infinite-scroll' => true, // load more products in list view
139
					// 'size' => 48, // number of products per page
140
				],
141
				'selection' => [
142
					'type' => [// how variant attributes are displayed
143
						'color' => 'radio',
144
						'length' => 'radio',
145
						'width' => 'radio',
146
					],
147
				],
148
			],
149
		],
150
	],
151
152
	'controller' => [
153
		'frontend' => [
154
			'catalog' => [
155
				'levels-always' => 3 // number of category levels for mega menu
156
			]
157
		]
158
	],
159
160
	'i18n' => [
161
	],
162
163
	'madmin' => [
164
		'cache' => [
165
			'manager' => [
166
				// 'name' => 'None', // Disable caching for development
167
			],
168
		],
169
		'log' => [
170
			'manager' => [
171
				// 'loglevel' => 7, // Enable debug logging into madmin_log table
172
			],
173
		],
174
	],
175
176
	'mshop' => [
177
		'locale' => [
178
			// 'site' => '<custom site code>', // used instead of "default"
179
		]
180
	],
181
182
183
	'command' => [
184
	],
185
186
	'frontend' => [
187
	],
188
189
	'backend' => [
190
	],
191
192
];
193