Skip to content

Commit f91188d

Browse files
committed
Add version 2.2.0
1 parent 82c4e8a commit f91188d

File tree

42,816 files changed

+1166219
-559248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42,816 files changed

+1166219
-559248
lines changed

.htaccess

Lines changed: 204 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,207 @@
1-
# All explanations you could find in .htaccess.sample file
2-
DirectoryIndex index.php
1+
############################################
2+
## overrides deployment configuration mode value
3+
## use command bin/magento deploy:mode:set to switch modes
4+
5+
# SetEnv MAGE_MODE developer
6+
7+
############################################
8+
## uncomment these lines for CGI mode
9+
## make sure to specify the correct cgi php binary file name
10+
## it might be /cgi-bin/php-cgi
11+
12+
# Action php5-cgi /cgi-bin/php5-cgi
13+
# AddHandler php5-cgi .php
14+
15+
############################################
16+
## GoDaddy specific options
17+
18+
# Options -MultiViews
19+
20+
## you might also need to add this line to php.ini
21+
## cgi.fix_pathinfo = 1
22+
## if it still doesn't work, rename php.ini to php5.ini
23+
24+
############################################
25+
## this line is specific for 1and1 hosting
26+
27+
#AddType x-mapp-php5 .php
28+
#AddHandler x-mapp-php5 .php
29+
30+
############################################
31+
## default index file
32+
33+
DirectoryIndex index.php
34+
335
<IfModule mod_php5.c>
36+
############################################
37+
## adjust memory limit
38+
439
php_value memory_limit 768M
540
php_value max_execution_time 18000
41+
42+
############################################
43+
## disable automatic session start
44+
## before autoload was initialized
45+
646
php_flag session.auto_start off
47+
48+
############################################
49+
## enable resulting html compression
50+
51+
#php_flag zlib.output_compression on
52+
53+
###########################################
54+
## disable user agent verification to not break multiple image upload
55+
756
php_flag suhosin.session.cryptua off
857
</IfModule>
958
<IfModule mod_php7.c>
59+
############################################
60+
## adjust memory limit
61+
1062
php_value memory_limit 768M
1163
php_value max_execution_time 18000
64+
65+
############################################
66+
## disable automatic session start
67+
## before autoload was initialized
68+
1269
php_flag session.auto_start off
70+
71+
############################################
72+
## enable resulting html compression
73+
74+
#php_flag zlib.output_compression on
75+
76+
###########################################
77+
## disable user agent verification to not break multiple image upload
78+
1379
php_flag suhosin.session.cryptua off
1480
</IfModule>
1581
<IfModule mod_security.c>
82+
###########################################
83+
## disable POST processing to not break multiple image upload
84+
1685
SecFilterEngine Off
1786
SecFilterScanPOST Off
1887
</IfModule>
88+
89+
<IfModule mod_deflate.c>
90+
91+
############################################
92+
## enable apache served files compression
93+
## http://developer.yahoo.com/performance/rules.html#gzip
94+
95+
# Insert filter on all content
96+
###SetOutputFilter DEFLATE
97+
# Insert filter on selected content types only
98+
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript application/json image/svg+xml
99+
100+
# Netscape 4.x has some problems...
101+
#BrowserMatch ^Mozilla/4 gzip-only-text/html
102+
103+
# Netscape 4.06-4.08 have some more problems
104+
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
105+
106+
# MSIE masquerades as Netscape, but it is fine
107+
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
108+
109+
# Don't compress images
110+
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
111+
112+
# Make sure proxies don't deliver the wrong content
113+
#Header append Vary User-Agent env=!dont-vary
114+
115+
</IfModule>
116+
19117
<IfModule mod_ssl.c>
118+
119+
############################################
120+
## make HTTPS env vars available for CGI mode
121+
20122
SSLOptions StdEnvVars
123+
21124
</IfModule>
125+
126+
############################################
127+
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
128+
## Please, set it on virtual host configuration level
129+
130+
## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
131+
############################################
132+
22133
<IfModule mod_rewrite.c>
134+
135+
############################################
136+
## enable rewrites
137+
23138
Options +FollowSymLinks
24139
RewriteEngine on
140+
141+
############################################
142+
## you can put here your magento root folder
143+
## path relative to web root
144+
145+
#RewriteBase /magento/
146+
147+
############################################
148+
## workaround for HTTP authorization
149+
## in CGI environment
150+
25151
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
152+
153+
############################################
154+
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
155+
26156
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
27157
RewriteRule .* - [L,R=405]
158+
159+
############################################
160+
## redirect for mobile user agents
161+
162+
#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
163+
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
164+
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
165+
166+
############################################
167+
## never rewrite for existing files, directories and links
168+
28169
RewriteCond %{REQUEST_FILENAME} !-f
29170
RewriteCond %{REQUEST_FILENAME} !-d
30171
RewriteCond %{REQUEST_FILENAME} !-l
172+
173+
############################################
174+
## rewrite everything else to index.php
175+
31176
RewriteRule .* index.php [L]
177+
32178
</IfModule>
179+
180+
181+
############################################
182+
## Prevent character encoding issues from server overrides
183+
## If you still have problems, use the second line instead
184+
33185
AddDefaultCharset Off
186+
#AddDefaultCharset UTF-8
34187
AddType 'text/html; charset=UTF-8' html
188+
35189
<IfModule mod_expires.c>
190+
191+
############################################
192+
## Add default Expires header
193+
## http://developer.yahoo.com/performance/rules.html#expires
194+
36195
ExpiresDefault "access plus 1 year"
37196
ExpiresByType text/html A0
38197
ExpiresByType text/plain A0
198+
39199
</IfModule>
200+
201+
###########################################
202+
## Deny access to root files to hide sensitive application information
40203
RedirectMatch 403 /\.git
204+
41205
<Files composer.json>
42206
order allow,deny
43207
deny from all
@@ -58,7 +222,7 @@ DirectoryIndex index.php
58222
order allow,deny
59223
deny from all
60224
</Files>
61-
<Files .php_cs>
225+
<Files .php_cs.dist>
62226
order allow,deny
63227
deny from all
64228
</Files>
@@ -110,11 +274,48 @@ DirectoryIndex index.php
110274
order allow,deny
111275
deny from all
112276
</Files>
277+
278+
# For 404s and 403s that aren't handled by the application, show plain 404 response
113279
ErrorDocument 404 /pub/errors/404.php
114280
ErrorDocument 403 /pub/errors/404.php
281+
282+
################################
283+
## If running in cluster environment, uncomment this
284+
## http://developer.yahoo.com/performance/rules.html#etags
285+
286+
#FileETag none
287+
288+
# ######################################################################
289+
# # INTERNET EXPLORER #
290+
# ######################################################################
291+
292+
# ----------------------------------------------------------------------
293+
# | Document modes |
294+
# ----------------------------------------------------------------------
295+
296+
# Force Internet Explorer 8/9/10 to render pages in the highest mode
297+
# available in the various cases when it may not.
298+
#
299+
# https://hsivonen.fi/doctype/#ie8
300+
#
301+
# (!) Starting with Internet Explorer 11, document modes are deprecated.
302+
# If your business still relies on older web apps and services that were
303+
# designed for older versions of Internet Explorer, you might want to
304+
# consider enabling `Enterprise Mode` throughout your company.
305+
#
306+
# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
307+
# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx
308+
115309
<IfModule mod_headers.c>
310+
116311
Header set X-UA-Compatible "IE=edge"
312+
313+
# `mod_headers` cannot match based on the content-type, however,
314+
# the `X-UA-Compatible` response header should be send only for
315+
# HTML documents and not for the other resources.
316+
117317
<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
118318
Header unset X-UA-Compatible
119319
</FilesMatch>
320+
120321
</IfModule>

.htaccess.sample

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
############################################
3131
## default index file
3232

33-
DirectoryIndex index.php
33+
DirectoryIndex index.php
3434

35-
<IfModule mod_php5.c>
3635
############################################
3736
## adjust memory limit
3837

@@ -54,30 +53,7 @@ DirectoryIndex index.php
5453
## disable user agent verification to not break multiple image upload
5554

5655
php_flag suhosin.session.cryptua off
57-
</IfModule>
58-
<IfModule mod_php7.c>
59-
############################################
60-
## adjust memory limit
61-
62-
php_value memory_limit 768M
63-
php_value max_execution_time 18000
64-
65-
############################################
66-
## disable automatic session start
67-
## before autoload was initialized
68-
69-
php_flag session.auto_start off
70-
71-
############################################
72-
## enable resulting html compression
73-
74-
#php_flag zlib.output_compression on
7556

76-
###########################################
77-
## disable user agent verification to not break multiple image upload
78-
79-
php_flag suhosin.session.cryptua off
80-
</IfModule>
8157
<IfModule mod_security.c>
8258
###########################################
8359
## disable POST processing to not break multiple image upload
@@ -222,7 +198,7 @@ DirectoryIndex index.php
222198
order allow,deny
223199
deny from all
224200
</Files>
225-
<Files .php_cs>
201+
<Files .php_cs.dist>
226202
order allow,deny
227203
deny from all
228204
</Files>

.php_cs.dist

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
/**
8+
* Pre-commit hook installation:
9+
* vendor/bin/static-review.php hook:install dev/tools/Magento/Tools/StaticReview/pre-commit .git/hooks/pre-commit
10+
*/
11+
$finder = PhpCsFixer\Finder::create()
12+
->name('*.phtml')
13+
->exclude('dev/tests/functional/generated')
14+
->exclude('dev/tests/functional/var')
15+
->exclude('dev/tests/functional/vendor')
16+
->exclude('dev/tests/integration/tmp')
17+
->exclude('dev/tests/integration/var')
18+
->exclude('lib/internal/Cm')
19+
->exclude('lib/internal/Credis')
20+
->exclude('lib/internal/Less')
21+
->exclude('lib/internal/LinLibertineFont')
22+
->exclude('pub/media')
23+
->exclude('pub/static')
24+
->exclude('setup/vendor')
25+
->exclude('var');
26+
27+
return PhpCsFixer\Config::create()
28+
->setFinder($finder)
29+
->setRules([
30+
'@PSR2' => true,
31+
'array_syntax' => ['syntax' => 'short'],
32+
'concat_space' => ['spacing' => 'one'],
33+
'include' => true,
34+
'new_with_braces' => true,
35+
'no_empty_statement' => true,
36+
'no_extra_consecutive_blank_lines' => true,
37+
'no_leading_import_slash' => true,
38+
'no_leading_namespace_whitespace' => true,
39+
'no_multiline_whitespace_around_double_arrow' => true,
40+
'no_multiline_whitespace_before_semicolons' => true,
41+
'no_singleline_whitespace_before_semicolons' => true,
42+
'no_trailing_comma_in_singleline_array' => true,
43+
'no_unused_imports' => true,
44+
'no_whitespace_in_blank_line' => true,
45+
'object_operator_without_whitespace' => true,
46+
'ordered_imports' => true,
47+
'standardize_not_equals' => true,
48+
'ternary_operator_spaces' => true,
49+
]);

0 commit comments

Comments
 (0)