zapashcanon 1 year ago
parent
commit
9edfd78e06
Signed by: zapashcanon <leo@ndrs.fr> GPG Key ID: 8981C3C62D1D28F1

+ 2
- 0
.gitignore View File

@@ -41,3 +41,5 @@
41 41
 # Composer
42 42
 /www/composer.phar
43 43
 /www/composer.lock
44
+
45
+**/.web-server-pid

+ 0
- 5
.styleci.yml View File

@@ -1,5 +0,0 @@
1
-preset: symfony
2
-
3
-risky: false
4
-
5
-linting: true

+ 0
- 30
.travis.yml View File

@@ -1,30 +0,0 @@
1
----
2
-
3
-language: php
4
-
5
-php:
6
-  - '5.5'
7
-  - '5.6'
8
-  - '7.0'
9
-  - nightly
10
-
11
-dist: trusty
12
-sudo: required
13
-
14
-services:
15
-  - postgresql
16
-
17
-before_script:
18
-  - psql -c "CREATE USER root WITH PASSWORD 'null';" -U postgres
19
-  - psql -c "CREATE DATABASE ndrs OWNER root;" -U postgres
20
-  - cd ./www/
21
-  - composer update
22
-  - php bin/console doctrine:schema:update --force
23
-  - php bin/console server:start
24
-
25
-script:
26
-  - phpunit
27
-  - ./vendor/bin/security-checker security:check
28
-
29
-notifications:
30
-  email: false

+ 0
- 24
LICENSE View File

@@ -1,24 +0,0 @@
1
-This is free and unencumbered software released into the public domain.
2
-
3
-Anyone is free to copy, modify, publish, use, compile, sell, or
4
-distribute this software, either in source code form or as a compiled
5
-binary, for any purpose, commercial or non-commercial, and by any
6
-means.
7
-
8
-In jurisdictions that recognize copyright laws, the author or authors
9
-of this software dedicate any and all copyright interest in the
10
-software to the public domain. We make this dedication for the benefit
11
-of the public at large and to the detriment of our heirs and
12
-successors. We intend this dedication to be an overt act of
13
-relinquishment in perpetuity of all present and future rights to this
14
-software under copyright law.
15
-
16
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
-OTHER DEALINGS IN THE SOFTWARE.
23
-
24
-For more information, please refer to <http://unlicense.org>

+ 16
- 0
LICENSE.md View File

@@ -0,0 +1,16 @@
1
+The ISC License (ISC)
2
+=====================
3
+
4
+Copyright (c) 2017, Léo Andrès
5
+
6
+Permission to use, copy, modify, and/or distribute this software for any
7
+purpose with or without fee is hereby granted, provided that the above
8
+copyright notice and this permission notice appear in all copies.
9
+
10
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ 58
- 77
README.md View File

@@ -1,101 +1,82 @@
1
-Source code of www.ndrs.fr
2
-====
1
+# zapashcanon.fr
3 2
 
4
-[![Website](https://img.shields.io/website-up-down-green-red/http/www.ndrs.fr.svg?maxAge=2592000)](http://www.ndrs.fr) [![StyleCI](https://styleci.io/repos/51435742/shield)](http://styleci.io/repos/51435742/)
5
-[![Build Status](https://travis-ci.org/zapashcanon/ndrs.svg?branch=master)](https://travis-ci.org/zapashcanon/ndrs)
6
-[![license](https://img.shields.io/github/license/zapashcanon/ndrs.svg?maxAge=100)](http://unlicense.org/)
3
+Source code of my personal website, [www.zapashcanon.fr], it's written in [PHP] and based on the [Symfony] framework.
7 4
 
5
+## Dependencies
8 6
 
9
-## Récupérer le code source
7
+You need [PHP], [PostgreSQL], the [PostgreSQL module for PHP], the [DOM module for PHP] and [composer]. On a Debian system, you can do:
10 8
 
11
-### Installation de git
9
+```sh
10
+sudo apt install php postgresql php-pgsql php-xml composer
11
+```
12 12
 
13
-Pour récupérer le code et pouvoir contribuer au projet, il faut installer git.
13
+## Set-up the website
14 14
 
15
-#### Sous Debian et distributions dérivées (Ubuntu, Mint, etc.)
15
+Here, we use [PostgreSQL], you can use another DBMS, but you'll have to add the corresponding PHP module and to modify the files `www/app/config/parameters.yml` and `www/app/config/config.yml`.
16 16
 
17
-    # apt-get install git
17
+### Configuring PostgreSQL
18 18
 
19
-### Cloner le projet avec git
19
+You need to choose a username `mypguser`, a password `mypguserpass` and a database name `mypgdatabase`.
20 20
 
21
-    $ git clone https://github.com/zapashcanon/ndrs.git
21
+```sh
22
+# log as the postgres user
23
+sudo su postgres
24
+# launch the psql prompt
25
+psql
26
+# create a user `mypguser` with password `mypguserpass`
27
+CREATE USER mypguser WITH PASSWORD 'mypguserpass';
28
+# create a database `mypgdatabase` with `mypguser` as owner
29
+CREATE DATABASE mypgdatabase OWNER mypguser;
30
+```
22 31
 
23
-## Installer les dépendances
32
+Then, you'll have to put the values of `mypguser`, `mypguserpass` and `mypgdatabase` in the file `www/app/config/parameters.yml`:
24 33
 
25
-### Installation de PHP
34
+```yml
35
+psql_database_name: mypgdatabase
36
+psql_database_user: mypguser
37
+psql_database_password: mypguserpass
38
+```
26 39
 
27
-Il est nécessaire d'installer PHP.
40
+### Installing dependencies with composer
28 41
 
29
-#### Sous Debian et distributions dérivées (Ubuntu, Mint, etc.)
42
+From the root of the projet:
30 43
 
31
-    # apt-get install php
44
+```sh
45
+cd www
46
+composer install
47
+```
32 48
 
33
-### Installation de PostgreSQL
49
+### Updating the database schemas
34 50
 
35
-PostgreSQL est nécessaire, cependant, il est possible d'utiliser n'importe quel autre SGBD, il faudra alors modifier les fichiers suivants:
51
+From the root of the projet:
36 52
 
37
-    www/app/config/parameters.yml
38
-    www/app/config/config.yml
53
+```sh
54
+cd www
55
+php bin/console doctrine:schema:update --force
56
+```
39 57
 
40
-Le module PHP associé est aussi nécessaire.
58
+## Testing with the built-in server
41 59
 
42
-#### Sous Debian et distributions dérivées (Ubuntu, Mint, etc.)
60
+From the root of the projet:
43 61
 
44
-    # apt-get install postgresql php-pgsql
62
+```sh
63
+cd www
64
+php bin/console server:start
65
+```
45 66
 
46
-### Configuration minimale de PostgreSQL
67
+The website will be accessible at the local address given in the output.
47 68
 
48
-Il faut au minimum créer un utilisateur, un mot de passe associé ainsi qu'une base de données, ils seront désignés respectivement par mypguser, mypguserpass et mypgdatabase.
69
+To stop the server, from the root of the projet:
49 70
 
50
-#### Sous Debian et distributions dérivées (Ubuntu, Mint, etc.)
71
+```sh
72
+cd www
73
+php bin/console server:stop
74
+```
51 75
 
52
-    # su postgres
53
-    $ psql
54
-    postgres=# CREATE USER mypguser WITH PASSWORD 'mypguserpass';
55
-    postgres=# CREATE DATABASE mypgdatabase OWNER mypguser;
56
-
57
-Il faut alors ensuite reporter les valeurs de mypguser, mypguserpass et mypgdatabase dans le fichier:
58
-
59
-    www/app/config/parameters.yml
60
-
61
-En les plaçant ainsi:
62
-
63
-    psql_database_name: mypgdatabase
64
-    psql_database_user: mypguser
65
-    psql_database_password: mypguserpass
66
-
67
-### Installation de composer
68
-
69
-Pour installer les dépendances du projet, il faut installer composer.
70
-
71
-#### Sous Debian et distributions dérivées (Ubuntu, Mint, etc.)
72
-
73
-    # apt-get install composer
74
-
75
-### Installer les dépendances avec composer
76
-
77
-Il faut se placer dans le répertoire du projet.
78
-
79
-    $ cd ndrs/www/
80
-    $ composer install
81
-
82
-## Mettre à jour les schémas de la base de données
83
-
84
-    $ cd ndrs/www/
85
-    $ php bin/console doctrine:schema:update --force
86
-
87
-## Gestion du serveur web
88
-
89
-### Démarrage
90
-
91
-Il est possible d'utiliser le serveur web intégré à PHP pour faciliter les tests, le développement ou les démonstrations.
92
-
93
-    $ cd ndrs/www/
94
-    $ php bin/console server:start
95
-
96
-Le site sera alors accessible à l'adresse locale indiquée en sortie.
97
-
98
-### Arrêt
99
-
100
-    $ cd ndrs/www/
101
-    $ php bin/console server:stop
76
+[composer]: https://getcomposer.org/
77
+[DOM module for PHP]: https://secure.php.net/manual/fr/book.dom.php
78
+[PHP]: https://secure.php.net/
79
+[PostgreSQL]: https://www.postgresql.org/
80
+[PostgreSQL module for PHP]: https://secure.php.net/manual/fr/book.pgsql.php
81
+[Symfony]: https://symfony.com/
82
+[www.zapashcanon.fr]: http://zapashcanon.fr

+ 12
- 0
scripts/install.sh View File

@@ -0,0 +1,12 @@
1
+#!/bin/sh
2
+
3
+set -eu
4
+
5
+( cd "$(dirname "$0")/../"
6
+
7
+  sudo cp www.zapashcanon.fr.conf /etc/apache2/sites-available/www.zapashcanon.fr.conf
8
+  sudo mkdir -p /var/www/zapashcanon.fr/
9
+  sudo cp -r ./www/ /var/www/zapashcanon.fr/
10
+
11
+  echo "Installed, don't forget to restart apache using: systemctl reload apache2"
12
+)

+ 16
- 0
www.zapashcanon.fr.conf View File

@@ -0,0 +1,16 @@
1
+<VirtualHost *:80>
2
+
3
+	ServerName www.zapashcanon.fr
4
+	ServerAdmin leo@ndrs.fr
5
+	ServerAlias zapashcanon.fr
6
+
7
+	DocumentRoot "/var/www/zapashcanon.fr/www/web"
8
+	<Directory /var/www/zapashcanon.fr/www/web>
9
+		AllowOverride All
10
+		Order Allow,Deny
11
+		Allow from All
12
+	</Directory>
13
+
14
+	ErrorLog /var/log/apache2/zapashcanon.fr_error.log
15
+	CustomLog /var/log/apache2/zapashcanon.fr_access.log combined
16
+</VirtualHost>

+ 1
- 0
www/app/AppKernel.php View File

@@ -25,6 +25,7 @@ class AppKernel extends Kernel
25 25
             $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
26 26
             $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
27 27
             $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
28
+            $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
28 29
         }
29 30
 
30 31
         return $bundles;

+ 0
- 1
www/app/config/config.yml View File

@@ -24,7 +24,6 @@ framework:
24 24
         #assets_version: SomeVersionScheme
25 25
     default_locale:  "%locale%"
26 26
     trusted_hosts:   ~
27
-    trusted_proxies: ~
28 27
     session:
29 28
         # handler_id set to null will use default session handler from php.ini
30 29
         handler_id:  ~

+ 2
- 2
www/app/config/config_dev.yml View File

@@ -17,11 +17,11 @@ monolog:
17 17
             type: stream
18 18
             path: "%kernel.logs_dir%/%kernel.environment%.log"
19 19
             level: debug
20
-            channels: [!event]
20
+            channels: ["!event"]
21 21
         console:
22 22
             type:   console
23 23
             bubble: false
24
-            channels: [!event, !doctrine]
24
+            channels: ["!event", "!doctrine"]
25 25
         # uncomment to get logging in your browser
26 26
         # you may have to allow bigger header sizes in your Web server configuration
27 27
         #firephp:

+ 1
- 0
www/app/config/security.yml View File

@@ -30,6 +30,7 @@ security:
30 30
                 csrf_token_generator: security.csrf.token_manager
31 31
             logout:       true
32 32
             anonymous:    true
33
+            logout_on_user_change:  true
33 34
 
34 35
     encoders:
35 36
         FOS\UserBundle\Model\UserInterface: bcrypt

+ 9
- 6
www/bin/symfony_requirements View File

@@ -13,7 +13,7 @@ echo '> PHP is using the following php.ini file:'.PHP_EOL;
13 13
 if ($iniPath) {
14 14
     echo_style('green', '  '.$iniPath);
15 15
 } else {
16
-    echo_style('warning', '  WARNING: No configuration file (php.ini) used by PHP!');
16
+    echo_style('yellow', '  WARNING: No configuration file (php.ini) used by PHP!');
17 17
 }
18 18
 
19 19
 echo PHP_EOL.PHP_EOL;
@@ -22,7 +22,6 @@ echo '> Checking Symfony requirements:'.PHP_EOL.'  ';
22 22
 
23 23
 $messages = array();
24 24
 foreach ($symfonyRequirements->getRequirements() as $req) {
25
-    /** @var $req Requirement */
26 25
     if ($helpText = get_error_message($req, $lineSize)) {
27 26
         echo_style('red', 'E');
28 27
         $messages['error'][] = $helpText;
@@ -121,10 +120,14 @@ function echo_block($style, $title, $message)
121 120
 
122 121
     echo PHP_EOL.PHP_EOL;
123 122
 
124
-    echo_style($style, str_repeat(' ', $width).PHP_EOL);
125
-    echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL);
126
-    echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
127
-    echo_style($style, str_repeat(' ', $width).PHP_EOL);
123
+    echo_style($style, str_repeat(' ', $width));
124
+    echo PHP_EOL;
125
+    echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT));
126
+    echo PHP_EOL;
127
+    echo_style($style, $message);
128
+    echo PHP_EOL;
129
+    echo_style($style, str_repeat(' ', $width));
130
+    echo PHP_EOL;
128 131
 }
129 132
 
130 133
 function has_color_support()

+ 14
- 14
www/composer.json View File

@@ -17,22 +17,22 @@
17 17
         }
18 18
     },
19 19
     "require": {
20
-        "php": ">=5.5.9",
21
-        "symfony/symfony": "3.0.*",
22
-        "doctrine/orm": "^2.5",
23
-        "doctrine/doctrine-bundle": "^1.6",
24
-        "doctrine/doctrine-cache-bundle": "^1.2",
25
-        "symfony/swiftmailer-bundle": "^2.3",
26
-        "symfony/monolog-bundle": "^2.8",
27
-        "sensio/distribution-bundle": "^5.0",
28
-        "sensio/framework-extra-bundle": "^3.0.2",
29
-        "incenteev/composer-parameter-handler": "^2.0",
30
-        "friendsofsymfony/user-bundle": "~2.0@dev",
31
-        "kphoen/contact-bundle": ">=3.0"
20
+        "php": "7.*",
21
+        "symfony/symfony": "3.*",
22
+        "doctrine/orm": "2.*",
23
+        "doctrine/doctrine-bundle": "1.*",
24
+        "doctrine/doctrine-cache-bundle": "1.*",
25
+        "symfony/swiftmailer-bundle": "2.*",
26
+        "symfony/monolog-bundle": "3.*",
27
+        "sensio/distribution-bundle": "5.*",
28
+        "sensio/framework-extra-bundle": "3.*",
29
+        "incenteev/composer-parameter-handler": "2.*",
30
+        "friendsofsymfony/user-bundle": "2.*",
31
+        "kphoen/contact-bundle": "4.*"
32 32
     },
33 33
     "require-dev": {
34
-        "sensio/generator-bundle": "^3.0",
35
-        "symfony/phpunit-bridge": "^2.7"
34
+        "sensio/generator-bundle": "3.*",
35
+        "symfony/phpunit-bridge": "2.*"
36 36
     },
37 37
     "scripts": {
38 38
         "post-install-cmd": [

+ 70
- 27
www/var/SymfonyRequirements.php View File

@@ -168,6 +168,9 @@ class PhpIniRequirement extends Requirement
168 168
  */
169 169
 class RequirementCollection implements IteratorAggregate
170 170
 {
171
+    /**
172
+     * @var Requirement[]
173
+     */
171 174
     private $requirements = array();
172 175
 
173 176
     /**
@@ -265,7 +268,7 @@ class RequirementCollection implements IteratorAggregate
265 268
     /**
266 269
      * Returns both requirements and recommendations.
267 270
      *
268
-     * @return array Array of Requirement instances
271
+     * @return Requirement[]
269 272
      */
270 273
     public function all()
271 274
     {
@@ -275,7 +278,7 @@ class RequirementCollection implements IteratorAggregate
275 278
     /**
276 279
      * Returns all mandatory requirements.
277 280
      *
278
-     * @return array Array of Requirement instances
281
+     * @return Requirement[]
279 282
      */
280 283
     public function getRequirements()
281 284
     {
@@ -292,7 +295,7 @@ class RequirementCollection implements IteratorAggregate
292 295
     /**
293 296
      * Returns the mandatory requirements that were not met.
294 297
      *
295
-     * @return array Array of Requirement instances
298
+     * @return Requirement[]
296 299
      */
297 300
     public function getFailedRequirements()
298 301
     {
@@ -309,7 +312,7 @@ class RequirementCollection implements IteratorAggregate
309 312
     /**
310 313
      * Returns all optional recommendations.
311 314
      *
312
-     * @return array Array of Requirement instances
315
+     * @return Requirement[]
313 316
      */
314 317
     public function getRecommendations()
315 318
     {
@@ -326,7 +329,7 @@ class RequirementCollection implements IteratorAggregate
326 329
     /**
327 330
      * Returns the recommendations that were not met.
328 331
      *
329
-     * @return array Array of Requirement instances
332
+     * @return Requirement[]
330 333
      */
331 334
     public function getFailedRecommendations()
332 335
     {
@@ -376,7 +379,8 @@ class RequirementCollection implements IteratorAggregate
376 379
  */
377 380
 class SymfonyRequirements extends RequirementCollection
378 381
 {
379
-    const REQUIRED_PHP_VERSION = '5.3.3';
382
+    const LEGACY_REQUIRED_PHP_VERSION = '5.3.3';
383
+    const REQUIRED_PHP_VERSION = '5.5.9';
380 384
 
381 385
     /**
382 386
      * Constructor that initializes the requirements.
@@ -386,16 +390,26 @@ class SymfonyRequirements extends RequirementCollection
386 390
         /* mandatory requirements follow */
387 391
 
388 392
         $installedPhpVersion = phpversion();
393
+        $requiredPhpVersion = $this->getPhpRequiredVersion();
389 394
 
390
-        $this->addRequirement(
391
-            version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>='),
392
-            sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $installedPhpVersion),
393
-            sprintf('You are running PHP version "<strong>%s</strong>", but Symfony needs at least PHP "<strong>%s</strong>" to run.
394
-                Before using Symfony, upgrade your PHP installation, preferably to the latest version.',
395
-                $installedPhpVersion, self::REQUIRED_PHP_VERSION),
396
-            sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $installedPhpVersion)
395
+        $this->addRecommendation(
396
+            $requiredPhpVersion,
397
+            'Vendors should be installed in order to check all requirements.',
398
+            'Run the <code>composer install</code> command.',
399
+            'Run the "composer install" command.'
397 400
         );
398 401
 
402
+        if (false !== $requiredPhpVersion) {
403
+            $this->addRequirement(
404
+                version_compare($installedPhpVersion, $requiredPhpVersion, '>='),
405
+                sprintf('PHP version must be at least %s (%s installed)', $requiredPhpVersion, $installedPhpVersion),
406
+                sprintf('You are running PHP version "<strong>%s</strong>", but Symfony needs at least PHP "<strong>%s</strong>" to run.
407
+                Before using Symfony, upgrade your PHP installation, preferably to the latest version.',
408
+                    $installedPhpVersion, $requiredPhpVersion),
409
+                sprintf('Install PHP %s or newer (installed version is %s)', $requiredPhpVersion, $installedPhpVersion)
410
+            );
411
+        }
412
+
399 413
         $this->addRequirement(
400 414
             version_compare($installedPhpVersion, '5.3.16', '!='),
401 415
             'PHP version must not be 5.3.16 as Symfony won\'t work properly with it',
@@ -433,7 +447,7 @@ class SymfonyRequirements extends RequirementCollection
433 447
             );
434 448
         }
435 449
 
436
-        if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
450
+        if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) {
437 451
             $timezones = array();
438 452
             foreach (DateTimeZone::listAbbreviations() as $abbreviations) {
439 453
                 foreach ($abbreviations as $abbreviation) {
@@ -619,12 +633,6 @@ class SymfonyRequirements extends RequirementCollection
619 633
             'Install and enable the <strong>mbstring</strong> extension.'
620 634
         );
621 635
 
622
-        $this->addRecommendation(
623
-            function_exists('iconv'),
624
-            'iconv() should be available',
625
-            'Install and enable the <strong>iconv</strong> extension.'
626
-        );
627
-
628 636
         $this->addRecommendation(
629 637
             function_exists('utf8_decode'),
630 638
             'utf8_decode() should be available',
@@ -681,10 +689,17 @@ class SymfonyRequirements extends RequirementCollection
681 689
 
682 690
             if (class_exists('Symfony\Component\Intl\Intl')) {
683 691
                 $this->addRecommendation(
684
-                    \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(),
685
-                    sprintf('intl ICU version installed on your system (%s) should match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()),
686
-                    'In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.'
692
+                    \Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion(),
693
+                    sprintf('intl ICU version installed on your system is outdated (%s) and does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()),
694
+                    'To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.'
687 695
                 );
696
+                if (\Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion()) {
697
+                    $this->addRecommendation(
698
+                        \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(),
699
+                        sprintf('intl ICU version installed on your system (%s) does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()),
700
+                        'To avoid internationalization data inconsistencies upgrade the symfony/intl component.'
701
+                    );
702
+                }
688 703
             }
689 704
 
690 705
             $this->addPhpIniRecommendation(
@@ -718,9 +733,9 @@ class SymfonyRequirements extends RequirementCollection
718 733
 
719 734
         if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
720 735
             $this->addRecommendation(
721
-                $this->getRealpathCacheSize() > 1000,
722
-                'realpath_cache_size should be above 1024 in php.ini',
723
-                'Set "<strong>realpath_cache_size</strong>" to e.g. "<strong>1024</strong>" in php.ini<a href="#phpini">*</a> to improve performance on windows.'
736
+                $this->getRealpathCacheSize() >= 5 * 1024 * 1024,
737
+                'realpath_cache_size should be at least 5M in php.ini',
738
+                'Setting "<strong>realpath_cache_size</strong>" to e.g. "<strong>5242880</strong>" or "<strong>5M</strong>" in php.ini<a href="#phpini">*</a> may improve performance on Windows significantly in some cases.'
724 739
             );
725 740
         }
726 741
 
@@ -759,7 +774,11 @@ class SymfonyRequirements extends RequirementCollection
759 774
     {
760 775
         $size = ini_get('realpath_cache_size');
761 776
         $size = trim($size);
762
-        $unit = strtolower(substr($size, -1, 1));
777
+        $unit = '';
778
+        if (!ctype_digit($size)) {
779
+            $unit = strtolower(substr($size, -1, 1));
780
+            $size = (int) substr($size, 0, -1);
781
+        }
763 782
         switch ($unit) {
764 783
             case 'g':
765 784
                 return $size * 1024 * 1024 * 1024;
@@ -771,4 +790,28 @@ class SymfonyRequirements extends RequirementCollection
771 790
                 return (int) $size;
772 791
         }
773 792
     }
793
+
794
+    /**
795
+     * Defines PHP required version from Symfony version.
796
+     *
797
+     * @return string|false The PHP required version or false if it could not be guessed
798
+     */
799
+    protected function getPhpRequiredVersion()
800
+    {
801
+        if (!file_exists($path = __DIR__.'/../composer.lock')) {
802
+            return false;
803
+        }
804
+
805
+        $composerLock = json_decode(file_get_contents($path), true);
806
+        foreach ($composerLock['packages'] as $package) {
807
+            $name = $package['name'];
808
+            if ('symfony/symfony' !== $name && 'symfony/http-kernel' !== $name) {
809
+                continue;
810
+            }
811
+
812
+            return (int) $package['version'][1] > 2 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION;
813
+        }
814
+
815
+        return false;
816
+    }
774 817
 }

+ 1
- 1
www/web/app.php View File

@@ -19,8 +19,8 @@ $apcLoader->register(true);
19 19
 */
20 20
 
21 21
 $kernel = new AppKernel('prod', false);
22
-$kernel->loadClassCache();
23 22
 //$kernel = new AppCache($kernel);
23
+//Request::setTrustedProxies(['~'], Request::HEADER_X_FORWARDED_ALL);
24 24
 
25 25
 // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
26 26
 //Request::enableHttpMethodParameterOverride();

+ 0
- 1
www/web/app_dev.php View File

@@ -25,7 +25,6 @@ $loader = require __DIR__.'/../app/autoload.php';
25 25
 Debug::enable();
26 26
 
27 27
 $kernel = new AppKernel('dev', true);
28
-$kernel->loadClassCache();
29 28
 $request = Request::createFromGlobals();
30 29
 $response = $kernel->handle($request);
31 30
 $response->send();

+ 231
- 14
www/web/config.php View File

@@ -11,7 +11,7 @@
11 11
  */
12 12
 
13 13
 if (!isset($_SERVER['HTTP_HOST'])) {
14
-    exit('This script cannot be run from the CLI. Run it from a browser.');
14
+    exit("This script cannot be run from the CLI. Run it from a browser.\n");
15 15
 }
16 16
 
17 17
 if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
@@ -28,6 +28,8 @@ $symfonyRequirements = new SymfonyRequirements();
28 28
 
29 29
 $majorProblems = $symfonyRequirements->getFailedRequirements();
30 30
 $minorProblems = $symfonyRequirements->getFailedRecommendations();
31
+$hasMajorProblems = (bool) count($majorProblems);
32
+$hasMinorProblems = (bool) count($minorProblems);
31 33
 
32 34
 ?>
33 35
 <!DOCTYPE html>
@@ -36,9 +38,216 @@ $minorProblems = $symfonyRequirements->getFailedRecommendations();
36 38
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
37 39
         <meta name="robots" content="noindex,nofollow" />
38 40
         <title>Symfony Configuration Checker</title>
39
-        <link rel="stylesheet" href="bundles/framework/css/structure.css" media="all" />
40
-        <link rel="stylesheet" href="bundles/framework/css/body.css" media="all" />
41
-        <style type="text/css">
41
+        <style>
42
+            /* styles copied from symfony framework bundle */
43
+            html {
44
+                background: #eee;
45
+            }
46
+            body {
47
+                font: 11px Verdana, Arial, sans-serif;
48
+                color: #333;
49
+            }
50
+            .sf-reset, .sf-reset .block, .sf-reset #message {
51
+                margin: auto;
52
+            }
53
+            img {
54
+                border: 0;
55
+            }
56
+            .clear {
57
+                clear: both;
58
+                height: 0;
59
+                font-size: 0;
60
+                line-height: 0;
61
+            }
62
+            .clear-fix:after {
63
+                content: "\0020";
64
+                display: block;
65
+                height: 0;
66
+                clear: both;
67
+                visibility: hidden;
68
+            }
69
+            .clear-fix {
70
+                display: inline-block;
71
+            }
72
+            * html .clear-fix {
73
+                height: 1%;
74
+            }
75
+            .clear-fix {
76
+                display: block;
77
+            }
78
+            .header {
79
+                padding: 30px 30px 20px 30px;
80
+            }
81
+            .header-logo {
82
+                float: left;
83
+            }
84
+            .search {
85
+                float: right;
86
+                padding-top: 20px;
87
+            }
88
+            .search label {
89
+                line-height: 28px;
90
+                vertical-align: middle;
91
+            }
92
+            .search input {
93
+                width: 195px;
94
+                font-size: 12px;
95
+                border: 1px solid #dadada;
96
+                background: #fff url(data:image/gif;base64,R0lGODlhAQAFAKIAAPX19e/v7/39/fr6+urq6gAAAAAAAAAAACH5BAAAAAAALAAAAAABAAUAAAMESAEjCQA7) repeat-x left top;
97
+                padding: 5px 6px;
98
+                color: #565656;
99
+            }
100
+            .search input[type="search"] {
101
+                -webkit-appearance: textfield;
102
+            }
103
+            #content {
104
+                width: 970px;
105
+                margin: 0 auto;
106
+            }
107
+            #content pre {
108
+                white-space: normal;
109
+                font-family: Arial, Helvetica, sans-serif;
110
+            }
111
+
112
+            /*
113
+            Copyright (c) 2010, Yahoo! Inc. All rights reserved.
114
+            Code licensed under the BSD License:
115
+            http://developer.yahoo.com/yui/license.html
116
+            version: 3.1.2
117
+            build: 56
118
+            */
119
+            .sf-reset div,.sf-reset dl,.sf-reset dt,.sf-reset dd,.sf-reset ul,.sf-reset ol,.sf-reset li,.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6,.sf-reset pre,.sf-reset code,.sf-reset form,.sf-reset fieldset,.sf-reset legend,.sf-reset input,.sf-reset textarea,.sf-reset p,.sf-reset blockquote,.sf-reset th,.sf-reset td{margin:0;padding:0;}.sf-reset table{border-collapse:collapse;border-spacing:0;}.sf-reset fieldset,.sf-reset img{border:0;}.sf-reset address,.sf-reset caption,.sf-reset cite,.sf-reset code,.sf-reset dfn,.sf-reset em,.sf-reset strong,.sf-reset th,.sf-reset var{font-style:normal;font-weight:normal;}.sf-reset li{list-style:none;}.sf-reset caption,.sf-reset th{text-align:left;}.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6{font-size:100%;font-weight:normal;}.sf-reset q:before,.sf-reset q:after{content:'';}.sf-reset abbr,.sf-reset acronym{border:0;font-variant:normal;}.sf-reset sup{vertical-align:text-top;}.sf-reset sub{vertical-align:text-bottom;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-family:inherit;font-size:inherit;font-weight:inherit;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-size:100%;}.sf-reset legend{color:#000;}
120
+            .sf-reset abbr {
121
+                border-bottom: 1px dotted #000;
122
+                cursor: help;
123
+            }
124
+            .sf-reset p {
125
+                font-size: 14px;
126
+                line-height: 20px;
127
+                padding-bottom: 20px;
128
+            }
129
+            .sf-reset strong {
130
+                color: #313131;
131
+                font-weight: bold;
132
+            }
133
+            .sf-reset a {
134
+                color: #6c6159;
135
+            }
136
+            .sf-reset a img {
137
+                border: none;
138
+            }
139
+            .sf-reset a:hover {
140
+                text-decoration: underline;
141
+            }
142
+            .sf-reset em {
143
+                font-style: italic;
144
+            }
145
+            .sf-reset h2,
146
+            .sf-reset h3 {
147
+                font-weight: bold;
148
+            }
149
+            .sf-reset h1 {
150
+                font-family: Georgia, "Times New Roman", Times, serif;
151
+                font-size: 20px;
152
+                color: #313131;
153
+                word-wrap: break-word;
154
+            }
155
+            .sf-reset li {
156
+                padding-bottom: 10px;
157
+            }
158
+            .sf-reset .block {
159
+                -moz-border-radius: 16px;
160
+                -webkit-border-radius: 16px;
161
+                border-radius: 16px;
162
+                margin-bottom: 20px;
163
+                background-color: #FFFFFF;
164
+                border: 1px solid #dfdfdf;
165
+                padding: 40px 50px;
166
+                word-break: break-all;
167
+            }
168
+            .sf-reset h2 {
169
+                font-size: 16px;
170
+                font-family: Arial, Helvetica, sans-serif;
171
+            }
172
+            .sf-reset li a {
173
+                background: none;
174
+                color: #868686;
175
+                text-decoration: none;
176
+            }
177
+            .sf-reset li a:hover {
178
+                background: none;
179
+                color: #313131;
180
+                text-decoration: underline;
181
+            }
182
+            .sf-reset ol {
183
+                padding: 10px 0;
184
+            }
185
+            .sf-reset ol li {
186
+                list-style: decimal;
187
+                margin-left: 20px;
188
+                padding: 2px;
189
+                padding-bottom: 20px;
190
+            }
191
+            .sf-reset ol ol li {
192
+                list-style-position: inside;
193
+                margin-left: 0;
194
+                white-space: nowrap;
195
+                font-size: 12px;
196
+                padding-bottom: 0;
197
+            }
198
+            .sf-reset li .selected {
199
+                background-color: #ffd;
200
+            }
201
+            .sf-button {
202
+                display: -moz-inline-box;
203
+                display: inline-block;
204
+                text-align: center;
205
+                vertical-align: middle;
206
+                border: 0;
207
+                background: transparent none;
208
+                text-transform: uppercase;
209
+                cursor: pointer;
210
+                font: bold 11px Arial, Helvetica, sans-serif;
211
+            }
212
+            .sf-button span {
213
+                text-decoration: none;
214
+                display: block;
215
+                height: 28px;
216
+                float: left;
217
+            }
218
+            .sf-button .border-l {
219
+                text-decoration: none;
220
+                display: block;
221
+                height: 28px;
222
+                float: left;
223
+                padding: 0 0 0 7px;
224
+                background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQtJREFUeNpiPHnyJAMakARiByDWYEGT8ADiYGVlZStubm5xlv///4MEQYoKZGRkQkRERLRYWVl5wYJQyXBZWdkwCQkJUxAHKgaWlAHSLqKiosb//v1DsYMFKGCvoqJiDmQzwXTAJYECulxcXNLoumCSoszMzDzoumDGghQwYZUECWIzkrAkSIIGOmlkLI10AiX//P379x8jIyMTNmPf/v79+ysLCwsvuiQoNi5//fr1Kch4dAyS3P/gwYMTQBP+wxwHw0xA4gkQ73v9+vUZdJ2w1Lf82bNn4iCHCQoKasHsZw4ODgbRIL8c+/Lly5M3b978Y2dn5wC6npkFLXnsAOKLjx49AmUHLYAAAwBoQubG016R5wAAAABJRU5ErkJggg==) no-repeat top left;
225
+            }
226
+            .sf-button .border-r {
227
+                padding: 0 7px 0 0;
228
+                background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat;
229
+            }
230
+            .sf-button .btn-bg {
231
+                padding: 0 14px;
232
+                color: #636363;
233
+                line-height: 28px;
234
+                background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left;
235
+            }
236
+            .sf-button:hover .border-l,
237
+            .sf-button-selected .border-l {
238
+                background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR9JREFUeNpi/P//PwMyOHfunDqQSgNiexZkibNnzxYBqZa3HOs5v7PcYQBLnjlzhg1IbfzIdsTjA/t+ht9Mr8GKwZL//v3r+sB+0OMN+zqIEf8gFMvJkyd1gXTOa9YNDP//otrPAtSV/Jp9HfPff78Z0AEL0LUeXxivMfxD0wXTqfjj/2ugkf+wSrL9/YtpJEyS4S8WI5Ek/+GR/POPFjr//cenE6/kP9q4Fo/kr39/mdj+M/zFkGQCSj5i+ccPjLJ/GBgkuYOHQR1sNDpmAkb2LBmWwL///zKCIxwZM0VHR18G6p4uxeLLAA4tJMwEshiou1iMxXaHLGswA+t/YbhORuQUv2DBAnCifvxzI+enP3dQJUFg/vz5sOzgBBBgAPxX9j0YnH4JAAAAAElFTkSuQmCC) no-repeat top left;
239
+            }
240
+            .sf-button:hover .border-r,
241
+            .sf-button-selected .border-r {
242
+                background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT5JREFUeNpiPHv27BkGBoaDQDzLyMjoJgMSYHrM3WX8hn1d0f///88DFRYhSzIuv2X5H8Rg/SfKIPDTkYH/l80OINffxMTkF9O/f/8ZQPgnwyuGl+wrGd6x7vf49+9fO9jYf3+Bkkj4NesmBqAV+SdPntQC6vzHgIz//gOawbqOGchOxtAJwp8Zr4F0e7D8/fuPAR38/P8eZIo0yz8skv8YvoIk+YE6/zNgAyD7sRqLkPzzjxY6/+HS+R+fTkZ8djLh08lCUCcuSWawJGbwMTGwg7zyBatX2Bj5QZKPsBrLzaICktzN8g/NWEYGZgYZjoC/wMiei5FMpFh8QPSU6Ojoy3Cd7EwiDBJsDgxiLNY7gLrKQGIsHAxSDHxAO2TZ/b8D+TVxcXF9MCtYtLiKLgDpfUDVsxITE1GyA0CAAQA2E/N8VuHyAAAAAABJRU5ErkJggg==) right top no-repeat;
243
+            }
244
+            .sf-button:hover .btn-bg,
245
+            .sf-button-selected .btn-bg {
246
+                color: #FFFFFF;
247
+                text-shadow:0 1px 1px #6b9311;
248
+                background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAIAAAAvP0KbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEFJREFUeNpiPnv2LNMdvlymf///M/37B8R/QfQ/MP33L4j+B6Qh7L9//sHpf2h8MA1V+w/KRjYLaDaLCU8vQIABAFO3TxZriO4yAAAAAElFTkSuQmCC) repeat-x top left;
249
+            }
250
+
42 251
             /* styles copied from bundles/sensiodistribution/webconfigurator/css/install.css */
43 252
             body {
44 253
                 font-size: 14px;
@@ -61,7 +270,7 @@ $minorProblems = $symfonyRequirements->getFailedRecommendations();
61 270
             }
62 271
             .sf-reset ul a,
63 272
             .sf-reset ul a:hover {
64
-                background: url(../images/blue-arrow.png) no-repeat right 6px;
273
+                background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAYAAAAx8TU7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFdJREFUeNpiYACBjjOhDEiACSggCKTLgXQ5TJARqhIkcReIKxgqTGYxwvV0nDEGkmeAOIwJySiQ4HsgvseIpGo3ELsCtZ9lRDIvDCiwhwHJPEFkJwEEGACq6hdnax8y1AAAAABJRU5ErkJggg==) no-repeat right 7px;
65 274
                 padding-right: 10px;
66 275
             }
67 276
             .sf-reset ul, ol {
@@ -96,6 +305,10 @@ $minorProblems = $symfonyRequirements->getFailedRecommendations();
96 305
             .sf-reset .ko {
97 306
                 background-color: #d66;
98 307
             }
308
+            .sf-reset p.help {
309
+                padding: 12px 16px;
310
+                word-break: break-word;
311
+            }
99 312
             .version {
100 313
                 text-align: right;
101 314
                 font-size: 10px;
@@ -120,7 +333,7 @@ $minorProblems = $symfonyRequirements->getFailedRecommendations();
120 333
         <div id="content">
121 334
             <div class="header clear-fix">
122 335
                 <div class="header-logo">
123
-                    <img src="bundles/framework/images/logo_symfony.png" alt="Symfony" />
336
+                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAA+CAMAAACxzRGDAAAAUVBMVEX////Ly8yko6WLioxkYmVXVVkwLjLl5eWxsLJKSEzy8vJxcHLY2Ni+vb89Oz9XVVh+fH+Yl5n///+xsbLY2Nlxb3KkpKWXlph+fX+LiYy+vr/IZP61AAAAAXRSTlMAQObYZgAABRBJREFUeNrVmtuWoyAQRS1FEEQSzQU7//+hYxUiXsKQZLJWM+chsUloN+WhCuguYoKyYqzmvGasKqH4HyRKxndipcgcumH8qViTM7TkUclcwaHmf5XM0eWq4km1KjdqXfMXJHVe1J3hL8lk5fCGv6wmT+o0d87U+XNrk0Y9nfv+7LM6ZJH5ZBL6LAbSxQ3Q5FDr22Skr8PQSy4n7isnsQxSX4r6pobhjCHHeDNOKrO3yGmCvZOjV9jmt8ulTdXFKdbKLNh+kOMvBzuVRa4Y7MUsdEUSWQe7xxCfZmcwjHU83LqzFvSbJQOXQvptbPnEFoyZtUUGwTeKuLuTHyT1kaP0P6cR01OKvv448gtl61dqZfmJezQmU/t+1R2fJLtBwXV6uWGwB9SZPrn0fKO2WAvQN1PUhHjTom3xgXYTkvlSKHs19OhslETq6X3HrXbjt8XbGj9b4Gi+lUAnL6XxQj8Pyk9N4Bt1xUrsLVN/3isYMug8rODMdbgOvoHs8uAb2fcANIAzkKCLYy+AXRpSU8sr1r4P67xhLgPp7vM32zlqt7Bhq2fI1Hwp+VgANxok59SsGV3oqdUL0YVDMRY7Yg8QLbVUU4NZNoOq5hJHuxEM28Sh/IyUZ8D3reR+yc58EGvOy2U0HQL6G9V+kWyEWHmzaMx6t4o9RhOm/riUiYrzqij4Ptqkn7AaCXqc+F47m04ahfde7YIz8RHEBN6BdVwdIGRVdNbKqYu1Hc0x0wBY4wqC8+XUgBGnj81SZsQB+0yAS1x/BlI/6ebHHk0lauQLuPDpu6EwAVJ7T0rl2uXa23jcqNyOZekhqYHRz3JOANrF4wCCmEs1f9D1lUe0n4NAATed80Y5e0Q7CO2TezM/BR6wKdgQzKbCF4uOQC3Bk0fKAzbFlyRWg3gksA/gmm7eOjrpaKX7fHlEW2xLbE6GZsPiCiShVzN7RG2xTz2G+OJtEqzdJ7APxy3MrSsV0VukXbKMp9lhs5BN6dr3CN+sySUaoxGwfRUM3I/gdPYONgVU+PLX4vUWm32AvUySarbONvcpV2RQEPKKjEBHFk01kQDGRblnn8ZuE9g+JUl8OWAPbkFK2K6JxhJVvF47FzYYnAN22ttwxKYCoH36rheEB7KG/HF/YUaa2G5JF+55tpyrl7B1WHM39HuP2N2EXPl1UBu8vbj4OjvD+NoTE4ssF+ScARgaJY1N7+u8bY/Y9BSM5PKwJbvMVab32YP5FB5TtcYVrGoASolVLTzI7kVsYVxRtAb5n2JXq1vCdtd47XtYItynrN0835PasLg0y13aOPbmPI+on2Lr9e5tjSHvgkAvclUjL3Fsdaw03IzgTR62yYClk7QMah4IQ0qSsoYYbOix6zJR1ZGDNMOY3Bb6W5S6jiyovep3t7bUPyoq7OkjYumrfESp8zSBc/OLosVf+nTnnKjsqR16++WDwpI8FxJWRFTlI6NKnqYJaL96TqjAbo9Toi5QiWBDcmfdFV+T8dkvFe5bItgstbM2X6QG2mVun+cazfRwOS0eiaeRRJKgLfc3BQAqfnhJyz8lfR6580SF/FXVu83Nz1xrrnFqqXL6Qxl47DNSm4RFflvN5sABDD8peouqLLKQXVdGbnqf+qIpOxON4ZyYdJEJ6sy4zS2c5eRPTT4Jyp46qDE5/ptAWqJOQ9e6yE82FXBbZCk1/tXVoshVoopE3CB0zmraI3nbqCJ/gW3ZMgtbC5nh/QHlOoOZBxQCRgAAAABJRU5ErkJggg==" alt="Symfony" />
124 337
                 </div>
125 338
 
126 339
                 <div class="search">
@@ -128,7 +341,7 @@ $minorProblems = $symfonyRequirements->getFailedRecommendations();
128 341
                     <div class="form-row">
129 342
 
130 343
                       <label for="search-id">
131
-                          <img src="bundles/framework/images/grey_magnifier.png" alt="Search on Symfony website" />
344
+                                <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAABUElEQVQoz2NgAIJ29iBdD0d7X2cPb+tY2f9MDMjgP2O2hKu7vS8CBlisZUNSMJ3fxRMkXO61wm2ue6I3iB1q8Z8ZriDZFCS03fm/wX+1/xp/TBo8QPxeqf+MUAW+QIFKj/+q/wX/c/3n/i/6Qd/bx943z/Q/K1SBI1D9fKv/AhCn/Wf5L5EHdFGKw39OqAIXoPpOMziX4T9/DFBBnuN/HqhAEtCKCNf/XDA/rZRyAmrpsvrPDVUw3wrkqCiLaewg6TohX1d7X0ffs5r/OaAKfinmgt3t4ulr4+Xg4ANip3j+l/zPArNT4LNOD0pAgWCSOUIBy3+h/+pXbBa5tni0eMx23+/mB1YSYnENroT5Pw/QSOX/mkCo+l/jgo0v2KJA643s8PgAmsMBDCbu/5xALHPB2husxN9uCzsDOgAq5kAoaZVnYMCh5Ky1r88Eh/+iABM8jUk7ClYIAAAAAElFTkSuQmCC" alt="Search on Symfony website" />
132 345
                       </label>
133 346
 
134 347
                       <input name="q" id="search-id" type="search" placeholder="Search on Symfony website" />
@@ -154,25 +367,29 @@ $minorProblems = $symfonyRequirements->getFailedRecommendations();
154 367
                             ready to run Symfony applications.
155 368
                         </p>
156 369
 
157
-                        <?php if (count($majorProblems)): ?>
370
+                        <?php if ($hasMajorProblems): ?>
158 371
                             <h2 class="ko">Major problems</h2>
159 372
                             <p>Major problems have been detected and <strong>must</strong> be fixed before continuing:</p>
160 373
                             <ol>
161 374
                                 <?php foreach ($majorProblems as $problem): ?>
162
-                                    <li><?php echo $problem->getHelpHtml() ?></li>
375
+                                    <li><?php echo $problem->getTestMessage() ?>
376
+                                        <p class="help"><em><?php echo $problem->getHelpHtml() ?></em></p>
377
+                                    </li>
163 378
                                 <?php endforeach; ?>
164 379
                             </ol>
165 380
                         <?php endif; ?>
166 381
 
167
-                        <?php if (count($minorProblems)): ?>
382
+                        <?php if ($hasMinorProblems): ?>
168 383
                             <h2>Recommendations</h2>
169 384
                             <p>
170
-                                <?php if (count($majorProblems)): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience,
385
+                                <?php if ($hasMajorProblems): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience,
171 386
                                 it’s recommended that you fix the following:
172 387
                             </p>
173 388
                             <ol>
174 389
                                 <?php foreach ($minorProblems as $problem): ?>
175
-                                    <li><?php echo $problem->getHelpHtml() ?></li>
390
+                                    <li><?php echo $problem->getTestMessage() ?>
391
+                                        <p class="help"><em><?php echo $problem->getHelpHtml() ?></em></p>
392
+                                    </li>
176 393
                                 <?php endforeach; ?>
177 394
                             </ol>
178 395
                         <?php endif; ?>
@@ -187,12 +404,12 @@ $minorProblems = $symfonyRequirements->getFailedRecommendations();
187 404
                             </p>
188 405
                         <?php endif; ?>
189 406
 
190
-                        <?php if (!count($majorProblems) && !count($minorProblems)): ?>
407
+                        <?php if (!$hasMajorProblems && !$hasMinorProblems): ?>
191 408
                             <p class="ok">All checks passed successfully. Your system is ready to run Symfony applications.</p>
192 409
                         <?php endif; ?>
193 410
 
194 411
                         <ul class="symfony-install-continue">
195
-                            <?php if (count($majorProblems) || count($minorProblems)): ?>
412
+                            <?php if ($hasMajorProblems || $hasMinorProblems): ?>
196 413
                                 <li><a href="config.php">Re-check configuration</a></li>
197 414
                             <?php endif; ?>
198 415
                         </ul>

Loading…
Cancel
Save