Browse Source

Uppgrade de symfony et des bundles associés.

bastien 13 years ago
parent
commit
fba8fd7eb9
100 changed files with 268 additions and 250 deletions
  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 View File

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 View File

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

+ 4 - 4
app/bootstrap.php.cache View File

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

+ 7 - 0
app/config/security.yml View File

1
 imports:
1
 imports:
2
     - { resource: "@MuzichCoreBundle/Resources/config/security.yml" }
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
 #security:
11
 #security:
5
 #    encoders:
12
 #    encoders:
6
 #        Symfony\Component\Security\Core\User\User: plaintext
13
 #        Symfony\Component\Security\Core\User\User: plaintext

+ 11 - 9
deps View File

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

+ 13 - 14
deps.lock View File

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
 metadata 8717ad2a5689480765d9ffafe925cd8a2457e582
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~ View File

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

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

+ 20 - 0
src/Muzich/UserBundle/Controller/ResettingController.php View File

26
       return $this->container->get('router')->generate('my_account');
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 View File

43
     $user->setUsername($username);
43
     $user->setUsername($username);
44
     $user->setEmail($email);
44
     $user->setEmail($email);
45
     $user->setSuperAdmin($superadmin);
45
     $user->setSuperAdmin($superadmin);
46
-    $user->setAlgorithm('sha512');
46
+    //$user->setAlgorithm('sha512');
47
     
47
     
48
     $user->setPlainPassword($password_raw);
48
     $user->setPlainPassword($password_raw);
49
     $user->setEnabled($enabled);
49
     $user->setEnabled($enabled);

+ 24 - 178
src/Muzich/UserBundle/Entity/UserManager.php View File

6
 
6
 
7
 namespace Muzich\UserBundle\Entity;
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
 use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
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 View File


+ 9 - 0
vendor/assetic/CHANGELOG View File

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
 1.0.1 (July 15, 2011)
10
 1.0.1 (July 15, 2011)
2
 ---------------------
11
 ---------------------
3
 
12
 

+ 0 - 0
vendor/assetic/README.md View File


+ 0 - 0
vendor/assetic/docs/en/build.md View File


+ 0 - 0
vendor/assetic/docs/en/concepts.md View File


+ 0 - 0
vendor/assetic/docs/en/define.md View File


+ 0 - 0
vendor/assetic/docs/en/index.md View File


+ 0 - 0
vendor/assetic/docs/en/introduction.md View File


+ 0 - 0
vendor/assetic/docs/ja/build.md View File


+ 0 - 0
vendor/assetic/docs/ja/concepts.md View File


+ 0 - 0
vendor/assetic/docs/ja/define.md View File


+ 0 - 0
vendor/assetic/docs/ja/index.md View File


+ 0 - 0
vendor/assetic/docs/ja/introduction.md View File


+ 0 - 0
vendor/assetic/phpunit.xml.dist View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetCache.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetCollection.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetInterface.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/AssetReference.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/BaseAsset.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/FileAsset.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/GlobAsset.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/HttpAsset.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Asset/StringAsset.php View File


+ 0 - 0
vendor/assetic/src/Assetic/AssetManager.php View File


+ 0 - 0
vendor/assetic/src/Assetic/AssetWriter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Cache/CacheInterface.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Cache/ConfigCache.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Cache/ExpiringCache.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Cache/FilesystemCache.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticExtension.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticNode.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php View File


+ 4 - 1
vendor/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php View File

61
                 ),
61
                 ),
62
             );
62
             );
63
         } elseif ($node instanceof \Twig_Node_Expression_Function) {
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
             if ($this->twig->getFunction($name) instanceof AsseticFilterFunction) {
68
             if ($this->twig->getFunction($name) instanceof AsseticFilterFunction) {
66
                 $arguments = array();
69
                 $arguments = array();
67
                 foreach ($node->getNode('arguments') as $argument) {
70
                 foreach ($node->getNode('arguments') as $argument) {

+ 0 - 0
vendor/assetic/src/Assetic/Extension/Twig/TwigResource.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/AssetFactory.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/LazyAssetManager.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/FormulaLoaderInterface.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/DirectoryResource.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/FileResource.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/IteratorResourceInterface.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Resource/ResourceInterface.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Factory/Worker/WorkerInterface.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/BaseCssFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CallablesFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CoffeeScriptFilter.php View File


+ 10 - 14
vendor/assetic/src/Assetic/Filter/CompassFilter.php View File

32
     private $noCache;
32
     private $noCache;
33
 
33
 
34
     // compass options
34
     // compass options
35
-    private $config;
36
     private $force;
35
     private $force;
37
     private $style;
36
     private $style;
38
     private $quiet;
37
     private $quiet;
227
         if (count($optionsConfig)) {
226
         if (count($optionsConfig)) {
228
             $config = array();
227
             $config = array();
229
             foreach ($this->plugins as $plugin) {
228
             foreach ($this->plugins as $plugin) {
230
-                $config[] = sprintf("require '%s'", addcslahes($plugin, '\\'));
229
+                $config[] = sprintf("require '%s'", addcslashes($plugin, '\\'));
231
             }
230
             }
232
             foreach ($optionsConfig as $name => $value) {
231
             foreach ($optionsConfig as $name => $value) {
233
                 if (!is_array($value)) {
232
                 if (!is_array($value)) {
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
         $pb->add('--sass-dir')->add('')->add('--css-dir')->add('');
244
         $pb->add('--sass-dir')->add('')->add('--css-dir')->add('');
276
 
271
 
277
         if (0 < $code) {
272
         if (0 < $code) {
278
             unlink($input);
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
         $asset->setContent(file_get_contents($output));
281
         $asset->setContent(file_get_contents($output));
286
 
282
 
287
         unlink($input);
283
         unlink($input);
288
         unlink($output);
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 View File

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

+ 0 - 0
vendor/assetic/src/Assetic/Filter/CssImportFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CssMinFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/CssRewriteFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/FilterCollection.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/FilterInterface.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/JpegoptimFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/JpegtranFilter.php View File


+ 0 - 1
vendor/assetic/src/Assetic/Filter/LessFilter.php View File

56
 
56
 
57
     try {
57
     try {
58
         sys.print(tree.toCSS(%s));
58
         sys.print(tree.toCSS(%s));
59
-        process.exit(0);
60
     } catch (e) {
59
     } catch (e) {
61
         less.writeError(e);
60
         less.writeError(e);
62
         process.exit(3);
61
         process.exit(3);

+ 0 - 0
vendor/assetic/src/Assetic/Filter/LessphpFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/OptiPngFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/PackagerFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/PngoutFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/Sass/SassFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/Sass/ScssFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/SprocketsFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/StylusFilter.php View File


+ 16 - 5
vendor/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php View File

64
             ->add($this->javaPath)
64
             ->add($this->javaPath)
65
             ->add('-jar')
65
             ->add('-jar')
66
             ->add($this->jarPath)
66
             ->add($this->jarPath)
67
-            ->add('--type')
68
-            ->add($type)
69
         ;
67
         ;
70
 
68
 
71
         foreach ($options as $option) {
69
         foreach ($options as $option) {
80
             $pb->add('--line-break')->add($this->lineBreak);
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
         file_put_contents($input, $content);
86
         file_put_contents($input, $content);
85
-        $pb->add($input);
87
+        $pb->add('-o')->add($output)->add($input);
86
 
88
 
87
         $proc = $pb->getProcess();
89
         $proc = $pb->getProcess();
88
         $code = $proc->run();
90
         $code = $proc->run();
89
         unlink($input);
91
         unlink($input);
90
 
92
 
91
         if (0 < $code) {
93
         if (0 < $code) {
94
+            if (file_exists($output)) {
95
+                unlink($output);
96
+            }
97
+
92
             throw new \RuntimeException($proc->getErrorOutput());
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 View File


+ 0 - 0
vendor/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php View File


+ 0 - 0
vendor/assetic/src/Assetic/FilterManager.php View File


+ 2 - 2
vendor/assetic/src/Assetic/Util/Process.php View File

189
             $this->status = proc_get_status($process);
189
             $this->status = proc_get_status($process);
190
         }
190
         }
191
 
191
 
192
-        proc_close($process);
192
+        $exitcode = proc_close($process);
193
 
193
 
194
         if ($this->status['signaled']) {
194
         if ($this->status['signaled']) {
195
             throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->status['stopsig']));
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 View File

18
  */
18
  */
19
 class ProcessBuilder
19
 class ProcessBuilder
20
 {
20
 {
21
-    private $parts = array();
21
+    private $arguments = array();
22
     private $cwd;
22
     private $cwd;
23
     private $env;
23
     private $env;
24
     private $stdin;
24
     private $stdin;
26
     private $options = array();
26
     private $options = array();
27
     private $inheritEnv = false;
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
         return $this;
38
         return $this;
34
     }
39
     }
81
 
86
 
82
     public function getProcess()
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
         $env = $this->inheritEnv ? ($this->env ?: array()) + $_ENV : $this->env;
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 View File


+ 0 - 0
vendor/assetic/src/functions.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/AssetCacheTest.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/AssetCollectionTest.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/AssetReferenceTest.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/FileAssetTest.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/GlobAssetTest.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/HttpAssetTest.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/Asset/StringAssetTest.php View File


+ 0 - 0
vendor/assetic/tests/Assetic/Test/AssetManagerTest.php View File


Some files were not shown because too many files changed in this diff