Ver código fonte

Uppgrade de symfony et des bundles associés.

bastien 12 anos atrás
pai
commit
fba8fd7eb9
100 arquivos alterados com 268 adições e 250 exclusões
  1. 101 0
      app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml
  2. 1 1
      app/Resources/FOSUserBundle/views/Resetting/checkEmail.html.twig
  3. 4 4
      app/bootstrap.php.cache
  4. 7 0
      app/config/security.yml
  5. 11 9
      deps
  6. 13 14
      deps.lock
  7. 19 9
      deps~
  8. 0 1
      src/Muzich/CoreBundle/Tests/Controller/IndexControllerTest.php
  9. 20 0
      src/Muzich/UserBundle/Controller/ResettingController.php
  10. 1 1
      src/Muzich/UserBundle/DataFixtures/ORM/LoadUserData.php
  11. 24 178
      src/Muzich/UserBundle/Entity/UserManager.php
  12. 0 0
      vendor/assetic/.gitignore
  13. 9 0
      vendor/assetic/CHANGELOG
  14. 0 0
      vendor/assetic/README.md
  15. 0 0
      vendor/assetic/docs/en/build.md
  16. 0 0
      vendor/assetic/docs/en/concepts.md
  17. 0 0
      vendor/assetic/docs/en/define.md
  18. 0 0
      vendor/assetic/docs/en/index.md
  19. 0 0
      vendor/assetic/docs/en/introduction.md
  20. 0 0
      vendor/assetic/docs/ja/build.md
  21. 0 0
      vendor/assetic/docs/ja/concepts.md
  22. 0 0
      vendor/assetic/docs/ja/define.md
  23. 0 0
      vendor/assetic/docs/ja/index.md
  24. 0 0
      vendor/assetic/docs/ja/introduction.md
  25. 0 0
      vendor/assetic/phpunit.xml.dist
  26. 0 0
      vendor/assetic/src/Assetic/Asset/AssetCache.php
  27. 0 0
      vendor/assetic/src/Assetic/Asset/AssetCollection.php
  28. 0 0
      vendor/assetic/src/Assetic/Asset/AssetInterface.php
  29. 0 0
      vendor/assetic/src/Assetic/Asset/AssetReference.php
  30. 0 0
      vendor/assetic/src/Assetic/Asset/BaseAsset.php
  31. 0 0
      vendor/assetic/src/Assetic/Asset/FileAsset.php
  32. 0 0
      vendor/assetic/src/Assetic/Asset/GlobAsset.php
  33. 0 0
      vendor/assetic/src/Assetic/Asset/HttpAsset.php
  34. 0 0
      vendor/assetic/src/Assetic/Asset/StringAsset.php
  35. 0 0
      vendor/assetic/src/Assetic/AssetManager.php
  36. 0 0
      vendor/assetic/src/Assetic/AssetWriter.php
  37. 0 0
      vendor/assetic/src/Assetic/Cache/CacheInterface.php
  38. 0 0
      vendor/assetic/src/Assetic/Cache/ConfigCache.php
  39. 0 0
      vendor/assetic/src/Assetic/Cache/ExpiringCache.php
  40. 0 0
      vendor/assetic/src/Assetic/Cache/FilesystemCache.php
  41. 0 0
      vendor/assetic/src/Assetic/Extension/Twig/AsseticExtension.php
  42. 0 0
      vendor/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php
  43. 0 0
      vendor/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php
  44. 0 0
      vendor/assetic/src/Assetic/Extension/Twig/AsseticNode.php
  45. 0 0
      vendor/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php
  46. 4 1
      vendor/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php
  47. 0 0
      vendor/assetic/src/Assetic/Extension/Twig/TwigResource.php
  48. 0 0
      vendor/assetic/src/Assetic/Factory/AssetFactory.php
  49. 0 0
      vendor/assetic/src/Assetic/Factory/LazyAssetManager.php
  50. 0 0
      vendor/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php
  51. 0 0
      vendor/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php
  52. 0 0
      vendor/assetic/src/Assetic/Factory/Loader/FormulaLoaderInterface.php
  53. 0 0
      vendor/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php
  54. 0 0
      vendor/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php
  55. 0 0
      vendor/assetic/src/Assetic/Factory/Resource/DirectoryResource.php
  56. 0 0
      vendor/assetic/src/Assetic/Factory/Resource/FileResource.php
  57. 0 0
      vendor/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php
  58. 0 0
      vendor/assetic/src/Assetic/Factory/Resource/ResourceInterface.php
  59. 0 0
      vendor/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php
  60. 0 0
      vendor/assetic/src/Assetic/Factory/Worker/WorkerInterface.php
  61. 0 0
      vendor/assetic/src/Assetic/Filter/BaseCssFilter.php
  62. 0 0
      vendor/assetic/src/Assetic/Filter/CallablesFilter.php
  63. 0 0
      vendor/assetic/src/Assetic/Filter/CoffeeScriptFilter.php
  64. 10 14
      vendor/assetic/src/Assetic/Filter/CompassFilter.php
  65. 1 1
      vendor/assetic/src/Assetic/Filter/CssEmbedFilter.php
  66. 0 0
      vendor/assetic/src/Assetic/Filter/CssImportFilter.php
  67. 0 0
      vendor/assetic/src/Assetic/Filter/CssMinFilter.php
  68. 0 0
      vendor/assetic/src/Assetic/Filter/CssRewriteFilter.php
  69. 0 0
      vendor/assetic/src/Assetic/Filter/FilterCollection.php
  70. 0 0
      vendor/assetic/src/Assetic/Filter/FilterInterface.php
  71. 0 0
      vendor/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php
  72. 0 0
      vendor/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php
  73. 0 0
      vendor/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php
  74. 0 0
      vendor/assetic/src/Assetic/Filter/JpegoptimFilter.php
  75. 0 0
      vendor/assetic/src/Assetic/Filter/JpegtranFilter.php
  76. 0 1
      vendor/assetic/src/Assetic/Filter/LessFilter.php
  77. 0 0
      vendor/assetic/src/Assetic/Filter/LessphpFilter.php
  78. 0 0
      vendor/assetic/src/Assetic/Filter/OptiPngFilter.php
  79. 0 0
      vendor/assetic/src/Assetic/Filter/PackagerFilter.php
  80. 0 0
      vendor/assetic/src/Assetic/Filter/PngoutFilter.php
  81. 0 0
      vendor/assetic/src/Assetic/Filter/Sass/SassFilter.php
  82. 0 0
      vendor/assetic/src/Assetic/Filter/Sass/ScssFilter.php
  83. 0 0
      vendor/assetic/src/Assetic/Filter/SprocketsFilter.php
  84. 0 0
      vendor/assetic/src/Assetic/Filter/StylusFilter.php
  85. 16 5
      vendor/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
  86. 0 0
      vendor/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php
  87. 0 0
      vendor/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php
  88. 0 0
      vendor/assetic/src/Assetic/FilterManager.php
  89. 2 2
      vendor/assetic/src/Assetic/Util/Process.php
  90. 25 9
      vendor/assetic/src/Assetic/Util/ProcessBuilder.php
  91. 0 0
      vendor/assetic/src/Assetic/Util/TraversableString.php
  92. 0 0
      vendor/assetic/src/functions.php
  93. 0 0
      vendor/assetic/tests/Assetic/Test/Asset/AssetCacheTest.php
  94. 0 0
      vendor/assetic/tests/Assetic/Test/Asset/AssetCollectionTest.php
  95. 0 0
      vendor/assetic/tests/Assetic/Test/Asset/AssetReferenceTest.php
  96. 0 0
      vendor/assetic/tests/Assetic/Test/Asset/FileAssetTest.php
  97. 0 0
      vendor/assetic/tests/Assetic/Test/Asset/GlobAssetTest.php
  98. 0 0
      vendor/assetic/tests/Assetic/Test/Asset/HttpAssetTest.php
  99. 0 0
      vendor/assetic/tests/Assetic/Test/Asset/StringAssetTest.php
  100. 0 0
      vendor/assetic/tests/Assetic/Test/AssetManagerTest.php

+ 101 - 0
app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml Ver arquivo

@@ -0,0 +1,101 @@
1
+# Group
2
+group:
3
+    edit:
4
+        submit: Mettre à jour le groupe
5
+    show:
6
+        name: Nom du groupe
7
+    new:
8
+        submit: Créer le groupe
9
+    flash:
10
+        updated: Le groupe a été mis à jour
11
+        created: Le groupe a été créé
12
+        deleted: Le groupe a été supprimé
13
+
14
+# Security
15
+security:
16
+    login:
17
+        username: "Nom d'utilisateur:"
18
+        password: "Mot de passe:"
19
+        remember_me: Se souvenir de moi
20
+        submit: Connexion
21
+
22
+# Profile
23
+profile:
24
+    show:
25
+        username: Nom d'utilisateur
26
+        email: Adresse e-mail
27
+    edit:
28
+        submit: Mettre à jour
29
+    flash:
30
+        updated: Le profil a été mis à jour
31
+
32
+# Password change
33
+change_password:
34
+    submit: Modifier le mot de passe
35
+    flash:
36
+        success: Le mot de passe a été modifié
37
+
38
+# Registration
39
+registration:
40
+    check_email: Un e-mail a été envoyé à l'adresse %email%. Veuillez suivre les instructions qui vous y sont indiquées.
41
+    confirmed: Félicitations %username%, votre compte est maintenant activé.
42
+    back: Retour à la page d'origine.
43
+    submit: Enregistrer
44
+    flash:
45
+        user_created: L'utilisateur a été créé avec succès
46
+    email: |
47
+        Bienvenue %username% !
48
+        Bonjour %username% !
49
+
50
+        Pour valider votre compte utilisateur, merci de vous rendre sur %confirmationUrl%
51
+
52
+        Cordialement,
53
+        L'équipe.
54
+
55
+# Password resetting
56
+resetting:
57
+    password_already_requested: Un nouveau mot de passe a déjà été demandé pour cet utilisateur dans les dernières 24 heures.
58
+    check_email: Un e-mail a été envoyé. Veuillez suivre les instructions qui vous y sont indiquées.
59
+    request:
60
+        invalid_username: Le nom d'utilisateur ou l'adresse e-mail "%username%" n'existe pas.
61
+        username: "Nom d'utilisateur ou adresse e-mail:"
62
+        submit: Réinitialiser le mot de passe
63
+    reset:
64
+        submit: Modifier le mot de passe
65
+    flash:
66
+        success: Le mot de passe a été réinitialisé avec succès
67
+    email: |
68
+        Mot de passe pour %username%
69
+        Bonjour %username% !
70
+
71
+        Pour réinitialiser votre mot de passe, merci de vous rendre sur %confirmationUrl%
72
+
73
+        Cordialement,
74
+        L'équipe.
75
+
76
+# Global strings
77
+layout:
78
+    logout: Déconnexion
79
+    login: Connexion
80
+    register: Enregistrer
81
+    logged_in_as: Connecté en tant que %username%
82
+
83
+# Form field labels
84
+fos_user_group_form_name: "Nom du groupe:"
85
+
86
+fos_user_profile_form_username:             "Nom d'utilisateur:"
87
+fos_user_profile_form_email:                "Adresse e-mail:"
88
+fos_user_profile_form_plainPassword_first:  "Mot de passe:"
89
+fos_user_profile_form_plainPassword_second: "Vérification:"
90
+
91
+fos_user_registration_form_username:             "Nom d'utilisateur:"
92
+fos_user_registration_form_email:                "Adresse e-mail:"
93
+fos_user_registration_form_plainPassword_first:  "Mot de passe:"
94
+fos_user_registration_form_plainPassword_second: "Vérification:"
95
+
96
+fos_user_resetting_form_new_first:  "Nouveau mot de passe:"
97
+fos_user_resetting_form_new_second: "Vérification:"
98
+
99
+fos_user_change_password_form_new_first:    "Nouveau mot de passe:"
100
+fos_user_change_password_form_new_second:   "Vérification:"
101
+fos_user_change_password_form_current:  "Mot de passe actuel:"

+ 1 - 1
app/Resources/FOSUserBundle/views/Resetting/checkEmail.html.twig Ver arquivo

@@ -2,6 +2,6 @@
2 2
 
3 3
 {% block fos_user_content %}
4 4
 <p>
5
-{{ 'resetting.check_email'|trans({'%email%': user.email}, 'FOSUserBundle') }}
5
+{{ 'resetting.check_email'|trans({'%email%': ''}, 'FOSUserBundle') }}
6 6
 </p>
7 7
 {% endblock %}

+ 4 - 4
app/bootstrap.php.cache Ver arquivo

@@ -456,7 +456,7 @@ abstract class Kernel implements KernelInterface
456 456
     protected $startTime;
457 457
     protected $classes;
458 458
 
459
-    const VERSION = '2.0.1';
459
+    const VERSION = '2.0.8';
460 460
 
461 461
     
462 462
     public function __construct($environment, $debug)
@@ -787,7 +787,7 @@ abstract class Kernel implements KernelInterface
787 787
         $this->container = new $class();
788 788
         $this->container->set('kernel', $this);
789 789
 
790
-        if (!$fresh) {
790
+        if (!$fresh && $this->container->has('cache_warmer')) {
791 791
             $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'));
792 792
         }
793 793
     }
@@ -835,7 +835,7 @@ abstract class Kernel implements KernelInterface
835 835
         foreach (array('cache' => $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) {
836 836
             if (!is_dir($dir)) {
837 837
                 if (false === @mkdir($dir, 0777, true)) {
838
-                    throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, dirname($dir)));
838
+                    throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir));
839 839
                 }
840 840
             } elseif (!is_writable($dir)) {
841 841
                 throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir));
@@ -992,7 +992,7 @@ class ClassCollectionLoader
992 992
         $files = array();
993 993
         $content = '';
994 994
         foreach ($classes as $class) {
995
-            if (!class_exists($class) && !interface_exists($class)) {
995
+            if (!class_exists($class) && !interface_exists($class) && (!function_exists('trait_exists') || !trait_exists($class))) {
996 996
                 throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class));
997 997
             }
998 998
 

+ 7 - 0
app/config/security.yml Ver arquivo

@@ -1,6 +1,13 @@
1 1
 imports:
2 2
     - { resource: "@MuzichCoreBundle/Resources/config/security.yml" }
3 3
 
4
+security:
5
+    encoders:
6
+        'FOS\UserBundle\Model\UserInterface':
7
+            algorithm: sha512
8
+            encode_as_base64: false
9
+            iterations: 10
10
+
4 11
 #security:
5 12
 #    encoders:
6 13
 #        Symfony\Component\Security\Core\User\User: plaintext

+ 11 - 9
deps Ver arquivo

@@ -1,34 +1,34 @@
1 1
 [symfony]
2 2
     git=http://github.com/symfony/symfony.git
3
-    version=v2.0.1
3
+    version=v2.0.8
4 4
 
5 5
 [twig]
6 6
     git=http://github.com/fabpot/Twig.git
7
-    version=v1.1.2
7
+    version=v1.4.0
8 8
 
9 9
 [monolog]
10 10
     git=http://github.com/Seldaek/monolog.git
11
-    version=1.0.1
11
+    version=1.0.2
12 12
 
13 13
 [doctrine-common]
14 14
     git=http://github.com/doctrine/common.git
15
-    version=2.1.1
15
+    version=2.1.4
16 16
 
17 17
 [doctrine-dbal]
18 18
     git=http://github.com/doctrine/dbal.git
19
-    version=2.1.1
19
+    version=2.1.5
20 20
 
21 21
 [doctrine]
22 22
     git=http://github.com/doctrine/doctrine2.git
23
-    version=2.1.1
23
+    version=2.1.5
24 24
 
25 25
 [swiftmailer]
26 26
     git=http://github.com/swiftmailer/swiftmailer.git
27
-    version=v4.1.1
27
+    version=v4.1.4
28 28
 
29 29
 [assetic]
30 30
     git=http://github.com/kriswallsmith/assetic.git
31
-    version=v1.0.1
31
+    version=v1.0.2
32 32
 
33 33
 [twig-extensions]
34 34
     git=http://github.com/fabpot/Twig-extensions.git
@@ -40,14 +40,17 @@
40 40
 [SensioFrameworkExtraBundle]
41 41
     git=http://github.com/sensio/SensioFrameworkExtraBundle.git
42 42
     target=/bundles/Sensio/Bundle/FrameworkExtraBundle
43
+    version=origin/2.0
43 44
 
44 45
 [JMSSecurityExtraBundle]
45 46
     git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
46 47
     target=/bundles/JMS/SecurityExtraBundle
48
+    version=origin/1.0.x
47 49
 
48 50
 [SensioDistributionBundle]
49 51
     git=http://github.com/sensio/SensioDistributionBundle.git
50 52
     target=/bundles/Sensio/Bundle/DistributionBundle
53
+    version=origin/2.0
51 54
 
52 55
 [SensioGeneratorBundle]
53 56
     git=http://github.com/sensio/SensioGeneratorBundle.git
@@ -56,7 +59,6 @@
56 59
 [AsseticBundle]
57 60
     git=http://github.com/symfony/AsseticBundle.git
58 61
     target=/bundles/Symfony/Bundle/AsseticBundle
59
-    version=v1.0.0
60 62
 
61 63
 [FOSUserBundle]
62 64
     git=git://github.com/FriendsOfSymfony/FOSUserBundle.git

+ 13 - 14
deps.lock Ver arquivo

@@ -1,15 +1,14 @@
1
-symfony 7cb402d806a9615cf8bcafcfd049da00914b45f8
2
-twig 396435ecd05556adb0a8bd05b14641cb4f8a8aa5
3
-monolog 303b8a83c87d5c6d749926cf02620465a5dcd0f2
4
-doctrine-common 174111c8d245d560e1af4c7455b730347f85686d
5
-doctrine-dbal 54f474b3c321676ceadbe4288396902405d87756
6
-doctrine 05d12e20be58ab4d5fa403c5bd6ac06d1fce97e5
7
-swiftmailer 1f273a7cd466a2dd82e59431dd5ce15f36996688
8
-assetic 3333d371c4511abcdec7bad86e15ac2be3b10f03
9
-twig-extensions eba4f5d572bec05c72a47bbd73ba0a3330cf8f54
1
+symfony 5b4e6190c4420524e4dcaf51213c4ad78f646528
2
+twig 0b7d6dfa0cf0dfb6a3c5745b6434ebd6ea32e90e
3
+monolog b704c49a3051536f67f2d39f13568f74615b9922
4
+doctrine-common b886898821288d305862ee9c567cc5b5cbb4c0dc
5
+doctrine-dbal ae358bd94ec09d7d3ad92ca7820e67825ad9e5f4
6
+doctrine da0e3439aba4c8bf5e8a6ee4ccee5ce2624be8d1
7
+swiftmailer eb0ecaa4243efc46e0f54d87c6454e49aa4b62dd
8
+assetic f829ad23d23c87480151a21faad49fefe7c09e5d
9
+twig-extensions d75a453b4e1ad48216cc4803ba9095855f130774
10 10
 metadata 8717ad2a5689480765d9ffafe925cd8a2457e582
11
-SensioFrameworkExtraBundle 9b9194a47effc66b08d44ae110b982352119ca17
12
-JMSSecurityExtraBundle facedd50988b311f778288ea3b5e070591936f30
13
-SensioDistributionBundle 029151792beac272548fe9df183e15b9be521870
14
-SensioGeneratorBundle 52038c005d565a1bd4986dcdef207ed9f1246b32
15
-AsseticBundle 9c1b7269a4517d1ae94af2dc0d6d6fc4b31e6c10
11
+SensioFrameworkExtraBundle 1c7e92f466d11f83130b0c1271f44d067a2c3b31
12
+JMSSecurityExtraBundle b8b7eb294ed83d83ca7260ac018e701f08003538
13
+SensioDistributionBundle 20b66a408084ad8752f98e50f10533f5245310bf
14
+SensioGeneratorBundle 87fe88c4c8dc09cb197ba4b2d6d5b834e2c64980

+ 19 - 9
deps~ Ver arquivo

@@ -1,34 +1,34 @@
1 1
 [symfony]
2 2
     git=http://github.com/symfony/symfony.git
3
-    version=v2.0.1
3
+    version=v2.0.8
4 4
 
5 5
 [twig]
6 6
     git=http://github.com/fabpot/Twig.git
7
-    version=v1.1.2
7
+    version=v1.4.0
8 8
 
9 9
 [monolog]
10 10
     git=http://github.com/Seldaek/monolog.git
11
-    version=1.0.1
11
+    version=1.0.2
12 12
 
13 13
 [doctrine-common]
14 14
     git=http://github.com/doctrine/common.git
15
-    version=2.1.1
15
+    version=2.1.4
16 16
 
17 17
 [doctrine-dbal]
18 18
     git=http://github.com/doctrine/dbal.git
19
-    version=2.1.1
19
+    version=2.1.5
20 20
 
21 21
 [doctrine]
22 22
     git=http://github.com/doctrine/doctrine2.git
23
-    version=2.1.1
23
+    version=2.1.5
24 24
 
25 25
 [swiftmailer]
26 26
     git=http://github.com/swiftmailer/swiftmailer.git
27
-    version=v4.1.1
27
+    version=v4.1.4
28 28
 
29 29
 [assetic]
30 30
     git=http://github.com/kriswallsmith/assetic.git
31
-    version=v1.0.1
31
+    version=v1.0.2
32 32
 
33 33
 [twig-extensions]
34 34
     git=http://github.com/fabpot/Twig-extensions.git
@@ -40,14 +40,17 @@
40 40
 [SensioFrameworkExtraBundle]
41 41
     git=http://github.com/sensio/SensioFrameworkExtraBundle.git
42 42
     target=/bundles/Sensio/Bundle/FrameworkExtraBundle
43
+    version=origin/2.0
43 44
 
44 45
 [JMSSecurityExtraBundle]
45 46
     git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
46 47
     target=/bundles/JMS/SecurityExtraBundle
48
+    version=origin/1.0.x
47 49
 
48 50
 [SensioDistributionBundle]
49 51
     git=http://github.com/sensio/SensioDistributionBundle.git
50 52
     target=/bundles/Sensio/Bundle/DistributionBundle
53
+    version=origin/2.0
51 54
 
52 55
 [SensioGeneratorBundle]
53 56
     git=http://github.com/sensio/SensioGeneratorBundle.git
@@ -56,8 +59,15 @@
56 59
 [AsseticBundle]
57 60
     git=http://github.com/symfony/AsseticBundle.git
58 61
     target=/bundles/Symfony/Bundle/AsseticBundle
59
-    version=v1.0.0
62
+    version=v1.0.1
60 63
 
61 64
 [FOSUserBundle]
62 65
     git=git://github.com/FriendsOfSymfony/FOSUserBundle.git
63 66
     target=bundles/FOS/UserBundle
67
+
68
+[doctrine-fixtures]
69
+    git=http://github.com/doctrine/data-fixtures.git
70
+
71
+[DoctrineFixturesBundle]
72
+    git=http://github.com/symfony/DoctrineFixturesBundle.git
73
+    target=/bundles/Symfony/Bundle/DoctrineFixturesBundle

+ 0 - 1
src/Muzich/CoreBundle/Tests/Controller/IndexControllerTest.php Ver arquivo

@@ -183,7 +183,6 @@ class IndexControllerTest extends FunctionalTest
183 183
     $this->isResponseRedirection();
184 184
     $this->followRedirection();
185 185
     $this->isResponseSuccess();
186
-    $this->exist('html:contains("'.$bux->getEmail().'")');
187 186
     
188 187
     // On se rend sur le lien envoyé dans le mail
189 188
     $this->crawler = $this->client->request('GET', $url);

+ 20 - 0
src/Muzich/UserBundle/Controller/ResettingController.php Ver arquivo

@@ -26,6 +26,26 @@ class ResettingController extends BaseResettingController
26 26
       return $this->container->get('router')->generate('my_account');
27 27
   }
28 28
   
29
+  /**
30
+   * Tell the user to check his email provider
31
+   * Réécriture de la fonction, il manque 'user' pour le template
32
+   */
33
+  public function checkEmailAction()
34
+  {
35
+    $session = $this->container->get('session');
36
+    $email = $session->get(static::SESSION_EMAIL);
37
+    $session->remove(static::SESSION_EMAIL);
38
+
39
+    if (empty($email)) {
40
+      // the user does not come from the sendEmail action
41
+      return new RedirectResponse($this->container->get('router')->generate('fos_user_resetting_request'));
42
+    }
43
+
44
+    return $this->container->get('templating')->renderResponse('FOSUserBundle:Resetting:checkEmail.html.'.$this->getEngine(), array(
45
+      'email' => $email, 'user' => $this->container->get('security.context')->getToken()->getUser()
46
+    ));
47
+  }
48
+  
29 49
 }
30 50
 
31 51
 ?>

+ 1 - 1
src/Muzich/UserBundle/DataFixtures/ORM/LoadUserData.php Ver arquivo

@@ -43,7 +43,7 @@ class LoadUserData extends AbstractFixture implements OrderedFixtureInterface, C
43 43
     $user->setUsername($username);
44 44
     $user->setEmail($email);
45 45
     $user->setSuperAdmin($superadmin);
46
-    $user->setAlgorithm('sha512');
46
+    //$user->setAlgorithm('sha512');
47 47
     
48 48
     $user->setPlainPassword($password_raw);
49 49
     $user->setEnabled($enabled);

+ 24 - 178
src/Muzich/UserBundle/Entity/UserManager.php Ver arquivo

@@ -6,184 +6,30 @@
6 6
 
7 7
 namespace Muzich\UserBundle\Entity;
8 8
 
9
-use Doctrine\ORM\EntityManager;
10
-use FOS\UserBundle\Model\UserInterface;
11
-use FOS\UserBundle\Model\UserManager as BaseUserManager;
12
-use FOS\UserBundle\Util\CanonicalizerInterface;
13 9
 use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
14
-use Symfony\Component\Validator\Constraint;
10
+use FOS\UserBundle\Util\CanonicalizerInterface;
11
+use Doctrine\ORM\EntityManager;
12
+use FOS\UserBundle\Entity\UserManager as UserManagerBase;
15 13
 
16
-class UserManager extends BaseUserManager
14
+/**
15
+ */
16
+class UserManager extends UserManagerBase
17 17
 {
18
-    protected $em;
19
-    protected $class;
20
-    protected $repository;
21
-
22
-    /**
23
-     * Constructor.
24
-     *
25
-     * @param EncoderFactoryInterface $encoderFactory
26
-     * @param string                  $algorithm
27
-     * @param CanonicalizerInterface  $usernameCanonicalizer
28
-     * @param CanonicalizerInterface  $emailCanonicalizer
29
-     * @param EntityManager           $em
30
-     * @param string                  $class
31
-     */
32
-    public function __construct(EncoderFactoryInterface $encoderFactory, $algorithm, CanonicalizerInterface $usernameCanonicalizer, CanonicalizerInterface $emailCanonicalizer, EntityManager $em, $class)
33
-    {
34
-        parent::__construct($encoderFactory, $algorithm, $usernameCanonicalizer, $emailCanonicalizer);
35
-        
36
-        $this->em = $em;
37
-        $this->repository = $em->getRepository($class);
38
-
39
-        $metadata = $em->getClassMetadata($class);
40
-        $this->class = $metadata->name;
41
-
42
-        // Slug stuff
43
-        $evm = new \Doctrine\Common\EventManager();
44
-        // ORM and ODM
45
-        $sluggableListener = new \Gedmo\Sluggable\SluggableListener();
46
-        $evm->addEventSubscriber($sluggableListener);
47
-        // now this event manager should be passed to entity manager constructor
48
-        $this->em->getEventManager()->addEventSubscriber($sluggableListener);
49
-    }
50
-
51
-    /**
52
-     * {@inheritDoc}
53
-     */
54
-    public function deleteUser(UserInterface $user)
55
-    {
56
-        $this->em->remove($user);
57
-        $this->em->flush();
58
-    }
59
-
60
-    /**
61
-     * {@inheritDoc}
62
-     */
63
-    public function getClass()
64
-    {
65
-        return $this->class;
66
-    }
67
-
68
-    /**
69
-     * {@inheritDoc}
70
-     */
71
-    public function findUserBy(array $criteria)
72
-    {
73
-        return $this->repository->findOneBy($criteria);
74
-    }
75
-
76
-    /**
77
-     * {@inheritDoc}
78
-     */
79
-    public function findUsers()
80
-    {
81
-        return $this->repository->findAll();
82
-    }
83
-
84
-    /**
85
-     * {@inheritDoc}
86
-     */
87
-    public function reloadUser(UserInterface $user)
88
-    {
89
-        $this->em->refresh($user);
90
-    }
91
-
92
-    /**
93
-     * Updates a user.
94
-     *
95
-     * @param UserInterface $user
96
-     * @param Boolean $andFlush Whether to flush the changes (default true)
97
-     */
98
-    public function updateUser(UserInterface $user, $andFlush = true)
99
-    {
100
-        $this->updateCanonicalFields($user);
101
-        $this->updatePassword($user);
102
-
103
-        $this->em->persist($user);
104
-        if ($andFlush) {
105
-            $this->em->flush();
106
-        }
107
-    }
108
-
109
-    /**
110
-     * {@inheritDoc}
111
-     */
112
-    public function validateUnique(UserInterface $value, Constraint $constraint)
113
-    {
114
-        // Since we probably want to validate the canonical fields,
115
-        // we'd better make sure we have them.
116
-        $this->updateCanonicalFields($value);
117
-
118
-        $fields = array_map('trim', explode(',', $constraint->property));
119
-        $users = $this->findConflictualUsers($value, $fields);
120
-
121
-        // there is no conflictual user
122
-        if (empty($users)) {
123
-            return true;
124
-        }
125
-
126
-        // there is no conflictual user which is not the same as the value
127
-        if ($this->anyIsUser($value, $users)) {
128
-            return true;
129
-        }
130
-
131
-        return false;
132
-    }
133
-
134
-    /**
135
-     * Indicates whether the given user and all compared objects correspond to the same record.
136
-     *
137
-     * @param UserInterface $user
138
-     * @param array $comparisons
139
-     * @return Boolean
140
-     */
141
-    protected function anyIsUser($user, array $comparisons)
142
-    {
143
-        foreach ($comparisons as $comparison) {
144
-            if (!$user->isUser($comparison)) {
145
-                return false;
146
-            }
147
-        }
148
-
149
-        return true;
150
-    }
151
-
152
-    /**
153
-     * Gets conflictual users for the given user and constraint.
154
-     *
155
-     * @param UserInterface $value
156
-     * @param array $fields
157
-     * @return array
158
-     */
159
-    protected function findConflictualUsers($value, array $fields)
160
-    {
161
-        return $this->repository->findBy($this->getCriteria($value, $fields));
162
-    }
163
-
164
-    /**
165
-     * Gets the criteria used to find conflictual entities.
166
-     *
167
-     * @param UserInterface $value
168
-     * @param array $constraint
169
-     * @return array
170
-     */
171
-    protected function getCriteria($value, array $fields)
172
-    {
173
-        $classMetadata = $this->em->getClassMetadata($this->class);
174
-
175
-        $criteria = array();
176
-        foreach ($fields as $field) {
177
-            if (!$classMetadata->hasField($field)) {
178
-                throw new \InvalidArgumentException(sprintf('The "%s" class metadata does not have any "%s" field or association mapping.', $this->class, $field));
179
-            }
180
-
181
-            $criteria[$field] = $classMetadata->getFieldValue($value, $field);
182
-        }
183
-
184
-        return $criteria;
185
-    }
186
-}
187
-
188
-
189
-?>
18
+  /**
19
+   * Constructor.
20
+   */
21
+  public function __construct(EncoderFactoryInterface $encoderFactory, CanonicalizerInterface $usernameCanonicalizer, CanonicalizerInterface $emailCanonicalizer, EntityManager $em, $class)
22
+  {
23
+    parent::__construct($encoderFactory, $usernameCanonicalizer, $emailCanonicalizer, $em, $class);
24
+    
25
+    // Slug stuff
26
+    $evm = new \Doctrine\Common\EventManager();
27
+    // ORM and ODM
28
+    $sluggableListener = new \Gedmo\Sluggable\SluggableListener();
29
+    $evm->addEventSubscriber($sluggableListener);
30
+    // now this event manager should be passed to entity manager constructor
31
+
32
+    $this->em->getEventManager()->addEventSubscriber($sluggableListener);
33
+  }
34
+
35
+}

+ 0 - 0
vendor/assetic/.gitignore Ver arquivo


+ 9 - 0
vendor/assetic/CHANGELOG Ver arquivo

@@ -1,3 +1,12 @@
1
+1.0.2 (August 26, 2011)
2
+-----------------------
3
+
4
+ * Twig 1.2 compatibility
5
+ * Fixed filtering of large LessCSS assets
6
+ * Fixed escaping of commands on Windows
7
+ * Misc fixes to Compass filter
8
+ * Removed default CssEmbed charset
9
+
1 10
 1.0.1 (July 15, 2011)
2 11
 ---------------------
3 12
 

+ 0 - 0
vendor/assetic/README.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/en/build.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/en/concepts.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/en/define.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/en/index.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/en/introduction.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/ja/build.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/ja/concepts.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/ja/define.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/ja/index.md Ver arquivo


+ 0 - 0
vendor/assetic/docs/ja/introduction.md Ver arquivo


+ 0 - 0
vendor/assetic/phpunit.xml.dist Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetCache.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetCollection.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetInterface.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetReference.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/BaseAsset.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/FileAsset.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/GlobAsset.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/HttpAsset.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Asset/StringAsset.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/AssetManager.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/AssetWriter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Cache/CacheInterface.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Cache/ConfigCache.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Cache/ExpiringCache.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Cache/FilesystemCache.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticExtension.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticNode.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php Ver arquivo


+ 4 - 1
vendor/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php Ver arquivo

@@ -61,7 +61,10 @@ class TwigFormulaLoader implements FormulaLoaderInterface
61 61
                 ),
62 62
             );
63 63
         } elseif ($node instanceof \Twig_Node_Expression_Function) {
64
-            $name = $node->getNode('name')->getAttribute('name');
64
+            $name = version_compare(\Twig_Environment::VERSION, '1.2.0-DEV', '<')
65
+                ? $node->getNode('name')->getAttribute('name')
66
+                : $node->getAttribute('name');
67
+
65 68
             if ($this->twig->getFunction($name) instanceof AsseticFilterFunction) {
66 69
                 $arguments = array();
67 70
                 foreach ($node->getNode('arguments') as $argument) {

+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/TwigResource.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/AssetFactory.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/LazyAssetManager.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/FormulaLoaderInterface.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/DirectoryResource.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/FileResource.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/ResourceInterface.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Worker/WorkerInterface.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/BaseCssFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CallablesFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CoffeeScriptFilter.php Ver arquivo


+ 10 - 14
vendor/assetic/src/Assetic/Filter/CompassFilter.php Ver arquivo

@@ -32,7 +32,6 @@ class CompassFilter implements FilterInterface
32 32
     private $noCache;
33 33
 
34 34
     // compass options
35
-    private $config;
36 35
     private $force;
37 36
     private $style;
38 37
     private $quiet;
@@ -227,7 +226,7 @@ class CompassFilter implements FilterInterface
227 226
         if (count($optionsConfig)) {
228 227
             $config = array();
229 228
             foreach ($this->plugins as $plugin) {
230
-                $config[] = sprintf("require '%s'", addcslahes($plugin, '\\'));
229
+                $config[] = sprintf("require '%s'", addcslashes($plugin, '\\'));
231 230
             }
232 231
             foreach ($optionsConfig as $name => $value) {
233 232
                 if (!is_array($value)) {
@@ -237,13 +236,9 @@ class CompassFilter implements FilterInterface
237 236
                 }
238 237
             }
239 238
 
240
-            $config = implode("\n", $config)."\n";
241
-            $this->config = tempnam($tempDir, 'assetic_compass');
242
-            file_put_contents($this->config, $config);
243
-        }
244
-
245
-        if ($this->config) {
246
-            $pb->add('--config')->add($this->config);
239
+            $configFile = tempnam($tempDir, 'assetic_compass');
240
+            file_put_contents($configFile, implode("\n", $config)."\n");
241
+            $pb->add('--config')->add($configFile);
247 242
         }
248 243
 
249 244
         $pb->add('--sass-dir')->add('')->add('--css-dir')->add('');
@@ -276,18 +271,19 @@ class CompassFilter implements FilterInterface
276 271
 
277 272
         if (0 < $code) {
278 273
             unlink($input);
279
-            if (is_file($this->config)) {
280
-                unlink($this->config);
274
+            if (isset($configFile)) {
275
+                unlink($configFile);
281 276
             }
282
-            throw new \RuntimeException($proc->getErrorOutput());
277
+
278
+            throw new \RuntimeException($proc->getErrorOutput() ?: $proc->getOutput());
283 279
         }
284 280
 
285 281
         $asset->setContent(file_get_contents($output));
286 282
 
287 283
         unlink($input);
288 284
         unlink($output);
289
-        if (is_file($this->config)) {
290
-            unlink($this->config);
285
+        if (isset($configFile)) {
286
+            unlink($configFile);
291 287
         }
292 288
     }
293 289
 

+ 1 - 1
vendor/assetic/src/Assetic/Filter/CssEmbedFilter.php Ver arquivo

@@ -24,7 +24,7 @@ class CssEmbedFilter implements FilterInterface
24 24
 {
25 25
     private $jarPath;
26 26
     private $javaPath;
27
-    private $charset = 'utf-8';
27
+    private $charset;
28 28
     private $mhtml; // Enable MHTML mode.
29 29
     private $mhtmlRoot; // Use <root> as the MHTML root for the file.
30 30
     private $root; // Prepends <root> to all relative URLs.

+ 0 - 0
vendor/assetic/src/Assetic/Filter/CssImportFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CssMinFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CssRewriteFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/FilterCollection.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/FilterInterface.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/JpegoptimFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/JpegtranFilter.php Ver arquivo


+ 0 - 1
vendor/assetic/src/Assetic/Filter/LessFilter.php Ver arquivo

@@ -56,7 +56,6 @@ new(less.Parser)(%s).parse(%s, function(e, tree) {
56 56
 
57 57
     try {
58 58
         sys.print(tree.toCSS(%s));
59
-        process.exit(0);
60 59
     } catch (e) {
61 60
         less.writeError(e);
62 61
         process.exit(3);

+ 0 - 0
vendor/assetic/src/Assetic/Filter/LessphpFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/OptiPngFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/PackagerFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/PngoutFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/Sass/SassFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/Sass/ScssFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/SprocketsFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/StylusFilter.php Ver arquivo


+ 16 - 5
vendor/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php Ver arquivo

@@ -64,8 +64,6 @@ abstract class BaseCompressorFilter implements FilterInterface
64 64
             ->add($this->javaPath)
65 65
             ->add('-jar')
66 66
             ->add($this->jarPath)
67
-            ->add('--type')
68
-            ->add($type)
69 67
         ;
70 68
 
71 69
         foreach ($options as $option) {
@@ -80,18 +78,31 @@ abstract class BaseCompressorFilter implements FilterInterface
80 78
             $pb->add('--line-break')->add($this->lineBreak);
81 79
         }
82 80
 
83
-        $input = tempnam(sys_get_temp_dir(), 'assetic_yui_compressor');
81
+        // input and output files
82
+        $tempDir = realpath(sys_get_temp_dir());
83
+        $hash = substr(sha1(time().rand(11111, 99999)), 0, 7);
84
+        $input = $tempDir.DIRECTORY_SEPARATOR.$hash.'.'.$type;
85
+        $output = $tempDir.DIRECTORY_SEPARATOR.$hash.'-min.'.$type;
84 86
         file_put_contents($input, $content);
85
-        $pb->add($input);
87
+        $pb->add('-o')->add($output)->add($input);
86 88
 
87 89
         $proc = $pb->getProcess();
88 90
         $code = $proc->run();
89 91
         unlink($input);
90 92
 
91 93
         if (0 < $code) {
94
+            if (file_exists($output)) {
95
+                unlink($output);
96
+            }
97
+
92 98
             throw new \RuntimeException($proc->getErrorOutput());
99
+        } elseif (!file_exists($output)) {
100
+            throw new \RuntimeException('Error creating output file.');
93 101
         }
94 102
 
95
-        return $proc->getOutput();
103
+        $retval = file_get_contents($output);
104
+        unlink($output);
105
+
106
+        return $retval;
96 107
     }
97 108
 }

+ 0 - 0
vendor/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php Ver arquivo


+ 0 - 0
vendor/assetic/src/Assetic/FilterManager.php Ver arquivo


+ 2 - 2
vendor/assetic/src/Assetic/Util/Process.php Ver arquivo

@@ -189,13 +189,13 @@ class Process
189 189
             $this->status = proc_get_status($process);
190 190
         }
191 191
 
192
-        proc_close($process);
192
+        $exitcode = proc_close($process);
193 193
 
194 194
         if ($this->status['signaled']) {
195 195
             throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->status['stopsig']));
196 196
         }
197 197
 
198
-        return $this->exitcode = $this->status['exitcode'];
198
+        return $this->exitcode = $this->status['running'] ? $exitcode : $this->status['exitcode'];
199 199
     }
200 200
 
201 201
     /**

+ 25 - 9
vendor/assetic/src/Assetic/Util/ProcessBuilder.php Ver arquivo

@@ -18,7 +18,7 @@ namespace Assetic\Util;
18 18
  */
19 19
 class ProcessBuilder
20 20
 {
21
-    private $parts = array();
21
+    private $arguments = array();
22 22
     private $cwd;
23 23
     private $env;
24 24
     private $stdin;
@@ -26,9 +26,14 @@ class ProcessBuilder
26 26
     private $options = array();
27 27
     private $inheritEnv = false;
28 28
 
29
-    public function add($part)
29
+    /**
30
+     * Adds an unescaped argument to the command string.
31
+     *
32
+     * @param string $argument A command argument
33
+     */
34
+    public function add($argument)
30 35
     {
31
-        $this->parts[] = $part;
36
+        $this->arguments[] = $argument;
32 37
 
33 38
         return $this;
34 39
     }
@@ -81,16 +86,27 @@ class ProcessBuilder
81 86
 
82 87
     public function getProcess()
83 88
     {
84
-        if (!count($this->parts)) {
85
-            throw new \LogicException('You must add() command parts before calling getProcess().');
89
+        if (!count($this->arguments)) {
90
+            throw new \LogicException('You must add() command arguments before calling getProcess().');
86 91
         }
87 92
 
88
-        $parts = $this->parts;
89
-        $cmd = array_shift($parts);
90
-        $script = escapeshellcmd($cmd).' '.implode(' ', array_map('escapeshellarg', $parts));
93
+        $options = $this->options;
91 94
 
95
+        if (defined('PHP_WINDOWS_MAJOR_VERSION')) {
96
+            $options += array('bypass_shell' => true);
97
+
98
+            $args = $this->arguments;
99
+            $cmd = array_shift($args);
100
+
101
+            $script = '"'.$cmd.'"';
102
+            if ($args) {
103
+                $script .= ' '.implode(' ', array_map('escapeshellarg', $parts));
104
+            }
105
+        } else {
106
+            $script = implode(' ', array_map('escapeshellarg', $this->arguments));
107
+        }
92 108
         $env = $this->inheritEnv ? ($this->env ?: array()) + $_ENV : $this->env;
93 109
 
94
-        return new Process($script, $this->cwd, $env, $this->stdin, $this->timeout, $this->options);
110
+        return new Process($script, $this->cwd, $env, $this->stdin, $this->timeout, $options);
95 111
     }
96 112
 }

+ 0 - 0
vendor/assetic/src/Assetic/Util/TraversableString.php Ver arquivo


+ 0 - 0
vendor/assetic/src/functions.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/AssetCacheTest.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/AssetCollectionTest.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/AssetReferenceTest.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/FileAssetTest.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/GlobAssetTest.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/HttpAssetTest.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/StringAssetTest.php Ver arquivo


+ 0 - 0
vendor/assetic/tests/Assetic/Test/AssetManagerTest.php Ver arquivo


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff