Jelajahi Sumber

Updating vendors

Julio Montoya 11 tahun lalu
induk
melakukan
a36c89bb3a
100 mengubah file dengan 4919 tambahan dan 3900 penghapusan
  1. 1 8
      vendor/alchemy/zippy/.travis.yml
  2. 10 0
      vendor/alchemy/zippy/CHANGELOG.md
  3. 1 1
      vendor/alchemy/zippy/README.md
  4. 2 1
      vendor/alchemy/zippy/composer.json
  5. 513 75
      vendor/alchemy/zippy/composer.lock
  6. 1 1
      vendor/alchemy/zippy/docs/source/index.rst
  7. 191 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AbstractAdapter.php
  8. 47 13
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AbstractBinaryAdapter.php
  9. 43 86
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AbstractTarAdapter.php
  10. 12 2
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AdapterContainer.php
  11. 7 7
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AdapterInterface.php
  12. 10 10
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/BSDTar/TarBSDTarAdapter.php
  13. 11 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/BSDTar/TarBz2BSDTarAdapter.php
  14. 11 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/BSDTar/TarGzBSDTarAdapter.php
  15. 11 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/GNUTar/TarBz2GNUTarAdapter.php
  16. 10 10
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/GNUTar/TarGNUTarAdapter.php
  17. 11 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/GNUTar/TarGzGNUTarAdapter.php
  18. 75 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/AbstractTarVersionProbe.php
  19. 24 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/BSDTarVersionProbe.php
  20. 24 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/GNUTarVersionProbe.php
  21. 26 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/VersionProbeInterface.php
  22. 24 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/ZipExtensionVersionProbe.php
  23. 96 0
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/ZipVersionProbe.php
  24. 44 54
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/ZipAdapter.php
  25. 8 18
      vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/ZipExtensionAdapter.php
  26. 0 4
      vendor/alchemy/zippy/src/Alchemy/Zippy/Parser/ParserFactory.php
  27. 1 2
      vendor/alchemy/zippy/src/Alchemy/Zippy/ProcessBuilder/ProcessBuilderFactory.php
  28. 9 3
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/RequestMapper.php
  29. 33 3
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/Resource.php
  30. 19 32
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/ResourceCollection.php
  31. 1 5
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/ResourceManager.php
  32. 1 1
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/TargetLocator.php
  33. 1 1
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/Teleporter/GuzzleTeleporter.php
  34. 1 1
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/Teleporter/TeleporterInterface.php
  35. 3 3
      vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/TeleporterContainer.php
  36. 79 0
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Functional/Add2ArchiveTest.php
  37. TEMPAT SAMPAH
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Functional/samples/morefiles/morephoto.jpg
  38. 2 1
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/AdapterContainerTest.php
  39. 24 0
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/AdapterTestCase.php
  40. 92 174
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/BSDTar/BSDTarAdapterWithOptionsTest.php
  41. 77 151
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/BSDTar/TarBSDTarAdapterTest.php
  42. 83 178
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/GNUTar/GNUTarAdapterWithOptionsTest.php
  43. 82 156
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/GNUTar/TarGNUTarAdapterTest.php
  44. 1 1
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/Resource/FileResourceTest.php
  45. 104 0
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/AbstractTarVersionProbeTest.php
  46. 21 0
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/BSDTarVersionProbeTest.php
  47. 21 0
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/GNUTarVersionProbeTest.php
  48. 24 0
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/ZipExtensionVersionProbeTest.php
  49. 143 0
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/ZipVersionProbeTest.php
  50. 74 82
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/ZipAdapterTest.php
  51. 22 8
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/ZipExtensionAdapterTest.php
  52. 2 2
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/FileStrategy/FileStrategyTestCase.php
  53. 4 1
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Parser/BSDTarOutputParserTest.php
  54. 8 27
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Resource/ResourceCollectionTest.php
  55. 55 11
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Resource/ResourceManagerTest.php
  56. 80 2
      vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/TestCase.php
  57. 1 1
      vendor/autoload.php
  58. 0 6
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/.gitignore
  59. 0 218
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/DependencyInjection/BcBootstrapExtension.php
  60. 0 53
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/DependencyInjection/Configuration.php
  61. 0 8
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Makefile
  62. 0 105
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/README.md
  63. 0 15
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/config/services.yml
  64. 0 553
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/views/Form/form_div_layout.html.twig
  65. 0 3
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/views/_html5shiv.html.twig
  66. 0 75
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Tests/Twig/BootstrapBadgeExtensionTest.php
  67. 0 88
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Tests/Twig/BootstrapIconExtensionTest.php
  68. 0 75
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Tests/Twig/BootstrapLabelExtensionTest.php
  69. 0 121
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Twig/BootstrapBadgeExtension.php
  70. 0 38
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/composer.json
  71. 0 1333
      vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/composer.lock
  72. 7 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/.gitignore
  73. 44 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/.scrutinizer.yml
  74. 5 1
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/.travis.yml
  75. 6 5
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/BraincraftedBootstrapBundle.php
  76. 0 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/CHANGELOG.md
  77. 29 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/CONTRIBUTING.md
  78. 113 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Command/GenerateCommand.php
  79. 91 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Command/InstallCommand.php
  80. 98 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Composer/ScriptHandler.php
  81. 132 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/DependencyInjection/AsseticConfiguration.php
  82. 179 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/DependencyInjection/BraincraftedBootstrapExtension.php
  83. 79 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/DependencyInjection/Configuration.php
  84. 40 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Extension/TypeSetterExtension.php
  85. 98 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Type/BootstrapCollectionType.php
  86. 97 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Type/FormActionsType.php
  87. 105 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Type/MoneyType.php
  88. 1 1
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/LICENSE
  89. 215 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/README.md
  90. 32 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/config/services/form.xml
  91. 17 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/config/services/session.xml
  92. 32 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/config/services/twig.xml
  93. 123 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/js/bc-bootstrap-collection.js
  94. 70 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/less/form.less
  95. 59 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Bootstrap/bootstrap.less.twig
  96. 864 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Form/bootstrap.html.twig
  97. 32 19
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Menu/bootstrap.html.twig
  98. 32 47
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Pagination/bootstrap.html.twig
  99. 34 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/flash.html.twig
  100. 4 0
      vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/ie8-support.html.twig

+ 1 - 8
vendor/alchemy/zippy/.travis.yml

@@ -2,7 +2,6 @@ language: php
 
 before_script:
   - sudo apt-get install bsdtar zip
-#  - sudo easy_install sphinx
   - composer install --dev --prefer-source
 
 env:
@@ -17,15 +16,9 @@ env:
 
 php:
   - 5.3.3
-#  - 5.3
   - 5.4
   - 5.5
 
-matrix:
-  allow_failures:
-    - php: 5.5
-
 script:
-  - phpunit -v --coverage-text
+  - phpunit -v
   - phpunit -v -c phpunit-functional.xml.dist
-#  - sh -c "cd docs && make clean && make html"

+ 10 - 0
vendor/alchemy/zippy/CHANGELOG.md

@@ -1,6 +1,16 @@
 CHANGELOG
 ---------
 
+* 0.2.0 (04-04-2014)
+
+  * Fix the use of "teleporter" for local files
+  * Fix adding a new file using tar adapter ( --append option )
+  * Allow all adapters to be instantiated even if they are not supported
+  * Move support detection logic in distinct classes
+  * Add support for archives relative path
+  * Use Symfony Process working directory instead of changing working directory
+  * Archive in context when a single resource is added
+
 * 0.1.1 (04-12-2013)
 
   * Throw exception in case chdir failed

+ 1 - 1
vendor/alchemy/zippy/README.md

@@ -29,7 +29,7 @@ Which brings support to file types
 use Alchemy\Zippy\Zippy;
 
 $zippy = Zippy::load();
-$zippy->create('archive.zip');
+$zippy->create('archive.zip', '/path/to/folder');
 
 $archive = $zippy->open('build.tar');
 

+ 2 - 1
vendor/alchemy/zippy/composer.json

@@ -21,6 +21,7 @@
     },
     "require-dev": {
         "ext-zip"              : "*",
+        "phpunit/phpunit"      : "~3.7",
         "symfony/finder"       : "~2.0",
         "sami/sami"            : "dev-master@dev"
     },
@@ -34,7 +35,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-master": "0.1.x-dev"
+            "dev-master": "0.2.x-dev"
         }
     }
 }

+ 513 - 75
vendor/alchemy/zippy/composer.lock

@@ -1,5 +1,9 @@
 {
-    "hash": "f98b22249cdee127bba841fb11a5c89e",
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
+    ],
+    "hash": "35caa45c80a3b84aae65b0ce71d21510",
     "packages": [
         {
             "name": "doctrine/collections",
@@ -70,21 +74,21 @@
         },
         {
             "name": "guzzle/guzzle",
-            "version": "v3.3.1",
+            "version": "v3.7.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "v3.3.1"
+                "reference": "b170b028c6bb5799640e46c8803015b0f9a45ed9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/v3.3.1",
-                "reference": "v3.3.1",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b170b028c6bb5799640e46c8803015b0f9a45ed9",
+                "reference": "b170b028c6bb5799640e46c8803015b0f9a45ed9",
                 "shasum": ""
             },
             "require": {
                 "ext-curl": "*",
-                "php": ">=5.3.2",
+                "php": ">=5.3.3",
                 "symfony/event-dispatcher": ">=2.1"
             },
             "replace": {
@@ -115,16 +119,15 @@
                 "doctrine/cache": "*",
                 "monolog/monolog": "1.*",
                 "phpunit/phpunit": "3.7.*",
+                "psr/log": "1.0.*",
                 "symfony/class-loader": "*",
-                "zend/zend-cache1": "1.12",
-                "zend/zend-log1": "1.12",
                 "zendframework/zend-cache": "2.0.*",
                 "zendframework/zend-log": "2.0.*"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "3.3-dev"
+                    "dev-master": "3.7-dev"
                 }
             },
             "autoload": {
@@ -159,7 +162,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2013-03-10 23:05:38"
+            "time": "2013-10-02 20:47:00"
         },
         {
             "name": "pimple/pimple",
@@ -167,12 +170,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/fabpot/Pimple.git",
-                "reference": "v1.0.2"
+                "reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/fabpot/Pimple/zipball/v1.0.2",
-                "reference": "v1.0.2",
+                "url": "https://api.github.com/repos/fabpot/Pimple/zipball/ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
+                "reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
                 "shasum": ""
             },
             "require": {
@@ -209,33 +212,33 @@
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v2.2.0",
+            "version": "v2.3.6",
             "target-dir": "Symfony/Component/EventDispatcher",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/EventDispatcher.git",
-                "reference": "v2.2.0-RC3"
+                "reference": "7fc72a7a346a1887d3968cc1ce5642a15cd182e9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.0-RC3",
-                "reference": "v2.2.0-RC3",
+                "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/7fc72a7a346a1887d3968cc1ce5642a15cd182e9",
+                "reference": "7fc72a7a346a1887d3968cc1ce5642a15cd182e9",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3"
             },
             "require-dev": {
-                "symfony/dependency-injection": ">=2.0,<3.0"
+                "symfony/dependency-injection": "~2.0"
             },
             "suggest": {
-                "symfony/dependency-injection": "2.2.*",
-                "symfony/http-kernel": "2.2.*"
+                "symfony/dependency-injection": "",
+                "symfony/http-kernel": ""
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2-dev"
+                    "dev-master": "2.3-dev"
                 }
             },
             "autoload": {
@@ -259,21 +262,21 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "http://symfony.com",
-            "time": "2013-02-11 11:26:43"
+            "time": "2013-09-19 09:45:20"
         },
         {
             "name": "symfony/filesystem",
-            "version": "v2.2.0",
+            "version": "v2.3.6",
             "target-dir": "Symfony/Component/Filesystem",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Filesystem.git",
-                "reference": "v2.2.0-RC3"
+                "reference": "2b8995042086c5552c94d33b5553c492e9cfc00e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Filesystem/zipball/v2.2.0-RC3",
-                "reference": "v2.2.0-RC3",
+                "url": "https://api.github.com/repos/symfony/Filesystem/zipball/2b8995042086c5552c94d33b5553c492e9cfc00e",
+                "reference": "2b8995042086c5552c94d33b5553c492e9cfc00e",
                 "shasum": ""
             },
             "require": {
@@ -282,7 +285,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2-dev"
+                    "dev-master": "2.3-dev"
                 }
             },
             "autoload": {
@@ -306,21 +309,21 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "http://symfony.com",
-            "time": "2013-01-17 15:25:59"
+            "time": "2013-09-19 09:45:20"
         },
         {
             "name": "symfony/process",
-            "version": "v2.2.0",
+            "version": "v2.3.6",
             "target-dir": "Symfony/Component/Process",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Process.git",
-                "reference": "v2.2.0-RC3"
+                "reference": "81191e354fe9dad0451036ccf0fdf283649d3f1e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Process/zipball/v2.2.0-RC3",
-                "reference": "v2.2.0-RC3",
+                "url": "https://api.github.com/repos/symfony/Process/zipball/81191e354fe9dad0451036ccf0fdf283649d3f1e",
+                "reference": "81191e354fe9dad0451036ccf0fdf283649d3f1e",
                 "shasum": ""
             },
             "require": {
@@ -329,7 +332,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2-dev"
+                    "dev-master": "2.3-dev"
                 }
             },
             "autoload": {
@@ -353,28 +356,84 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "http://symfony.com",
-            "time": "2013-02-18 21:28:10"
+            "time": "2013-10-09 21:17:57"
         }
     ],
     "packages-dev": [
+        {
+            "name": "michelf/php-markdown",
+            "version": "1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/michelf/php-markdown.git",
+                "reference": "fcdd3e0781ae40c2b9847874e0755ff4f5559688"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/michelf/php-markdown/zipball/fcdd3e0781ae40c2b9847874e0755ff4f5559688",
+                "reference": "fcdd3e0781ae40c2b9847874e0755ff4f5559688",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-lib": "1.3.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Michelf": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Michel Fortin",
+                    "email": "michel.fortin@michelf.ca",
+                    "homepage": "http://michelf.ca/",
+                    "role": "Developer"
+                },
+                {
+                    "name": "John Gruber",
+                    "homepage": "http://daringfireball.net/"
+                }
+            ],
+            "description": "PHP Markdown",
+            "homepage": "http://michelf.ca/projects/php-markdown/",
+            "keywords": [
+                "markdown"
+            ],
+            "time": "2013-04-11 18:53:11"
+        },
         {
             "name": "nikic/php-parser",
-            "version": "v0.9.3",
+            "version": "v0.9.4",
             "source": {
                 "type": "git",
-                "url": "https://github.com/nikic/PHP-Parser",
-                "reference": "v0.9.3"
+                "url": "https://github.com/nikic/PHP-Parser.git",
+                "reference": "1e5e280ae88a27effa2ae4aa2bd088494ed8594f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://github.com/nikic/PHP-Parser/archive/v0.9.3.zip",
-                "reference": "v0.9.3",
+                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1e5e280ae88a27effa2ae4aa2bd088494ed8594f",
+                "reference": "1e5e280ae88a27effa2ae4aa2bd088494ed8594f",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.2"
             },
             "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "0.9-dev"
+                }
+            },
             "autoload": {
                 "psr-0": {
                     "PHPParser": "lib/"
@@ -394,7 +453,374 @@
                 "parser",
                 "php"
             ],
-            "time": "2012-11-22 18:54:05"
+            "time": "2013-08-25 17:11:40"
+        },
+        {
+            "name": "phpunit/php-code-coverage",
+            "version": "1.2.13",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+                "reference": "466e7cd2554b4e264c9e3f31216d25ac0e5f3d94"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/466e7cd2554b4e264c9e3f31216d25ac0e5f3d94",
+                "reference": "466e7cd2554b4e264c9e3f31216d25ac0e5f3d94",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "phpunit/php-file-iterator": ">=1.3.0@stable",
+                "phpunit/php-text-template": ">=1.1.1@stable",
+                "phpunit/php-token-stream": ">=1.1.3@stable"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "3.7.*@dev"
+            },
+            "suggest": {
+                "ext-dom": "*",
+                "ext-xdebug": ">=2.0.5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "PHP/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                ""
+            ],
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+            "keywords": [
+                "coverage",
+                "testing",
+                "xunit"
+            ],
+            "time": "2013-09-10 08:14:32"
+        },
+        {
+            "name": "phpunit/php-file-iterator",
+            "version": "1.3.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+                "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
+                "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "File/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                ""
+            ],
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+            "keywords": [
+                "filesystem",
+                "iterator"
+            ],
+            "time": "2013-10-10 15:34:57"
+        },
+        {
+            "name": "phpunit/php-text-template",
+            "version": "1.1.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-text-template.git",
+                "reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5180896f51c5b3648ac946b05f9ec02be78a0b23",
+                "reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "Text/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                ""
+            ],
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Simple template engine.",
+            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+            "keywords": [
+                "template"
+            ],
+            "time": "2012-10-31 18:15:28"
+        },
+        {
+            "name": "phpunit/php-timer",
+            "version": "1.0.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-timer.git",
+                "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+                "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "PHP/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                ""
+            ],
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Utility class for timing",
+            "homepage": "https://github.com/sebastianbergmann/php-timer/",
+            "keywords": [
+                "timer"
+            ],
+            "time": "2013-08-02 07:42:54"
+        },
+        {
+            "name": "phpunit/php-token-stream",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+                "reference": "5220af2a7929aa35cf663d97c89ad3d50cf5fa3e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5220af2a7929aa35cf663d97c89ad3d50cf5fa3e",
+                "reference": "5220af2a7929aa35cf663d97c89ad3d50cf5fa3e",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "PHP/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                ""
+            ],
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Wrapper around PHP's tokenizer extension.",
+            "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+            "keywords": [
+                "tokenizer"
+            ],
+            "time": "2013-09-13 04:58:23"
+        },
+        {
+            "name": "phpunit/phpunit",
+            "version": "3.7.28",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit.git",
+                "reference": "3b97c8492bcafbabe6b6fbd2ab35f2f04d932a8d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3b97c8492bcafbabe6b6fbd2ab35f2f04d932a8d",
+                "reference": "3b97c8492bcafbabe6b6fbd2ab35f2f04d932a8d",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-pcre": "*",
+                "ext-reflection": "*",
+                "ext-spl": "*",
+                "php": ">=5.3.3",
+                "phpunit/php-code-coverage": "~1.2.1",
+                "phpunit/php-file-iterator": ">=1.3.1",
+                "phpunit/php-text-template": ">=1.1.1",
+                "phpunit/php-timer": ">=1.0.4",
+                "phpunit/phpunit-mock-objects": "~1.2.0",
+                "symfony/yaml": "~2.0"
+            },
+            "require-dev": {
+                "pear-pear/pear": "1.9.4"
+            },
+            "suggest": {
+                "ext-json": "*",
+                "ext-simplexml": "*",
+                "ext-tokenizer": "*",
+                "phpunit/php-invoker": ">=1.1.0,<1.2.0"
+            },
+            "bin": [
+                "composer/bin/phpunit"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.7.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "PHPUnit/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                "",
+                "../../symfony/yaml/"
+            ],
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "The PHP Unit Testing framework.",
+            "homepage": "http://www.phpunit.de/",
+            "keywords": [
+                "phpunit",
+                "testing",
+                "xunit"
+            ],
+            "time": "2013-10-17 07:27:40"
+        },
+        {
+            "name": "phpunit/phpunit-mock-objects",
+            "version": "1.2.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+                "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5794e3c5c5ba0fb037b11d8151add2a07fa82875",
+                "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "phpunit/php-text-template": ">=1.1.1@stable"
+            },
+            "suggest": {
+                "ext-soap": "*"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "PHPUnit/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "include-path": [
+                ""
+            ],
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sb@sebastian-bergmann.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Mock Object library for PHPUnit",
+            "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+            "keywords": [
+                "mock",
+                "xunit"
+            ],
+            "time": "2013-01-13 10:24:48"
         },
         {
             "name": "sami/sami",
@@ -402,29 +828,35 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/fabpot/Sami.git",
-                "reference": "7c0ddabd7f7530225608982bae83e31106597ec3"
+                "reference": "c0bc11b187a2f57414e2bf8dd7b40455e9b21ffe"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/fabpot/Sami/zipball/7c0ddabd7f7530225608982bae83e31106597ec3",
-                "reference": "7c0ddabd7f7530225608982bae83e31106597ec3",
+                "url": "https://api.github.com/repos/fabpot/Sami/zipball/c0bc11b187a2f57414e2bf8dd7b40455e9b21ffe",
+                "reference": "c0bc11b187a2f57414e2bf8dd7b40455e9b21ffe",
                 "shasum": ""
             },
             "require": {
+                "michelf/php-markdown": "~1.3",
                 "nikic/php-parser": "0.9.*",
                 "php": ">=5.3.0",
                 "pimple/pimple": "1.0.*",
-                "symfony/console": ">=2.1,<3.0-dev",
-                "symfony/filesystem": ">=2.1,<3.0-dev",
-                "symfony/finder": ">=2.1,<3.0-dev",
-                "symfony/process": ">=2.1,<3.0-dev",
-                "symfony/yaml": ">=2.1,<3.0-dev",
+                "symfony/console": "~2.1",
+                "symfony/filesystem": "~2.1",
+                "symfony/finder": "~2.1",
+                "symfony/process": "~2.1",
+                "symfony/yaml": "~2.1",
                 "twig/twig": "1.*"
             },
             "bin": [
                 "sami.php"
             ],
             "type": "application",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.3-dev"
+                }
+            },
             "autoload": {
                 "psr-0": {
                     "Sami": "."
@@ -445,30 +877,36 @@
             "keywords": [
                 "phpdoc"
             ],
-            "time": "2013-03-20 19:08:32"
+            "time": "2013-10-18 19:34:10"
         },
         {
             "name": "symfony/console",
-            "version": "v2.2.0",
+            "version": "v2.3.6",
             "target-dir": "Symfony/Component/Console",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Console.git",
-                "reference": "v2.2.0"
+                "reference": "f880062d56edefb25b36f2defa65aafe65959dc7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Console/zipball/v2.2.0",
-                "reference": "v2.2.0",
+                "url": "https://api.github.com/repos/symfony/Console/zipball/f880062d56edefb25b36f2defa65aafe65959dc7",
+                "reference": "f880062d56edefb25b36f2defa65aafe65959dc7",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3"
             },
+            "require-dev": {
+                "symfony/event-dispatcher": "~2.1"
+            },
+            "suggest": {
+                "symfony/event-dispatcher": ""
+            },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2-dev"
+                    "dev-master": "2.3-dev"
                 }
             },
             "autoload": {
@@ -492,21 +930,21 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "http://symfony.com",
-            "time": "2013-03-01 06:43:14"
+            "time": "2013-09-25 06:04:15"
         },
         {
             "name": "symfony/finder",
-            "version": "v2.2.0",
+            "version": "v2.3.6",
             "target-dir": "Symfony/Component/Finder",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Finder.git",
-                "reference": "v2.2.0"
+                "reference": "a175521f680b178e63c5d0ab87c6b046c0990c3f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Finder/zipball/v2.2.0",
-                "reference": "v2.2.0",
+                "url": "https://api.github.com/repos/symfony/Finder/zipball/a175521f680b178e63c5d0ab87c6b046c0990c3f",
+                "reference": "a175521f680b178e63c5d0ab87c6b046c0990c3f",
                 "shasum": ""
             },
             "require": {
@@ -515,7 +953,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2-dev"
+                    "dev-master": "2.3-dev"
                 }
             },
             "autoload": {
@@ -539,21 +977,21 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "http://symfony.com",
-            "time": "2013-02-28 14:06:36"
+            "time": "2013-09-19 09:45:20"
         },
         {
             "name": "symfony/yaml",
-            "version": "v2.2.0",
+            "version": "v2.3.6",
             "target-dir": "Symfony/Component/Yaml",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Yaml.git",
-                "reference": "v2.2.0-RC3"
+                "reference": "6bb881b948368482e1abf1a75c08bcf88a1c5fc3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.0-RC3",
-                "reference": "v2.2.0-RC3",
+                "url": "https://api.github.com/repos/symfony/Yaml/zipball/6bb881b948368482e1abf1a75c08bcf88a1c5fc3",
+                "reference": "6bb881b948368482e1abf1a75c08bcf88a1c5fc3",
                 "shasum": ""
             },
             "require": {
@@ -562,7 +1000,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2-dev"
+                    "dev-master": "2.3-dev"
                 }
             },
             "autoload": {
@@ -586,20 +1024,20 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "http://symfony.com",
-            "time": "2013-01-27 16:49:19"
+            "time": "2013-09-22 18:04:39"
         },
         {
             "name": "twig/twig",
-            "version": "v1.12.2",
+            "version": "v1.14.2",
             "source": {
                 "type": "git",
-                "url": "git://github.com/fabpot/Twig.git",
-                "reference": "v1.12.2"
+                "url": "https://github.com/fabpot/Twig.git",
+                "reference": "ca445842fcea4f844d68203ffa2d00f5e3cdea64"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.12.2",
-                "reference": "v1.12.2",
+                "url": "https://api.github.com/repos/fabpot/Twig/zipball/ca445842fcea4f844d68203ffa2d00f5e3cdea64",
+                "reference": "ca445842fcea4f844d68203ffa2d00f5e3cdea64",
                 "shasum": ""
             },
             "require": {
@@ -608,7 +1046,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.12-dev"
+                    "dev-master": "1.14-dev"
                 }
             },
             "autoload": {
@@ -618,7 +1056,7 @@
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
-                "BSD-3"
+                "BSD-3-Clause"
             ],
             "authors": [
                 {
@@ -635,7 +1073,7 @@
             "keywords": [
                 "templating"
             ],
-            "time": "2013-02-09 18:21:53"
+            "time": "2013-10-30 08:20:53"
         }
     ],
     "aliases": [

+ 1 - 1
vendor/alchemy/zippy/docs/source/index.rst

@@ -140,7 +140,7 @@ instance each time you create or open an archive.
     $zipAdapter = $zippy->getAdapterFor('zip');
 
     foreach(array('archive.zip', 'archive2.zip', 'archive3.zip') as $path) {
-        $archive = zipAdapter->open(path);
+        $archive = $zipAdapter->open($path);
     }
 
 Also sometimes you will face the problem where Zippy will not be able to handle

+ 191 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AbstractAdapter.php

@@ -13,13 +13,24 @@
 namespace Alchemy\Zippy\Adapter;
 
 use Alchemy\Zippy\Archive\Archive;
+use Alchemy\Zippy\Exception\InvalidArgumentException;
 use Alchemy\Zippy\Resource\ResourceManager;
+use Alchemy\Zippy\Adapter\VersionProbe\VersionProbeInterface;
+use Alchemy\Zippy\Exception\RuntimeException;
+use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
 
 abstract class AbstractAdapter implements AdapterInterface
 {
     /** @var ResourceManager */
     protected $manager;
 
+    /**
+     * The version probe
+     *
+     * @var VersionProbeInterface
+     */
+    protected $probe;
+
     public function __construct(ResourceManager $manager)
     {
         $this->manager = $manager;
@@ -30,9 +41,119 @@ abstract class AbstractAdapter implements AdapterInterface
      */
     public function open($path)
     {
+        $this->requireSupport();
+
         return new Archive($this->createResource($path), $this, $this->manager);
     }
 
+    /**
+     * @inheritdoc
+     */
+    public function create($path, $files = null, $recursive = true)
+    {
+        $this->requireSupport();
+
+        return $this->doCreate($this->makeTargetAbsolute($path), $files, $recursive);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function listMembers(ResourceInterface $resource)
+    {
+        $this->requireSupport();
+
+        return $this->doListMembers($resource);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function add(ResourceInterface $resource, $files, $recursive = true)
+    {
+        $this->requireSupport();
+
+        return $this->doAdd($resource, $files, $recursive);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function remove(ResourceInterface $resource, $files)
+    {
+        $this->requireSupport();
+
+        return $this->doRemove($resource, $files);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function extract(ResourceInterface $resource, $to = null)
+    {
+        $this->requireSupport();
+
+        return $this->doExtract($resource, $to);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function extractMembers(ResourceInterface $resource, $members, $to = null)
+    {
+        $this->requireSupport();
+
+        return $this->doExtractMembers($resource, $members, $to);
+    }
+
+    /**
+     * Returns the version probe used by this adapter
+     *
+     * @return VersionProbeInterface
+     */
+    public function getVersionProbe()
+    {
+        return $this->probe;
+    }
+
+    /**
+     * Sets the version probe used by this adapter
+     *
+     * @return VersionProbeInterface
+     */
+    public function setVersionProbe(VersionProbeInterface $probe)
+    {
+        $this->probe = $probe;
+
+        return $this;
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function isSupported()
+    {
+        if (!$this->probe) {
+            throw new RuntimeException(sprintf(
+                'No version probe has been set on %s whereas it is required', get_class($this)
+            ));
+        }
+
+        return VersionProbeInterface::PROBE_OK === $this->probe->getStatus();
+    }
+
+    /**
+     * Throws an exception is the current adapter is not supported
+     *
+     * @throws RuntimeException
+     */
+    protected function requireSupport()
+    {
+        if (false === $this->isSupported()) {
+            throw new RuntimeException(sprintf('%s is not supported on your system', get_class($this)));
+        }
+    }
+
     /**
      * Change current working directory to another
      *
@@ -51,5 +172,75 @@ abstract class AbstractAdapter implements AdapterInterface
         return $this;
     }
 
+    /**
+     * Creates a resource given a path
+     *
+     * @return ResourceInterface
+     */
     abstract protected function createResource($path);
+
+    /**
+     * Do the removal after having check that the current adapter is supported
+     *
+     * @return Array
+     */
+    abstract protected function doRemove(ResourceInterface $resource, $files);
+
+    /**
+     * Do the add after having check that the current adapter is supported
+     *
+     * @return Array
+     */
+    abstract protected function doAdd(ResourceInterface $resource, $files, $recursive);
+
+    /**
+     * Do the extract after having check that the current adapter is supported
+     *
+     * @return \SplFileInfo The extracted archive
+     */
+    abstract protected function doExtract(ResourceInterface $resource, $to);
+
+    /**
+     * Do the extract members after having check that the current adapter is supported
+     *
+     * @return \SplFileInfo The extracted archive
+     */
+    abstract protected function doExtractMembers(ResourceInterface $resource, $members, $to);
+
+    /**
+     * Do the list members after having check that the current adapter is supported
+     *
+     * @return Array
+     */
+    abstract protected function doListMembers(ResourceInterface $resource);
+
+    /**
+     * Do the create after having check that the current adapter is supported
+     *
+     * @return ArchiveInterface
+     */
+    abstract protected function doCreate($path, $file, $recursive);
+
+    /**
+     * Makes the target path absolute as the adapters might have a different directory
+     *
+     * @param $path The path to convert
+     *
+     * @return string The absolute path
+     *
+     * @throws InvalidArgumentException In case the path is not writable or does not exist
+     */
+    private function makeTargetAbsolute($path)
+    {
+        $directory = dirname($path);
+
+        if (!is_dir($directory)) {
+            throw new InvalidArgumentException(sprintf('Target path %s does not exist.', $directory));
+        }
+        if (!is_writable($directory)) {
+            throw new InvalidArgumentException(sprintf('Target path %s is not writeable.', $directory));
+        }
+
+        return realpath($directory).'/'.basename ($path);
+    }
 }

+ 47 - 13
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AbstractBinaryAdapter.php

@@ -55,7 +55,7 @@ abstract class AbstractBinaryAdapter extends AbstractAdapter implements BinaryAd
      * @param ProcessBuilderFactoryInterface      $inflator A process builder factory for the inflator binary
      * @param ProcessBuilderFactoryInterface|null $deflator A process builder factory for the deflator binary
      */
-    public function __construct(ParserInterface $parser, ResourceManager $manager, ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator = null)
+    public function __construct(ParserInterface $parser, ResourceManager $manager, ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator)
     {
         $this->parser = $parser;
         $this->manager = $manager;
@@ -114,6 +114,26 @@ abstract class AbstractBinaryAdapter extends AbstractAdapter implements BinaryAd
         return $this;
     }
 
+    /**
+     * @inheritdoc
+     */
+    public function getInflatorVersion()
+    {
+        $this->requireSupport();
+
+        return $this->doGetInflatorVersion();
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getDeflatorVersion()
+    {
+        $this->requireSupport();
+
+        return $this->doGetDeflatorVersion();
+    }
+
     /**
      * Returns a new instance of the invoked adapter
      *
@@ -124,12 +144,10 @@ abstract class AbstractBinaryAdapter extends AbstractAdapter implements BinaryAd
      *
      * @throws RuntimeException In case object could not be instanciated
      */
-    public static function newInstance(ResourceManager $manager, $inflatorBinaryName = null, $deflatorBinaryName = null)
+    public static function newInstance(ExecutableFinder $finder, ResourceManager $manager, $inflatorBinaryName = null, $deflatorBinaryName = null)
     {
-        $finder = new ExecutableFinder();
-
-        $inflator = self::findABinary($inflatorBinaryName, static::getDefaultInflatorBinaryName(), $finder);
-        $deflator = self::findABinary($deflatorBinaryName, static::getDefaultDeflatorBinaryName(), $finder);
+        $inflator = $inflatorBinaryName instanceof ProcessBuilderFactoryInterface ? $inflatorBinaryName : self::findABinary($inflatorBinaryName, static::getDefaultInflatorBinaryName(), $finder);
+        $deflator = $deflatorBinaryName instanceof ProcessBuilderFactoryInterface ? $deflatorBinaryName : self::findABinary($deflatorBinaryName, static::getDefaultDeflatorBinaryName(), $finder);
 
         try {
             $outputParser = ParserFactory::create(static::getName());
@@ -140,6 +158,14 @@ abstract class AbstractBinaryAdapter extends AbstractAdapter implements BinaryAd
             );
         }
 
+        if (null === $inflator) {
+            throw new RuntimeException(sprintf('Unable to create the inflator'));
+        }
+
+        if (null === $deflator) {
+            throw new RuntimeException(sprintf('Unable to create the deflator'));
+        }
+
         return new static($outputParser, $manager, $inflator, $deflator);
     }
 
@@ -156,12 +182,6 @@ abstract class AbstractBinaryAdapter extends AbstractAdapter implements BinaryAd
             }
         }
 
-        if (!$binary) {
-            throw new RuntimeException(sprintf(
-                'Failed to get a valid binary for %s', get_called_class()
-            ));
-        }
-
         return $binary;
     }
 
@@ -177,7 +197,7 @@ abstract class AbstractBinaryAdapter extends AbstractAdapter implements BinaryAd
     {
         $iterations = 0;
 
-        array_walk($files, function($file) use ($builder, &$iterations) {
+        array_walk($files, function ($file) use ($builder, &$iterations) {
             $builder->add(
                 $file instanceof \SplFileInfo ?
                 $file->getRealpath() :
@@ -194,4 +214,18 @@ abstract class AbstractBinaryAdapter extends AbstractAdapter implements BinaryAd
     {
         return new FileResource($path);
     }
+
+    /**
+     * Fetch the inflator version after having check that the current adapter is supported
+     *
+     * @return string
+     */
+    abstract protected function doGetInflatorVersion();
+
+    /**
+     * Fetch the Deflator version after having check that the current adapter is supported
+     *
+     * @return string
+     */
+    abstract protected function doGetDeflatorVersion();
 }

+ 43 - 86
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AbstractTarAdapter.php

@@ -12,87 +12,67 @@
 namespace Alchemy\Zippy\Adapter;
 
 use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
-use Alchemy\Zippy\Adapter\AbstractBinaryAdapter;
 use Alchemy\Zippy\Archive\Archive;
 use Alchemy\Zippy\Exception\InvalidArgumentException;
 use Alchemy\Zippy\Exception\RuntimeException;
 use Alchemy\Zippy\Resource\Resource;
 use Alchemy\Zippy\Archive\Member;
+use Symfony\Component\Process\Exception\ExceptionInterface as ProcessException;
 
 abstract class AbstractTarAdapter extends AbstractBinaryAdapter
 {
     /**
      * @inheritdoc
      */
-    public function create($path, $files = null, $recursive = true)
+    protected function doCreate($path, $files, $recursive)
     {
-        return $this->doCreate($this->getLocalOptions(), $path, $files, $recursive);
+        return $this->doTarCreate($this->getLocalOptions(), $path, $files, $recursive);
     }
 
     /**
      * @inheritdoc
      */
-    public function listMembers(ResourceInterface $resource)
+    protected function doListMembers(ResourceInterface $resource)
     {
-        return $this->doListMembers($this->getLocalOptions(), $resource);
+        return $this->doTarListMembers($this->getLocalOptions(), $resource);
     }
 
     /**
      * @inheritdoc
      */
-    public function add(ResourceInterface $resource, $files, $recursive = true)
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
     {
-        return $this->doAdd($this->getLocalOptions(), $resource, $files, $recursive);
+        return $this->doTarAdd($this->getLocalOptions(), $resource, $files, $recursive);
     }
 
     /**
      * @inheritdoc
      */
-    public function remove(ResourceInterface $resource, $files)
+    protected function doRemove(ResourceInterface $resource, $files)
     {
-        return $this->doRemove($this->getLocalOptions(), $resource, $files);
+        return $this->doTarRemove($this->getLocalOptions(), $resource, $files);
     }
 
     /**
      * @inheritdoc
      */
-    public function extractMembers(ResourceInterface $resource, $members, $to = null)
+    protected function doExtractMembers(ResourceInterface $resource, $members, $to)
     {
-        return $this->doExtractMembers($this->getLocalOptions(), $resource, $members, $to);
+        return $this->doTarExtractMembers($this->getLocalOptions(), $resource, $members, $to);
     }
 
     /**
      * @inheritdoc
      */
-    public function extract(ResourceInterface $resource, $to = null)
+    protected function doExtract(ResourceInterface $resource, $to)
     {
-        return $this->doExtract($this->getLocalOptions(), $resource, $to);
+        return $this->doTarExtract($this->getLocalOptions(), $resource, $to);
     }
 
     /**
      * @inheritdoc
      */
-    public function isSupported()
-    {
-        $process = $this
-            ->inflator
-            ->create()
-            ->add('--version')
-            ->getProcess();
-
-        $process->run();
-
-        if (!$process->isSuccessful()) {
-            return false;
-        }
-
-        return $this->isProperImplementation($process->getOutput());
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getInflatorVersion()
+    protected function doGetInflatorVersion()
     {
         $process = $this
             ->inflator
@@ -115,12 +95,12 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function getDeflatorVersion()
+    protected function doGetDeflatorVersion()
     {
         return $this->getInflatorVersion();
     }
 
-    protected function doCreate($options, $path, $files = null, $recursive = true)
+    protected function doTarCreate($options, $path, $files = null, $recursive = true)
     {
         $files = (array) $files;
 
@@ -156,31 +136,24 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
                 $builder->add('--no-recursion');
             }
 
-            $error = null;
-            $cwd = getcwd();
-            $collection = $this->manager->handle($cwd, $files);
+            $collection = $this->manager->handle(getcwd(), $files);
 
-            $this->chdir($collection->getContext());
             $builder->setWorkingDirectory($collection->getContext());
 
-            try {
-                $collection->forAll(function ($i, Resource $resource) use ($builder) {
-                    return $builder->add($resource->getTarget());
-                });
+            $collection->forAll(function ($i, Resource $resource) use ($builder) {
+                return $builder->add($resource->getTarget());
+            });
 
-                $process = $builder->getProcess();
-                $process->run();
+            $process = $builder->getProcess();
 
+            try {
+                $process->run();
+            } catch (ProcessException $e) {
                 $this->manager->cleanup($collection);
-            } catch (\Exception $e) {
-                $error = $e;
+                throw $e;
             }
 
-            $this->chdir($cwd);
-
-            if ($error) {
-                throw $error;
-            }
+            $this->manager->cleanup($collection);
         }
 
         if (!$process->isSuccessful()) {
@@ -194,7 +167,7 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
         return new Archive($this->createResource($path), $this, $this->manager);
     }
 
-    protected function doListMembers($options, ResourceInterface $resource)
+    protected function doTarListMembers($options, ResourceInterface $resource)
     {
         $builder = $this
             ->inflator
@@ -240,7 +213,7 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
         return $members;
     }
 
-    protected function doAdd($options, ResourceInterface $resource, $files, $recursive = true)
+    protected function doTarAdd($options, ResourceInterface $resource, $files, $recursive = true)
     {
         $files = (array) $files;
 
@@ -253,7 +226,6 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
         }
 
         $builder
-            ->add('--delete')
             ->add('--append')
             ->add(sprintf('--file=%s', $resource->getResource()));
 
@@ -263,29 +235,24 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
 
         // there will be an issue if the file starts with a dash
         // see --add-file=FILE
-        $error = null;
-        $cwd = getcwd();
-        $collection = $this->manager->handle($cwd, $files);
+        $collection = $this->manager->handle(getcwd(), $files);
 
-        $this->chdir($collection->getContext());
-        try {
-            $collection->forAll(function ($i, Resource $resource) use ($builder) {
-                return $builder->add($resource->getTarget());
-            });
+        $builder->setWorkingDirectory($collection->getContext());
 
-            $process = $builder->getProcess();
-            $process->run();
+        $collection->forAll(function ($i, Resource $resource) use ($builder) {
+            return $builder->add($resource->getTarget());
+        });
 
+        $process = $builder->getProcess();
+
+        try {
+            $process->run();
+        } catch (ProcessException $e) {
             $this->manager->cleanup($collection);
-        } catch (\Exception $e) {
-            $error = $e;
+            throw $e;
         }
 
-        $this->chdir($cwd);
-
-        if ($error) {
-            throw $error;
-        }
+        $this->manager->cleanup($collection);
 
         if (!$process->isSuccessful()) {
             throw new RuntimeException(sprintf(
@@ -298,7 +265,7 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
         return $files;
     }
 
-    protected function doRemove($options, ResourceInterface $resource, $files)
+    protected function doTarRemove($options, ResourceInterface $resource, $files)
     {
         $files = (array) $files;
 
@@ -333,7 +300,7 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
         return $files;
     }
 
-    protected function doExtract($options, ResourceInterface $resource, $to = null)
+    protected function doTarExtract($options, ResourceInterface $resource, $to = null)
     {
         if (null !== $to && !is_dir($to)) {
             throw new InvalidArgumentException(sprintf("%s is not a directory", $to));
@@ -377,7 +344,7 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
         return new \SplFileInfo($to ? : $resource->getResource());
     }
 
-    protected function doExtractMembers($options, ResourceInterface $resource, $members, $to = null)
+    protected function doTarExtractMembers($options, ResourceInterface $resource, $members, $to = null)
     {
         if (null !== $to && !is_dir($to)) {
             throw new InvalidArgumentException(sprintf("%s is not a directory", $to));
@@ -454,14 +421,4 @@ abstract class AbstractTarAdapter extends AbstractBinaryAdapter
      * @return Array
      */
     abstract protected function getLocalOptions();
-
-    /**
-     * Tells whether the current TAR binary comes from a specific implementation
-     * (GNU, BSD or Solaris etc ...)
-     *
-     * @param string $versionOutput The output from --version command
-     *
-     * @return Boolean
-     */
-    abstract protected function isProperImplementation($versionOutput);
 }

+ 12 - 2
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AdapterContainer.php

@@ -11,7 +11,6 @@
 
 namespace Alchemy\Zippy\Adapter;
 
-use Alchemy\Zippy\Adapter\ZipAdapter;
 use Alchemy\Zippy\Adapter\BSDTar\TarBSDTarAdapter;
 use Alchemy\Zippy\Adapter\BSDTar\TarGzBSDTarAdapter;
 use Alchemy\Zippy\Adapter\BSDTar\TarBz2BSDTarAdapter;
@@ -24,7 +23,7 @@ use Alchemy\Zippy\Resource\TeleporterContainer;
 use Alchemy\Zippy\Resource\ResourceTeleporter;
 use Alchemy\Zippy\Resource\TargetLocator;
 use Symfony\Component\Filesystem\Filesystem;
-use Alchemy\Zippy\Adapter\ZipExtensionAdapter;
+use Symfony\Component\Process\ExecutableFinder;
 
 class AdapterContainer extends \Pimple
 {
@@ -48,6 +47,10 @@ class AdapterContainer extends \Pimple
             );
         });
 
+        $container['executable-finder'] = $container->share(function ($container) {
+            return new ExecutableFinder();
+        });
+
         $container['request-mapper'] = $container->share(function ($container) {
             return new RequestMapper($container['target-locator']);
         });
@@ -70,6 +73,7 @@ class AdapterContainer extends \Pimple
 
         $container['Alchemy\\Zippy\\Adapter\\ZipAdapter'] = $container->share(function ($container) {
             return ZipAdapter::newInstance(
+                $container['executable-finder'],
                 $container['resource-manager'],
                 $container['zip.inflator'],
                 $container['zip.deflator']
@@ -81,6 +85,7 @@ class AdapterContainer extends \Pimple
 
         $container['Alchemy\\Zippy\\Adapter\\GNUTar\\TarGNUTarAdapter'] = $container->share(function ($container) {
             return TarGNUTarAdapter::newInstance(
+                $container['executable-finder'],
                 $container['resource-manager'],
                 $container['gnu-tar.inflator'],
                 $container['gnu-tar.deflator']
@@ -89,6 +94,7 @@ class AdapterContainer extends \Pimple
 
         $container['Alchemy\\Zippy\\Adapter\\GNUTar\\TarGzGNUTarAdapter'] = $container->share(function ($container) {
             return TarGzGNUTarAdapter::newInstance(
+                $container['executable-finder'],
                 $container['resource-manager'],
                 $container['gnu-tar.inflator'],
                 $container['gnu-tar.deflator']
@@ -97,6 +103,7 @@ class AdapterContainer extends \Pimple
 
         $container['Alchemy\\Zippy\\Adapter\\GNUTar\\TarBz2GNUTarAdapter'] = $container->share(function ($container) {
             return TarBz2GNUTarAdapter::newInstance(
+                $container['executable-finder'],
                 $container['resource-manager'],
                 $container['gnu-tar.inflator'],
                 $container['gnu-tar.deflator']
@@ -108,6 +115,7 @@ class AdapterContainer extends \Pimple
 
         $container['Alchemy\\Zippy\\Adapter\\BSDTar\\TarBSDTarAdapter'] = $container->share(function ($container) {
             return TarBSDTarAdapter::newInstance(
+                $container['executable-finder'],
                 $container['resource-manager'],
                 $container['bsd-tar.inflator'],
                 $container['bsd-tar.deflator']
@@ -116,6 +124,7 @@ class AdapterContainer extends \Pimple
 
         $container['Alchemy\\Zippy\\Adapter\\BSDTar\\TarGzBSDTarAdapter'] = $container->share(function ($container) {
             return TarGzBSDTarAdapter::newInstance(
+                $container['executable-finder'],
                 $container['resource-manager'],
                 $container['bsd-tar.inflator'],
                 $container['bsd-tar.deflator']
@@ -124,6 +133,7 @@ class AdapterContainer extends \Pimple
 
         $container['Alchemy\\Zippy\\Adapter\\BSDTar\\TarBz2BSDTarAdapter'] = $container->share(function ($container) {
             return TarBz2BSDTarAdapter::newInstance(
+                $container['executable-finder'],
                 $container['resource-manager'],
                 $container['bsd-tar.inflator'],
                 $container['bsd-tar.deflator']);

+ 7 - 7
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/AdapterInterface.php

@@ -80,13 +80,6 @@ Interface AdapterInterface
      */
     public function add(ResourceInterface $resource, $files, $recursive = true);
 
-    /**
-     * Returns the adapter name
-     *
-     * @return String
-     */
-    public static function getName();
-
     /**
      * Removes a member of the archive
      *
@@ -128,4 +121,11 @@ Interface AdapterInterface
      * @throws InvalidArgumentException In case no members could be removed or provide extract target directory is not valid
      */
     public function extractMembers(ResourceInterface $resource, $members, $to = null);
+
+    /**
+     * Returns the adapter name
+     *
+     * @return String
+     */
+    public static function getName();
 }

+ 10 - 10
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/BSDTar/TarBSDTarAdapter.php

@@ -3,6 +3,10 @@
 namespace Alchemy\Zippy\Adapter\BSDTar;
 
 use Alchemy\Zippy\Adapter\AbstractTarAdapter;
+use Alchemy\Zippy\Adapter\VersionProbe\BSDTarVersionProbe;
+use Alchemy\Zippy\Parser\ParserInterface;
+use Alchemy\Zippy\Resource\ResourceManager;
+use Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface;
 
 /**
  * BSDTAR allows you to create and extract files from archives using BSD tar
@@ -11,6 +15,12 @@ use Alchemy\Zippy\Adapter\AbstractTarAdapter;
  */
 class TarBSDTarAdapter extends AbstractTarAdapter
 {
+    public function __construct(ParserInterface $parser, ResourceManager $manager, ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator)
+    {
+        parent::__construct($parser, $manager, $inflator, $deflator);
+        $this->probe = new BSDTarVersionProbe($inflator, $deflator);
+    }
+
     /**
      * @inheritdoc
      */
@@ -43,16 +53,6 @@ class TarBSDTarAdapter extends AbstractTarAdapter
         return array('bsdtar', 'tar');
     }
 
-    /**
-     * @inheritdoc
-     */
-    protected function isProperImplementation($versionOutput)
-    {
-        $lines = explode("\n", $versionOutput, 2);
-
-        return false !== stripos($lines[0], 'bsdtar');
-    }
-
     /**
      * {@inheritdoc}
      */

+ 11 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/BSDTar/TarBz2BSDTarAdapter.php

@@ -2,8 +2,19 @@
 
 namespace Alchemy\Zippy\Adapter\BSDTar;
 
+use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
+use Alchemy\Zippy\Exception\NotSupportedException;
+
 class TarBz2BSDTarAdapter extends TarBSDTarAdapter
 {
+    /**
+     * @inheritdoc
+     */
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
+    {
+        throw new NotSupportedException('Updating a compressed tar archive is not supported.');
+    }
+
     /**
      * @inheritdoc
      */

+ 11 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/BSDTar/TarGzBSDTarAdapter.php

@@ -2,8 +2,19 @@
 
 namespace Alchemy\Zippy\Adapter\BSDTar;
 
+use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
+use Alchemy\Zippy\Exception\NotSupportedException;
+
 class TarGzBSDTarAdapter extends TarBSDTarAdapter
 {
+    /**
+     * @inheritdoc
+     */
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
+    {
+        throw new NotSupportedException('Updating a compressed tar archive is not supported.');
+    }
+
     /**
      * @inheritdoc
      */

+ 11 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/GNUTar/TarBz2GNUTarAdapter.php

@@ -2,8 +2,19 @@
 
 namespace Alchemy\Zippy\Adapter\GNUTar;
 
+use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
+use Alchemy\Zippy\Exception\NotSupportedException;
+
 class TarBz2GNUTarAdapter extends TarGNUTarAdapter
 {
+    /**
+     * @inheritdoc
+     */
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
+    {
+        throw new NotSupportedException('Updating a compressed tar archive is not supported.');
+    }
+
     /**
      * @inheritdoc
      */

+ 10 - 10
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/GNUTar/TarGNUTarAdapter.php

@@ -3,6 +3,10 @@
 namespace Alchemy\Zippy\Adapter\GNUTar;
 
 use Alchemy\Zippy\Adapter\AbstractTarAdapter;
+use Alchemy\Zippy\Adapter\VersionProbe\GNUTarVersionProbe;
+use Alchemy\Zippy\Parser\ParserInterface;
+use Alchemy\Zippy\Resource\ResourceManager;
+use Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface;
 
 /**
  * GNUTarAdapter allows you to create and extract files from archives using GNU tar
@@ -11,6 +15,12 @@ use Alchemy\Zippy\Adapter\AbstractTarAdapter;
  */
 class TarGNUTarAdapter extends AbstractTarAdapter
 {
+    public function __construct(ParserInterface $parser, ResourceManager $manager, ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator)
+    {
+        parent::__construct($parser, $manager, $inflator, $deflator);
+        $this->probe = new GNUTarVersionProbe($inflator, $deflator);
+    }
+
     /**
      * @inheritdoc
      */
@@ -43,16 +53,6 @@ class TarGNUTarAdapter extends AbstractTarAdapter
         return array('gnutar', 'tar');
     }
 
-    /**
-     * @inheritdoc
-     */
-    protected function isProperImplementation($versionOutput)
-    {
-        $lines = explode("\n", $versionOutput, 2);
-
-        return false !== stripos($lines[0], '(gnu tar)');
-    }
-
     /**
      * {@inheritdoc}
      */

+ 11 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/GNUTar/TarGzGNUTarAdapter.php

@@ -2,8 +2,19 @@
 
 namespace Alchemy\Zippy\Adapter\GNUTar;
 
+use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
+use Alchemy\Zippy\Exception\NotSupportedException;
+
 class TarGzGNUTarAdapter extends TarGNUTarAdapter
 {
+    /**
+     * @inheritdoc
+     */
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
+    {
+        throw new NotSupportedException('Updating a compressed tar archive is not supported.');
+    }
+
     /**
      * @inheritdoc
      */

+ 75 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/AbstractTarVersionProbe.php

@@ -0,0 +1,75 @@
+<?php
+
+/*
+ * This file is part of Zippy.
+ *
+ * (c) Alchemy <info@alchemy.fr>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ */
+
+namespace Alchemy\Zippy\Adapter\VersionProbe;
+
+use Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface;
+
+abstract class AbstractTarVersionProbe implements VersionProbeInterface
+{
+    private $isSupported;
+    private $inflator;
+    private $deflator;
+
+    public function __construct(ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator)
+    {
+        $this->inflator = $inflator;
+        $this->deflator = $deflator;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getStatus()
+    {
+        if (null !== $this->isSupported) {
+            return $this->isSupported;
+        }
+
+        if (null === $this->inflator || null === $this->deflator) {
+            return $this->isSupported = VersionProbeInterface::PROBE_NOTSUPPORTED;
+        }
+
+        $good = true;
+
+        foreach (array($this->inflator, $this->deflator) as $builder) {
+            $process = $builder
+                ->create()
+                ->add('--version')
+                ->getProcess();
+
+            $process->run();
+
+            if (!$process->isSuccessful()) {
+                return $this->isSupported = VersionProbeInterface::PROBE_NOTSUPPORTED;
+            }
+
+            $lines = explode("\n", $process->getOutput(), 2);
+            $good = false !== stripos($lines[0], $this->getVersionSignature());
+
+            if (!$good) {
+                break;
+            }
+        }
+
+        $this->isSupported = $good ? VersionProbeInterface::PROBE_OK : VersionProbeInterface::PROBE_NOTSUPPORTED;
+
+        return $this->isSupported;
+    }
+
+    /**
+     * Returns the signature of inflator/deflator
+     *
+     * @return string
+     */
+    abstract protected function getVersionSignature();
+}

+ 24 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/BSDTarVersionProbe.php

@@ -0,0 +1,24 @@
+<?php
+
+/*
+ * This file is part of Zippy.
+ *
+ * (c) Alchemy <info@alchemy.fr>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ */
+
+namespace Alchemy\Zippy\Adapter\VersionProbe;
+
+class BSDTarVersionProbe extends AbstractTarVersionProbe
+{
+    /**
+     * {@inheritdoc}
+     */
+    protected function getVersionSignature()
+    {
+        return 'bsdtar';
+    }
+}

+ 24 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/GNUTarVersionProbe.php

@@ -0,0 +1,24 @@
+<?php
+
+/*
+ * This file is part of Zippy.
+ *
+ * (c) Alchemy <info@alchemy.fr>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ */
+
+namespace Alchemy\Zippy\Adapter\VersionProbe;
+
+class GNUTarVersionProbe extends AbstractTarVersionProbe
+{
+    /**
+     * {@inheritdoc}
+     */
+    protected function getVersionSignature()
+    {
+        return '(gnu tar)';
+    }
+}

+ 26 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/VersionProbeInterface.php

@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of Zippy.
+ *
+ * (c) Alchemy <info@alchemy.fr>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ */
+
+namespace Alchemy\Zippy\Adapter\VersionProbe;
+
+interface VersionProbeInterface
+{
+    const PROBE_OK = 0;
+    const PROBE_NOTSUPPORTED = 1;
+
+    /**
+     * Probes for the support of an adapter.
+     *
+     * @return integer One of the self::PROBE_* constants
+     */
+    public function getStatus();
+}

+ 24 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/ZipExtensionVersionProbe.php

@@ -0,0 +1,24 @@
+<?php
+
+/*
+ * This file is part of Zippy.
+ *
+ * (c) Alchemy <info@alchemy.fr>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ */
+
+namespace Alchemy\Zippy\Adapter\VersionProbe;
+
+class ZipExtensionVersionProbe implements VersionProbeInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getStatus()
+    {
+        return class_exists('\ZipArchive') ? VersionProbeInterface::PROBE_OK : VersionProbeInterface::PROBE_NOTSUPPORTED;
+    }
+}

+ 96 - 0
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/VersionProbe/ZipVersionProbe.php

@@ -0,0 +1,96 @@
+<?php
+
+/*
+ * This file is part of Zippy.
+ *
+ * (c) Alchemy <info@alchemy.fr>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ */
+
+namespace Alchemy\Zippy\Adapter\VersionProbe;
+
+use Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface;
+
+class ZipVersionProbe implements VersionProbeInterface
+{
+    private $isSupported;
+    private $inflator;
+    private $deflator;
+
+    public function __construct(ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator)
+    {
+        $this->inflator = $inflator;
+        $this->deflator = $deflator;
+    }
+
+    /**
+     * Set the inflator to zip
+     *
+     * @param  ProcessBuilderFactoryInterface $inflator
+     * @return ZipVersionProbe
+     */
+    public function setInflator(ProcessBuilderFactoryInterface $inflator)
+    {
+        $this->inflator = $inflator;
+
+        return $this;
+    }
+
+    /**
+     * Set the deflator to unzip
+     *
+     * @param  ProcessBuilderFactoryInterface $deflator
+     * @return ZipVersionProbe
+     */
+    public function setDeflator(ProcessBuilderFactoryInterface $deflator)
+    {
+        $this->deflator = $deflator;
+
+        return $this;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getStatus()
+    {
+        if (null !== $this->isSupported) {
+            return $this->isSupported;
+        }
+
+        if (null === $this->inflator || null === $this->deflator) {
+            return $this->isSupported = VersionProbeInterface::PROBE_NOTSUPPORTED;
+        }
+
+        $processDeflate = $this
+            ->deflator
+            ->create()
+            ->add('-h')
+            ->getProcess();
+
+        $processDeflate->run();
+
+        $processInflate = $this
+            ->inflator
+            ->create()
+            ->add('-h')
+            ->getProcess();
+
+        $processInflate->run();
+
+        if (false === $processDeflate->isSuccessful() || false === $processInflate->isSuccessful()) {
+            return $this->isSupported = VersionProbeInterface::PROBE_NOTSUPPORTED;
+        }
+
+        $lines = explode("\n", $processInflate->getOutput(), 2);
+        $inflatorOk = false !== stripos($lines[0], 'Info-ZIP');
+
+        $lines = explode("\n", $processDeflate->getOutput(), 2);
+        $deflatorOk = false !== stripos($lines[0], 'Info-ZIP');
+
+        return $this->isSupported = ($inflatorOk && $deflatorOk) ? VersionProbeInterface::PROBE_OK : VersionProbeInterface::PROBE_NOTSUPPORTED;
+    }
+}

+ 44 - 54
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/ZipAdapter.php

@@ -18,6 +18,11 @@ use Alchemy\Zippy\Exception\RuntimeException;
 use Alchemy\Zippy\Exception\NotSupportedException;
 use Alchemy\Zippy\Exception\InvalidArgumentException;
 use Alchemy\Zippy\Resource\Resource;
+use Alchemy\Zippy\Resource\ResourceManager;
+use Alchemy\Zippy\Adapter\VersionProbe\ZipVersionProbe;
+use Alchemy\Zippy\Parser\ParserInterface;
+use Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface;
+use Symfony\Component\Process\Exception\ExceptionInterface as ProcessException;
 
 /**
  * ZipAdapter allows you to create and extract files from archives using Zip
@@ -26,10 +31,16 @@ use Alchemy\Zippy\Resource\Resource;
  */
 class ZipAdapter extends AbstractBinaryAdapter
 {
+    public function __construct(ParserInterface $parser, ResourceManager $manager, ProcessBuilderFactoryInterface $inflator, ProcessBuilderFactoryInterface $deflator)
+    {
+        parent::__construct($parser, $manager, $inflator, $deflator);
+        $this->probe = new ZipVersionProbe($inflator, $deflator);
+    }
+
     /**
      * @inheritdoc
      */
-    public function create($path, $files = null, $recursive = true)
+    protected function doCreate($path, $files, $recursive)
     {
         $files = (array) $files;
 
@@ -47,31 +58,23 @@ class ZipAdapter extends AbstractBinaryAdapter
 
         $builder->add($path);
 
-        $error = null;
-        $cwd = getcwd();
-        $collection = $this->manager->handle($cwd, $files);
-
-        $this->chdir($collection->getContext());
+        $collection = $this->manager->handle(getcwd(), $files);
         $builder->setWorkingDirectory($collection->getContext());
 
-        try {
-            $collection->forAll(function ($i, Resource $resource) use ($builder) {
-                return $builder->add($resource->getTarget());
-            });
+        $collection->forAll(function ($i, Resource $resource) use ($builder) {
+            return $builder->add($resource->getTarget());
+        });
 
-            $process = $builder->getProcess();
-            $process->run();
+        $process = $builder->getProcess();
 
+        try {
+            $process->run();
+        } catch (ProcessException $e) {
             $this->manager->cleanup($collection);
-        } catch (\Exception $e) {
-            $error = $e;
+            throw $e;
         }
 
-        $this->chdir($cwd);
-
-        if ($error) {
-            throw $error;
-        }
+        $this->manager->cleanup($collection);
 
         if (!$process->isSuccessful()) {
             throw new RuntimeException(sprintf(
@@ -87,31 +90,7 @@ class ZipAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function isSupported()
-    {
-        $processDeflate = $this
-            ->deflator
-            ->create()
-            ->add('-h')
-            ->getProcess();
-
-        $processDeflate->run();
-
-        $processInflate = $this
-            ->inflator
-            ->create()
-            ->add('-h')
-            ->getProcess();
-
-        $processInflate->run();
-
-        return $processInflate->isSuccessful() && $processDeflate->isSuccessful();
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function listMembers(ResourceInterface $resource)
+    protected function doListMembers(ResourceInterface $resource)
     {
         $process = $this
             ->deflator
@@ -149,7 +128,7 @@ class ZipAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function add(ResourceInterface $resource, $files, $recursive = true)
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
     {
         $files = (array) $files;
 
@@ -165,13 +144,24 @@ class ZipAdapter extends AbstractBinaryAdapter
             ->add('-u')
             ->add($resource->getResource());
 
-        if (!$this->addBuilderFileArgument($files, $builder)) {
-            throw new InvalidArgumentException('Invalid files');
-        }
+        $collection = $this->manager->handle(getcwd(), $files);
+
+        $builder->setWorkingDirectory($collection->getContext());
+
+        $collection->forAll(function ($i, Resource $resource) use ($builder) {
+            return $builder->add($resource->getTarget());
+        });
 
         $process = $builder->getProcess();
 
-        $process->run();
+        try {
+            $process->run();
+        } catch (ProcessException $e) {
+            $this->manager->cleanup($collection);
+            throw $e;
+        }
+
+        $this->manager->cleanup($collection);
 
         if (!$process->isSuccessful()) {
             throw new RuntimeException(sprintf(
@@ -185,7 +175,7 @@ class ZipAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function getDeflatorVersion()
+    protected function doGetDeflatorVersion()
     {
         $process = $this
             ->deflator
@@ -209,7 +199,7 @@ class ZipAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function getInflatorVersion()
+    protected function doGetInflatorVersion()
     {
         $process = $this
             ->inflator
@@ -233,7 +223,7 @@ class ZipAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function remove(ResourceInterface $resource, $files)
+    protected function doRemove(ResourceInterface $resource, $files)
     {
         $files = (array) $files;
 
@@ -291,7 +281,7 @@ class ZipAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function extract(ResourceInterface $resource, $to = null)
+    protected function doExtract(ResourceInterface $resource, $to)
     {
         if (null !== $to && !is_dir($to)) {
             throw new InvalidArgumentException(sprintf("%s is not a directory", $to));
@@ -329,7 +319,7 @@ class ZipAdapter extends AbstractBinaryAdapter
     /**
      * @inheritdoc
      */
-    public function extractMembers(ResourceInterface $resource, $members, $to = null)
+    protected function doExtractMembers(ResourceInterface $resource, $members, $to)
     {
         if (null !== $to && !is_dir($to)) {
             throw new InvalidArgumentException(sprintf("%s is not a directory", $to));

+ 8 - 18
vendor/alchemy/zippy/src/Alchemy/Zippy/Adapter/ZipExtensionAdapter.php

@@ -17,6 +17,7 @@ use Alchemy\Zippy\Exception\NotSupportedException;
 use Alchemy\Zippy\Archive\Member;
 use Alchemy\Zippy\Adapter\Resource\ResourceInterface;
 use Alchemy\Zippy\Adapter\Resource\ZipArchiveResource;
+use Alchemy\Zippy\Adapter\VersionProbe\ZipExtensionVersionProbe;
 use Alchemy\Zippy\Archive\Archive;
 use Alchemy\Zippy\Resource\ResourceManager;
 use Alchemy\Zippy\Resource\Resource;
@@ -43,25 +44,14 @@ class ZipExtensionAdapter extends AbstractAdapter
 
     public function __construct(ResourceManager $manager)
     {
-        if (!$this->isSupported()) {
-            throw new RuntimeException("Zip Extension is not available");
-        }
-
         parent::__construct($manager);
+        $this->probe = new ZipExtensionVersionProbe();
     }
 
     /**
      * @inheritdoc
      */
-    public function isSupported()
-    {
-        return class_exists('\ZipArchive');
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function listMembers(ResourceInterface $resource)
+    protected function doListMembers(ResourceInterface $resource)
     {
         $members = array();
         for ($i = 0; $i < $resource->getResource()->numFiles; $i++) {
@@ -90,7 +80,7 @@ class ZipExtensionAdapter extends AbstractAdapter
     /**
      * @inheritdoc
      */
-    public function extract(ResourceInterface $resource, $to = null)
+    protected function doExtract(ResourceInterface $resource, $to)
     {
         return $this->extractMembers($resource, null, $to);
     }
@@ -98,7 +88,7 @@ class ZipExtensionAdapter extends AbstractAdapter
     /**
      * @inheritdoc
      */
-    public function extractMembers(ResourceInterface $resource, $members, $to = null)
+    protected function doExtractMembers(ResourceInterface $resource, $members, $to)
     {
         if (null === $to) {
             // if no destination is given, will extract to zip current folder
@@ -146,7 +136,7 @@ class ZipExtensionAdapter extends AbstractAdapter
     /**
      * @inheritdoc
      */
-    public function remove(ResourceInterface $resource, $files)
+    protected function doRemove(ResourceInterface $resource, $files)
     {
         $files = (array) $files;
 
@@ -177,7 +167,7 @@ class ZipExtensionAdapter extends AbstractAdapter
     /**
      * @inheritdoc
      */
-    public function add(ResourceInterface $resource, $files, $recursive = true)
+    protected function doAdd(ResourceInterface $resource, $files, $recursive)
     {
         $files = (array) $files;
         if (empty($files)) {
@@ -192,7 +182,7 @@ class ZipExtensionAdapter extends AbstractAdapter
     /**
      * @inheritdoc
      */
-    public function create($path, $files = null, $recursive = true)
+    protected function doCreate($path, $files, $recursive)
     {
         $files = (array) $files;
 

+ 0 - 4
vendor/alchemy/zippy/src/Alchemy/Zippy/Parser/ParserFactory.php

@@ -12,10 +12,6 @@
 namespace Alchemy\Zippy\Parser;
 
 use Alchemy\Zippy\Exception\InvalidArgumentException;
-use Alchemy\Zippy\Parser\BSDTarOutputParser;
-use Alchemy\Zippy\Parser\GNUTarOutputParser;
-use Alchemy\Zippy\Parser\ParserInterface;
-use Alchemy\Zippy\Parser\ZipOutputParser;
 
 class ParserFactory
 {

+ 1 - 2
vendor/alchemy/zippy/src/Alchemy/Zippy/ProcessBuilder/ProcessBuilderFactory.php

@@ -12,7 +12,6 @@
 namespace Alchemy\Zippy\ProcessBuilder;
 
 use Alchemy\Zippy\Exception\InvalidArgumentException;
-use Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface;
 use Symfony\Component\Process\ProcessBuilder;
 
 class ProcessBuilderFactory implements ProcessBuilderFactoryInterface
@@ -67,6 +66,6 @@ class ProcessBuilderFactory implements ProcessBuilderFactoryInterface
             throw new InvalidArgumentException('No binary set');
         }
 
-        return ProcessBuilder::create(array($this->binary));
+        return ProcessBuilder::create(array($this->binary))->setTimeout(null);
     }
 }

+ 9 - 3
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/RequestMapper.php

@@ -32,16 +32,22 @@ class RequestMapper
      */
     public function map($context, array $resources)
     {
-        $collection = new ResourceCollection($context);
+        $data = array();
 
         foreach ($resources as $location => $resource) {
             if (is_int($location)) {
-                $collection->add(new Resource($resource, $this->locator->locate($context, $resource)));
+                $data[] = new Resource($resource, $this->locator->locate($context, $resource));
             } else {
-                $collection->add(new Resource($resource, ltrim($location, '/')));
+                $data[] = new Resource($resource, ltrim($location, '/'));
             }
         }
 
+        if (count($data) === 1) {
+            $context = $data[0]->getOriginal();
+        }
+
+        $collection = new ResourceCollection($context, $data, false);
+
         return $collection;
     }
 

+ 33 - 3
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/Resource.php

@@ -65,12 +65,42 @@ class Resource
             return false;
         }
 
-        $data = parse_url($this->original);
-
-        if (!isset($data['path'])) {
+        if (!$this->isLocal()) {
             return false;
         }
 
+        $data = parse_url($this->original);
+
         return sprintf('%s/%s', rtrim($context, '/'), $this->target) === $data['path'];
     }
+
+    /**
+     * Returns a context for computing this resource in case it is possible.
+     *
+     * Useful to avoid teleporting.
+     *
+     * @return null|string
+     */
+    public function getContextForProcessInSinglePlace()
+    {
+        if (!$this->isLocal()) {
+            return null;
+        }
+
+        if (basename($this->original) === $this->target) {
+            return dirname($this->original);
+        }
+    }
+
+    /**
+     * Returns true if the resource is local.
+     *
+     * @return Boolean
+     */
+    private function isLocal()
+    {
+        $data = parse_url($this->original);
+
+        return isset($data['path']);
+    }
 }

+ 19 - 32
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/ResourceCollection.php

@@ -11,22 +11,30 @@
 
 namespace Alchemy\Zippy\Resource;
 
+use Alchemy\Zippy\Exception\InvalidArgumentException;
 use Doctrine\Common\Collections\ArrayCollection;
 
 class ResourceCollection extends ArrayCollection
 {
     private $context;
-    private $temporary = false;
+    private $temporary;
 
     /**
      * Constructor
      *
-     * @param String $context
-     * @param array  $elements An array of Resource
+     * @param String     $context
+     * @param Resource[] $elements An array of Resource
      */
-    public function __construct($context, array $elements = array())
+    public function __construct($context, array $elements, $temporary)
     {
+        array_walk($elements, function ($element) {
+            if (!$element instanceof Resource) {
+                throw new InvalidArgumentException('ResourceCollection only accept Resource elements');
+            }
+        });
+
         $this->context = $context;
+        $this->temporary = (Boolean) $temporary;
         parent::__construct($elements);
     }
 
@@ -40,20 +48,6 @@ class ResourceCollection extends ArrayCollection
         return $this->context;
     }
 
-    /**
-     * Sets the context of the current collection
-     *
-     * @param type $context
-     *
-     * @return ResourceCollection
-     */
-    public function setContext($context)
-    {
-        $this->context = $context;
-
-        return $this;
-    }
-
     /**
      * Tells whether the collection is temporary or not.
      *
@@ -67,20 +61,6 @@ class ResourceCollection extends ArrayCollection
         return $this->temporary;
     }
 
-    /**
-     * Sets the collection temporary
-     *
-     * @param Boolean $temporary
-     *
-     * @return ResourceCollection
-     */
-    public function setTemporary($temporary)
-    {
-        $this->temporary = (Boolean) $temporary;
-
-        return $this;
-    }
-
     /**
      * Returns true if all resources can be processed in place, false otherwise
      *
@@ -88,6 +68,13 @@ class ResourceCollection extends ArrayCollection
      */
     public function canBeProcessedInPlace()
     {
+        if (count($this) === 1) {
+            if (null !== $context = $this->first()->getContextForProcessInSinglePlace()) {
+                $this->context = $context;
+                return true;
+            }
+        }
+
         foreach ($this as $resource) {
             if (!$resource->canBeProcessedInPlace($this->context)) {
                 return false;

+ 1 - 5
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/ResourceManager.php

@@ -12,8 +12,6 @@
 namespace Alchemy\Zippy\Resource;
 
 use Alchemy\Zippy\Exception\IOException;
-use Alchemy\Zippy\Resource\RequestMapper;
-use Alchemy\Zippy\Resource\ResourceTeleporter;
 use Symfony\Component\Filesystem\Filesystem;
 use Symfony\Component\Filesystem\Exception\IOException as SfIOException;
 
@@ -65,13 +63,11 @@ class ResourceManager
                 throw new IOException(sprintf('Could not create temporary folder %s', $context), $e->getCode(), $e);
             }
 
-            $collection->setContext($context);
-
             foreach ($collection as $resource) {
                 $this->teleporter->teleport($context, $resource);
             }
 
-            $collection->setTemporary(true);
+            $collection = new ResourceCollection($context, $collection->toArray(), true);
         }
 
         return $collection;

+ 1 - 1
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/TargetLocator.php

@@ -120,7 +120,7 @@ class TargetLocator
     /**
      * Checks whether the path belong to the context
      *
-     * @param String $path A resource path
+     * @param String $path    A resource path
      * @param String $context
      *
      * @return Boolean

+ 1 - 1
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/Teleporter/GuzzleTeleporter.php

@@ -61,7 +61,7 @@ class GuzzleTeleporter extends AbstractTeleporter
     {
         $client = new Client();
 
-        $client->getEventDispatcher()->addListener('request.error', function(Event $event) {
+        $client->getEventDispatcher()->addListener('request.error', function (Event $event) {
             // override guzzle default behavior of throwing exceptions
             // when 4xx & 5xx responses are encountered
             $event->stopPropagation();

+ 1 - 1
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/Teleporter/TeleporterInterface.php

@@ -21,7 +21,7 @@ interface TeleporterInterface
      * @param Resource $resource A Resource
      * @param string   $context  The current context
      *
-     * @throws IOException In case file could not be written on local
+     * @throws IOException              In case file could not be written on local
      * @throws InvalidArgumentException In case path to file is not valid
      */
     public function teleport(Resource $resource, $context);

+ 3 - 3
vendor/alchemy/zippy/src/Alchemy/Zippy/Resource/TeleporterContainer.php

@@ -64,13 +64,13 @@ class TeleporterContainer extends \Pimple
     {
         $container = new static();
 
-        $container['stream-teleporter'] = $container->share(function(){
+        $container['stream-teleporter'] = $container->share(function () {
             return StreamTeleporter::create();
         });
-        $container['local-teleporter'] = $container->share(function(){
+        $container['local-teleporter'] = $container->share(function () {
             return LocalTeleporter::create();
         });
-        $container['guzzle-teleporter'] = $container->share(function(){
+        $container['guzzle-teleporter'] = $container->share(function () {
             return GuzzleTeleporter::create();
         });
 

+ 79 - 0
vendor/alchemy/zippy/tests/Alchemy/Zippy/Functional/Add2ArchiveTest.php

@@ -0,0 +1,79 @@
+<?php
+
+namespace Alchemy\Zippy\Functional;
+
+use Symfony\Component\Finder\Finder;
+
+class Add2ArchiveTest extends FunctionalTestCase
+{
+    private static $file;
+
+    public static function tearDownAfterClass()
+    {
+        parent::tearDownAfterClass();
+
+        if (file_exists(self::$file)) {
+            unlink(self::$file);
+            self::$file = null;
+        }
+    }
+
+    /**
+     * @return \Alchemy\Zippy\Archive\ArchiveInterface
+     */
+    private function create()
+    {
+        $adapter = $this->getAdapter();
+        $extension = $this->getArchiveExtensionForAdapter($adapter);
+
+        self::$file = __DIR__ . '/samples/create-archive.' . $extension;
+
+        $archive = $adapter->create(self::$file, array(
+            'directory' => __DIR__ . '/samples/directory',
+        ), true);
+
+        return $archive;
+    }
+
+    public function testAdd()
+    {
+        $archive = $this->create();
+
+        $target = __DIR__ . '/samples/tmp';
+        if (!is_dir($target)) {
+            mkdir($target);
+        }
+
+        if (in_array(get_class($this->getAdapter()), array(
+            'Alchemy\Zippy\Adapter\GNUTar\TarGzGNUTarAdapter',
+            'Alchemy\Zippy\Adapter\GNUTar\TarBz2GNUTarAdapter',
+            'Alchemy\Zippy\Adapter\BSDTar\TarGzBSDTarAdapter',
+            'Alchemy\Zippy\Adapter\BSDTar\TarBz2BSDTarAdapter',
+        ))) {
+            $this->setExpectedException('Alchemy\Zippy\Exception\NotSupportedException', 'Updating a compressed tar archive is not supported.');
+        }
+
+        $archive->addMembers(array('somemorefiles/nicephoto.jpg' => __DIR__ . '/samples/morefiles/morephoto.jpg'));
+        $archive->extract($target);
+
+        $finder = new Finder();
+        $finder
+            ->files()
+            ->in($target);
+
+        $files2find = array(
+            '/directory/README.md',
+            '/directory/photo.jpg',
+            '/somemorefiles/nicephoto.jpg',
+        );
+
+        foreach ($finder as $file) {
+            $this->assertEquals(0, strpos($file->getPathname(), $target));
+            $member = substr($file->getPathname(), strlen($target));
+            $this->assertTrue(in_array($member, $files2find), "looking for $member in files2find");
+            unset($files2find[array_search($member, $files2find)]);
+        }
+
+        $this->assertEquals(array(), $files2find);
+    }
+}

TEMPAT SAMPAH
vendor/alchemy/zippy/tests/Alchemy/Zippy/Functional/samples/morefiles/morephoto.jpg


+ 2 - 1
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/AdapterContainerTest.php

@@ -5,7 +5,7 @@ namespace Alchemy\Zippy\Tests\Adapter;
 use Alchemy\Zippy\Tests\TestCase;
 use Alchemy\Zippy\Adapter\AdapterContainer;
 
-class AdapterContainerTests extends TestCase
+class AdapterContainerTest extends TestCase
 {
     /** @test */
     public function itShouldRegisterAdaptersOnload()
@@ -13,6 +13,7 @@ class AdapterContainerTests extends TestCase
         $container = AdapterContainer::load();
 
         $this->assertInstanceOf('Alchemy\\Zippy\\Adapter\\ZipAdapter', $container['Alchemy\\Zippy\\Adapter\\ZipAdapter']);
+        $this->assertInstanceOf('Alchemy\\Zippy\\Adapter\\ZipExtensionAdapter', $container['Alchemy\\Zippy\\Adapter\\ZipExtensionAdapter']);
         $this->assertInstanceOf('Alchemy\\Zippy\\Adapter\\GNUTar\\TarGNUTarAdapter', $container['Alchemy\\Zippy\\Adapter\\GNUTar\\TarGNUTarAdapter']);
         $this->assertInstanceOf('Alchemy\\Zippy\\Adapter\\GNUTar\\TarGzGNUTarAdapter', $container['Alchemy\\Zippy\\Adapter\\GNUTar\\TarGzGNUTarAdapter']);
         $this->assertInstanceOf('Alchemy\\Zippy\\Adapter\\GNUTar\\TarBz2GNUTarAdapter', $container['Alchemy\\Zippy\\Adapter\\GNUTar\\TarBz2GNUTarAdapter']);

+ 24 - 0
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/AdapterTestCase.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace Alchemy\Zippy\Tests\Adapter;
+
+use Alchemy\Zippy\Tests\TestCase;
+
+abstract class AdapterTestCase extends TestCase
+{
+    public function testIsSupported()
+    {
+        $adapter = $this->provideSupportedAdapter();
+        $this->assertTrue($adapter->isSupported());
+    }
+
+    public function testIsNotSupported()
+    {
+        $adapter = $this->provideNotSupportedAdapter();
+        $this->assertFalse($adapter->isSupported());
+    }
+
+    abstract protected function provideNotSupportedAdapter();
+
+    abstract protected function provideSupportedAdapter();
+}

+ 92 - 174
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/BSDTar/BSDTarAdapterWithOptionsTest.php

@@ -2,10 +2,10 @@
 
 namespace Alchemy\Zippy\Tests\Adapter\BSDTar;
 
-use Alchemy\Zippy\Tests\TestCase;
+use Alchemy\Zippy\Tests\Adapter\AdapterTestCase;
 use Alchemy\Zippy\Parser\ParserFactory;
 
-abstract class BSDTarAdapterWithOptionsTest extends TestCase
+abstract class BSDTarAdapterWithOptionsTest extends AdapterTestCase
 {
     protected static $tarFile;
 
@@ -32,6 +32,11 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
     }
 
     public function setUp()
+    {
+        $this->adapter = $this->provideSupportedAdapter();
+    }
+
+    private function provideAdapter()
     {
         $classname = static::getAdapterClassName();
 
@@ -44,26 +49,55 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
 
         $manager = $this->getResourceManagerMock(__DIR__);
 
-        $this->adapter = new $classname($outputParser, $manager, $inflator);
+        return new $classname($outputParser, $manager, $inflator, $inflator);
+    }
+
+    protected function provideNotSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsNotOk($adapter);
+
+        return $adapter;
+    }
+
+    protected function provideSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsOk($adapter);
+
+        return $adapter;
+    }
+
+    public function testNewinstance()
+    {
+        $classname = static::getAdapterClassName();
+        $finder = $this->getMockBuilder('Symfony\Component\Process\ExecutableFinder')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $manager = $this->getMockBuilder('Alchemy\Zippy\Resource\ResourceManager')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $instance = $classname::newInstance($finder, $manager, $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface'), $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface'));
+        $this->assertInstanceOf($classname, $instance);
     }
 
     public function testCreateNoFiles()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('-'))
@@ -71,62 +105,62 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
 
         $nullFile = defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null';
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(sprintf('--files-from %s', $nullFile)))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
-            ->with($this->equalTo((sprintf('> %s', self::$tarFile))))
+            ->with($this->equalTo((sprintf('> %s', $this->getExpectedAbsolutePathForTarget(self::$tarFile)))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->create(self::$tarFile, array());
     }
 
     public function testCreate()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
-            ->with($this->equalTo(sprintf('--file=%s', self::$tarFile)))
+            ->with($this->equalTo(sprintf('--file=%s', $this->getExpectedAbsolutePathForTarget(self::$tarFile))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('setWorkingDirectory')
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo('lalalalala'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -135,7 +169,8 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
         $outputParser = ParserFactory::create($classname::getName());
         $manager = $this->getResourceManagerMock(__DIR__, array('lalalalala'));
 
-        $this->adapter = new $classname($outputParser, $manager, $this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter = new $classname($outputParser, $manager, $this->getMockedProcessBuilderFactory($mockedProcessBuilder), $this->getMockedProcessBuilderFactory($mockedProcessBuilder, 0));
+        $this->setProbeIsOk($this->adapter);
 
         $this->adapter->create(self::$tarFile, array(__FILE__));
 
@@ -157,38 +192,38 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--list'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('-v'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->listMembers($resource);
     }
@@ -196,53 +231,26 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
     public function testAddFile()
     {
         $resource = $this->getResource(self::$tarFile);
-
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->at(0))
-            ->method('add')
-            ->with($this->equalTo('--delete'))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->at(1))
-            ->method('add')
-            ->with($this->equalTo('--append'))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->at(2))
-            ->method('add')
-            ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($this->getSuccessFullMockProcess()));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
+        $this->setExpectedException('Alchemy\Zippy\Exception\NotSupportedException', 'Updating a compressed tar archive is not supported.');
         $this->adapter->add($resource, array(__DIR__ . '/../TestCase.php'));
     }
 
     public function testgetVersion()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--version'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->getInflatorVersion();
     }
@@ -251,32 +259,32 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $dir = $this->adapter->extract($resource);
         $pathinfo = pathinfo(self::$tarFile);
@@ -287,50 +295,50 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('--directory'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo(__DIR__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(5))
             ->method('add')
             ->with($this->equalTo(__FILE__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->extractMembers($resource, array(__FILE__), __DIR__);
     }
@@ -339,39 +347,39 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--delete'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(__DIR__ . '/../TestCase.php'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo('path-to-file'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -382,7 +390,7 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
             ->method('getLocation')
             ->will($this->returnValue('path-to-file'));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->remove($resource, array(
             __DIR__ . '/../TestCase.php',
@@ -390,65 +398,6 @@ abstract class BSDTarAdapterWithOptionsTest extends TestCase
         ));
     }
 
-    public function testThatGNUTarIsNotMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('tar (GNU tar) 1.17
-Copyright (C) 2007 Free Software Foundation, Inc.
-License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Modified to support extended attributes.
-Written by John Gilmore and Jay Fenlason.'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertFalse($this->adapter->isSupported());
-    }
-
-    public function testThatBsdTarIsMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('bsdtar 2.8.3 - libarchive 2.8.3'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertTrue($this->adapter->isSupported());
-    }
-
     public function testGetName()
     {
         $classname = static::getAdapterClassName();
@@ -471,37 +420,6 @@ Written by John Gilmore and Jay Fenlason.'));
 
     protected static function getAdapterClassName()
     {
-        $this->fail(sprintf('Method %s should be implemented', __METHOD__));
-    }
-
-    private function getSuccessFullMockProcess()
-    {
-        $mockProcess = $this
-            ->getMockBuilder('Symfony\Component\Process\Process')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('run');
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('isSuccessful')
-            ->will($this->returnValue(true));
-
-        return $mockProcess;
-    }
-
-    private function getZippyMockBuilder($mockedProcessBuilder)
-    {
-        $mockBuilder = $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface');
-
-        $mockBuilder
-            ->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($mockedProcessBuilder));
-
-        return $mockBuilder;
+        self::fail(sprintf('Method %s should be implemented', __METHOD__));
     }
 }

+ 77 - 151
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/BSDTar/TarBSDTarAdapterTest.php

@@ -3,10 +3,10 @@
 namespace Alchemy\Zippy\Tests\Adapter\BSDTar;
 
 use Alchemy\Zippy\Adapter\BSDTar\TarBSDTarAdapter;
-use Alchemy\Zippy\Tests\TestCase;
+use Alchemy\Zippy\Tests\Adapter\AdapterTestCase;
 use Alchemy\Zippy\Parser\ParserFactory;
 
-class TarBSDTarAdapterTest extends TestCase
+class TarBSDTarAdapterTest extends AdapterTestCase
 {
     protected static $tarFile;
 
@@ -32,6 +32,11 @@ class TarBSDTarAdapterTest extends TestCase
     }
 
     public function setUp()
+    {
+        $this->adapter = $this->provideSupportedAdapter();
+    }
+
+    private function provideAdapter()
     {
         $inflator = $this->getMockBuilder('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactory')
                 ->disableOriginalConstructor()
@@ -42,20 +47,36 @@ class TarBSDTarAdapterTest extends TestCase
 
         $manager = $this->getResourceManagerMock(__DIR__);
 
-        $this->adapter = new TarBSDTarAdapter($outputParser, $manager, $inflator);
+        return new TarBSDTarAdapter($outputParser, $manager, $inflator, $inflator);
+    }
+
+    protected function provideNotSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsNotOk($adapter);
+
+        return $adapter;
+    }
+
+    protected function provideSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsOk($adapter);
+
+        return $adapter;
     }
 
     public function testCreateNoFiles()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('-'))
@@ -63,24 +84,24 @@ class TarBSDTarAdapterTest extends TestCase
 
         $nullFile = defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null';
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(sprintf('--files-from %s', $nullFile)))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
-            ->with($this->equalTo((sprintf('> %s', self::$tarFile))))
+            ->with($this->equalTo((sprintf('> %s', $this->getExpectedAbsolutePathForTarget(self::$tarFile)))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->create(self::$tarFile, array());
     }
@@ -89,37 +110,38 @@ class TarBSDTarAdapterTest extends TestCase
     {
         $outputParser = ParserFactory::create(TarBSDTarAdapter::getName());
         $manager = $this->getResourceManagerMock(__DIR__, array('lalalalala'));
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
-            ->with($this->equalTo(sprintf('--file=%s', self::$tarFile)))
+            ->with($this->equalTo(sprintf('--file=%s', $this->getExpectedAbsolutePathForTarget(self::$tarFile))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('setWorkingDirectory')
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('lalalalala'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter = new TarBSDTarAdapter($outputParser, $manager, $this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter = new TarBSDTarAdapter($outputParser, $manager, $this->getMockedProcessBuilderFactory($mockedProcessBuilder), $this->getMockedProcessBuilderFactory($mockedProcessBuilder, 0));
+        $this->setProbeIsOk($this->adapter);
         $this->adapter->create(self::$tarFile, array(__FILE__));
 
         return self::$tarFile;
@@ -140,32 +162,32 @@ class TarBSDTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--list'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('-v'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->listMembers($resource);
     }
@@ -174,52 +196,46 @@ class TarBSDTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
-            ->with($this->equalTo('--delete'))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->at(1))
-            ->method('add')
             ->with($this->equalTo('--append'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
-            ->expects($this->at(2))
+        $mockedProcessBuilder
+            ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->add($resource, array(__DIR__ . '/../TestCase.php'));
     }
 
     public function testgetVersion()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--version'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->getInflatorVersion();
     }
@@ -228,26 +244,26 @@ class TarBSDTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $dir = $this->adapter->extract($resource);
         $pathinfo = pathinfo(self::$tarFile);
@@ -258,44 +274,44 @@ class TarBSDTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('--directory'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(__DIR__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo(__FILE__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->extractMembers($resource, array(__FILE__), __DIR__);
     }
@@ -304,33 +320,33 @@ class TarBSDTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--delete'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(__DIR__ . '/../TestCase.php'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('path-to-file'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -342,7 +358,7 @@ class TarBSDTarAdapterTest extends TestCase
             ->method('getLocation')
             ->will($this->returnValue('path-to-file'));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->remove($resource, array(
             __DIR__ . '/../TestCase.php',
@@ -350,65 +366,6 @@ class TarBSDTarAdapterTest extends TestCase
         ));
     }
 
-    public function testThatGNUTarIsNotMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('tar (GNU tar) 1.17
-Copyright (C) 2007 Free Software Foundation, Inc.
-License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Modified to support extended attributes.
-Written by John Gilmore and Jay Fenlason.'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertFalse($this->adapter->isSupported());
-    }
-
-    public function testThatBsdTarIsMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('bsdtar 2.8.3 - libarchive 2.8.3'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertTrue($this->adapter->isSupported());
-    }
-
     public function testGetName()
     {
         $this->assertEquals('bsd-tar', TarBSDTarAdapter::getName());
@@ -423,35 +380,4 @@ Written by John Gilmore and Jay Fenlason.'));
     {
         $this->assertEquals(array('bsdtar', 'tar'), TarBSDTarAdapter::getDefaultDeflatorBinaryName());
     }
-
-    private function getSuccessFullMockProcess()
-    {
-        $mockProcess = $this
-            ->getMockBuilder('Symfony\Component\Process\Process')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('run');
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('isSuccessful')
-            ->will($this->returnValue(true));
-
-        return $mockProcess;
-    }
-
-    private function getZippyMockBuilder($mockedProcessBuilder)
-    {
-        $mockBuilder = $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface');
-
-        $mockBuilder
-            ->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($mockedProcessBuilder));
-
-        return $mockBuilder;
-    }
 }

+ 83 - 178
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/GNUTar/GNUTarAdapterWithOptionsTest.php

@@ -2,10 +2,10 @@
 
 namespace Alchemy\Zippy\Tests\Adapter\GNUTar;
 
-use Alchemy\Zippy\Tests\TestCase;
+use Alchemy\Zippy\Tests\Adapter\AdapterTestCase;
 use Alchemy\Zippy\Parser\ParserFactory;
 
-abstract class GNUTarAdapterWithOptionsTest extends TestCase
+abstract class GNUTarAdapterWithOptionsTest extends AdapterTestCase
 {
     protected static $tarFile;
 
@@ -32,6 +32,11 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
     }
 
     public function setUp()
+    {
+        $this->adapter = $this->provideSupportedAdapter();
+    }
+
+    private function provideAdapter()
     {
         $classname = static::getAdapterClassName();
 
@@ -44,26 +49,42 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
 
         $manager = $this->getResourceManagerMock(__DIR__);
 
-        $this->adapter = new $classname($outputParser, $manager, $inflator);
+        return new $classname($outputParser, $manager, $inflator, $inflator);
+    }
+
+    protected function provideNotSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsNotOk($adapter);
+
+        return $adapter;
+    }
+
+    protected function provideSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsOk($adapter);
+
+        return $adapter;
     }
 
     public function testCreateNoFiles()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('-'))
@@ -71,62 +92,62 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
 
         $nullFile = defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null';
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(sprintf('--files-from %s', $nullFile)))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
-            ->with($this->equalTo((sprintf('> %s', self::$tarFile))))
+            ->with($this->equalTo((sprintf('> %s', $this->getExpectedAbsolutePathForTarget(self::$tarFile)))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->create(self::$tarFile, array());
     }
 
     public function testCreate()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
-            ->with($this->equalTo(sprintf('--file=%s', self::$tarFile)))
+            ->with($this->equalTo(sprintf('--file=%s', $this->getExpectedAbsolutePathForTarget(self::$tarFile))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('setWorkingDirectory')
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo('lalalalala'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -135,7 +156,8 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
         $outputParser = ParserFactory::create($classname::getName());
         $manager = $this->getResourceManagerMock(__DIR__, array('lalalalala'));
 
-        $this->adapter = new $classname($outputParser, $manager, $this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter = new $classname($outputParser, $manager, $this->getMockedProcessBuilderFactory($mockedProcessBuilder), $this->getMockedProcessBuilderFactory($mockedProcessBuilder, 0));
+        $this->setProbeIsOk($this->adapter);
 
         $this->adapter->create(self::$tarFile, array(__FILE__));
     }
@@ -152,44 +174,44 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--utc'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--list'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('-v'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->listMembers($resource);
     }
@@ -197,53 +219,26 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
     public function testAddFile()
     {
         $resource = $this->getResource(self::$tarFile);
-
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->at(0))
-            ->method('add')
-            ->with($this->equalTo('--delete'))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->at(1))
-            ->method('add')
-            ->with($this->equalTo('--append'))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->at(2))
-            ->method('add')
-            ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($this->getSuccessFullMockProcess()));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
+        $this->setExpectedException('Alchemy\Zippy\Exception\NotSupportedException', 'Updating a compressed tar archive is not supported.');
         $this->adapter->add($resource, array(__DIR__ . '/../TestCase.php'));
     }
 
     public function testgetVersion()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--version'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->getInflatorVersion();
     }
@@ -252,38 +247,38 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('--overwrite-dir'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('--overwrite'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $dir = $this->adapter->extract($resource);
         $pathinfo = pathinfo(self::$tarFile);
@@ -294,62 +289,62 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('--overwrite-dir'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('--overwrite'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(5))
             ->method('add')
             ->with($this->equalTo('--directory'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(6))
             ->method('add')
             ->with($this->equalTo(__DIR__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(7))
             ->method('add')
             ->with($this->equalTo(__FILE__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->extractMembers($resource, array(__FILE__), __DIR__);
     }
@@ -358,39 +353,39 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--delete'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo($this->getOptions()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(__DIR__ . '/../TestCase.php'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo('path-to-file'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -402,7 +397,7 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
             ->method('getLocation')
             ->will($this->returnValue('path-to-file'));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->remove($resource, array(
             __DIR__ . '/../TestCase.php',
@@ -410,65 +405,6 @@ abstract class GNUTarAdapterWithOptionsTest extends TestCase
         ));
     }
 
-    public function testThatGnuTarIsMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('tar (GNU tar) 1.17
-Copyright (C) 2007 Free Software Foundation, Inc.
-License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Modified to support extended attributes.
-Written by John Gilmore and Jay Fenlason.'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertTrue($this->adapter->isSupported());
-    }
-
-    public function testThatBsdTarIsNotMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('bsdtar 2.8.3 - libarchive 2.8.3'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertFalse($this->adapter->isSupported());
-    }
-
     public function testGetName()
     {
         $classname = static::getAdapterClassName();
@@ -491,37 +427,6 @@ Written by John Gilmore and Jay Fenlason.'));
 
     protected static function getAdapterClassName()
     {
-        $this->fail(sprintf('Method %s should be implemented', __METHOD__));
-    }
-
-    private function getSuccessFullMockProcess()
-    {
-        $mockProcess = $this
-            ->getMockBuilder('Symfony\Component\Process\Process')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('run');
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('isSuccessful')
-            ->will($this->returnValue(true));
-
-        return $mockProcess;
-    }
-
-    private function getZippyMockBuilder($mockedProcessBuilder)
-    {
-        $mockBuilder = $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface');
-
-        $mockBuilder
-            ->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($mockedProcessBuilder));
-
-        return $mockBuilder;
+        self::fail(sprintf('Method %s should be implemented', __METHOD__));
     }
 }

+ 82 - 156
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/GNUTar/TarGNUTarAdapterTest.php

@@ -3,10 +3,10 @@
 namespace Alchemy\Zippy\Tests\Adapter\GNUTar;
 
 use Alchemy\Zippy\Adapter\GNUTar\TarGNUTarAdapter;
-use Alchemy\Zippy\Tests\TestCase;
+use Alchemy\Zippy\Tests\Adapter\AdapterTestCase;
 use Alchemy\Zippy\Parser\ParserFactory;
 
-class TarGNUTarAdapterTest extends TestCase
+class TarGNUTarAdapterTest extends AdapterTestCase
 {
     protected static $tarFile;
 
@@ -32,6 +32,11 @@ class TarGNUTarAdapterTest extends TestCase
     }
 
     public function setUp()
+    {
+        $this->adapter = $this->provideSupportedAdapter();
+    }
+
+    private function provideAdapter()
     {
         $inflator = $this->getMockBuilder('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactory')
                 ->disableOriginalConstructor()
@@ -42,20 +47,36 @@ class TarGNUTarAdapterTest extends TestCase
 
         $manager = $this->getResourceManagerMock(__DIR__);
 
-        $this->adapter = new TarGNUTarAdapter($outputParser, $manager, $inflator);
+        return new TarGNUTarAdapter($outputParser, $manager, $inflator, $inflator);
+    }
+
+    protected function provideSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsOk($adapter);
+
+        return $adapter;
+    }
+
+    protected function provideNotSupportedAdapter()
+    {
+        $adapter = $this->provideAdapter();
+        $this->setProbeIsNotOk($adapter);
+
+        return $adapter;
     }
 
     public function testCreateNoFiles()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('-'))
@@ -63,63 +84,64 @@ class TarGNUTarAdapterTest extends TestCase
 
         $nullFile = defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null';
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(sprintf('--files-from %s', $nullFile)))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
-            ->with($this->equalTo(sprintf('> %s', self::$tarFile)))
+            ->with($this->equalTo(sprintf('> %s', $this->getExpectedAbsolutePathForTarget(self::$tarFile))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->create(self::$tarFile, array());
     }
 
     public function testCreate()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--create'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
-            ->with($this->equalTo(sprintf('--file=%s', self::$tarFile)))
+            ->with($this->equalTo(sprintf('--file=%s', $this->getExpectedAbsolutePathForTarget(self::$tarFile))))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('setWorkingDirectory')
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('lalalalala'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
         $manager = $this->getResourceManagerMock(__DIR__, array('lalalalala'));
         $outputParser = ParserFactory::create(TarGNUTarAdapter::getName());
-        $this->adapter = new TarGNUTarAdapter($outputParser, $manager, $this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter = new TarGNUTarAdapter($outputParser, $manager, $this->getMockedProcessBuilderFactory($mockedProcessBuilder), $this->getMockedProcessBuilderFactory($mockedProcessBuilder, 0));
+        $this->setProbeIsOk($this->adapter);
 
         $this->adapter->create(self::$tarFile, array(__FILE__));
     }
@@ -136,38 +158,38 @@ class TarGNUTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--utc'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--list'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('-v'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->listMembers($resource);
     }
@@ -176,52 +198,46 @@ class TarGNUTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
-            ->with($this->equalTo('--delete'))
-            ->will($this->returnSelf());
-
-        $mockProcessBuilder
-            ->expects($this->at(1))
-            ->method('add')
             ->with($this->equalTo('--append'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
-            ->expects($this->at(2))
+        $mockedProcessBuilder
+            ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->add($resource, array(__DIR__ . '/../TestCase.php'));
     }
 
     public function testgetVersion()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--version'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->getInflatorVersion();
     }
@@ -230,38 +246,38 @@ class TarGNUTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo(sprintf('--file=%s', $resource->getResource())))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('--overwrite-dir'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('--overwrite'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $dir = $this->adapter->extract($resource);
         $pathinfo = pathinfo(self::$tarFile);
@@ -272,56 +288,56 @@ class TarGNUTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--extract'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo('--overwrite-dir'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('--overwrite'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(4))
             ->method('add')
             ->with($this->equalTo('--directory'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(5))
             ->method('add')
             ->with($this->equalTo(__DIR__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(6))
             ->method('add')
             ->with($this->equalTo(__FILE__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->extractMembers($resource, array(__FILE__), __DIR__);
     }
@@ -330,33 +346,33 @@ class TarGNUTarAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$tarFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('--delete'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('--file=' . $resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(__DIR__ . '/../TestCase.php'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('path-to-file'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -368,7 +384,7 @@ class TarGNUTarAdapterTest extends TestCase
             ->method('getLocation')
             ->will($this->returnValue('path-to-file'));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->remove($resource, array(
             __DIR__ . '/../TestCase.php',
@@ -376,65 +392,6 @@ class TarGNUTarAdapterTest extends TestCase
         ));
     }
 
-    public function testThatGnuTarIsMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('tar (GNU tar) 1.17
-Copyright (C) 2007 Free Software Foundation, Inc.
-License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Modified to support extended attributes.
-Written by John Gilmore and Jay Fenlason.'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertTrue($this->adapter->isSupported());
-    }
-
-    public function testThatBsdTarIsMarkedAsSupported()
-    {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
-
-        $mockProcessBuilder
-            ->expects($this->any())
-            ->method('add')
-            ->will($this->returnSelf());
-
-        $process = $this->getSuccessFullMockProcess();
-
-        $mockProcessBuilder
-            ->expects($this->once())
-            ->method('getProcess')
-            ->will($this->returnValue($process));
-
-        $process
-            ->expects($this->once())
-            ->method('getOutput')
-            ->will($this->returnValue('bsdtar 2.8.3 - libarchive 2.8.3'));
-
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
-
-        $this->assertFalse($this->adapter->isSupported());
-    }
-
     public function testGetName()
     {
         $this->assertEquals('gnu-tar', TarGNUTarAdapter::getName());
@@ -449,35 +406,4 @@ Written by John Gilmore and Jay Fenlason.'));
     {
         $this->assertEquals(array('gnutar', 'tar'), TarGNUTarAdapter::getDefaultDeflatorBinaryName());
     }
-
-    private function getSuccessFullMockProcess()
-    {
-        $mockProcess = $this
-            ->getMockBuilder('Symfony\Component\Process\Process')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('run');
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('isSuccessful')
-            ->will($this->returnValue(true));
-
-        return $mockProcess;
-    }
-
-    private function getZippyMockBuilder($mockedProcessBuilder)
-    {
-        $mockBuilder = $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface');
-
-        $mockBuilder
-            ->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($mockedProcessBuilder));
-
-        return $mockBuilder;
-    }
 }

+ 1 - 1
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/Resource/FileResourceTest.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace Alchemy\Zippy\Tests\Adapter;
+namespace Alchemy\Zippy\Tests\Adapter\Resource;
 
 use Alchemy\Zippy\Tests\TestCase;
 use Alchemy\Zippy\Adapter\Resource\FileResource;

+ 104 - 0
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/AbstractTarVersionProbeTest.php

@@ -0,0 +1,104 @@
+<?php
+
+namespace Alchemy\Zippy\Tests\Adapter\VersionProbe;
+
+use Alchemy\Zippy\Tests\TestCase;
+use Alchemy\Zippy\Adapter\VersionProbe\BSDTarVersionProbe;
+use Alchemy\Zippy\Adapter\VersionProbe\VersionProbeInterface;
+
+abstract class AbstractTarVersionProbeTest extends TestCase
+{
+    /**
+     * @covers Alchemy\Zippy\Adapter\VersionProbe\BSDTarVersionProbe::getStatus
+     */
+    public function testGetStatusIsOk()
+    {
+        $mockInflator = $this->getBuilder($this->getCorrespondingVersionOutput());
+        $mockDeflator = $this->getBuilder($this->getCorrespondingVersionOutput());
+
+        $classname = $this->getProbeClassName();
+
+        $probe = new $classname($this->getMockedProcessBuilderFactory($mockInflator), $this->getMockedProcessBuilderFactory($mockDeflator));
+
+        $this->assertEquals(VersionProbeInterface::PROBE_OK, $probe->getStatus());
+        // second time is served from cache
+        $this->assertEquals(VersionProbeInterface::PROBE_OK, $probe->getStatus());
+    }
+
+    /**
+     * @dataProvider provideInvalidVersions
+     * @covers Alchemy\Zippy\Adapter\VersionProbe\BSDTarVersionProbe::getStatus
+     */
+    public function testGetStatusIsNotOk($inflatorVersion, $deflatorVersion, $inflatorCall, $deflatorCall)
+    {
+        $mockInflatorBuilder = $inflatorVersion ? $this->getBuilder($inflatorVersion, $inflatorCall) : null;
+        $mockDeflatorBuilder = $deflatorVersion ? $this->getBuilder($deflatorVersion, $deflatorCall) : null;
+
+        $builderInflator = $mockInflatorBuilder ? $this->getMockedProcessBuilderFactory($mockInflatorBuilder, $inflatorCall ? 1 : 0) : null;
+        $builderDeflator = $mockDeflatorBuilder ? $this->getMockedProcessBuilderFactory($mockDeflatorBuilder, $deflatorCall ? 1 : 0) : null;
+
+        $classname = $this->getProbeClassName();
+
+        $probe = new $classname($builderInflator, $builderDeflator);
+
+        $this->assertEquals(VersionProbeInterface::PROBE_NOTSUPPORTED, $probe->getStatus());
+        // second time is served from cache
+        $this->assertEquals(VersionProbeInterface::PROBE_NOTSUPPORTED, $probe->getStatus());
+    }
+
+    public function provideInvalidVersions()
+    {
+        return array(
+            array($this->getCorrespondingVersionOutput(), $this->getNonCorrespondingVersionOutput(), true, true),
+            array($this->getNonCorrespondingVersionOutput(), $this->getCorrespondingVersionOutput(), true, false),
+        );
+    }
+
+    protected function getBuilder($version, $call = true)
+    {
+        $mock = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+
+        $mockBuilder = $mock
+            ->expects($call ? $this->once() : $this->never())
+            ->method('add');
+        if ($call) {
+            $mockBuilder->with('--version');
+        }
+        $mockBuilder->will($this->returnSelf());
+
+        $process = $this->getSuccessFullMockProcess($call ? 1 : 0);
+
+        $mock
+            ->expects($call ? $this->once() : $this->never())
+            ->method('getProcess')
+            ->will($this->returnValue($process));
+
+        $process
+            ->expects($call ? $this->once() : $this->never())
+            ->method('getOutput')
+            ->will($this->returnValue($version));
+
+        return $mock;
+    }
+
+    protected function getBSDTarVersionOutput()
+    {
+        return 'bsdtar 2.8.3 - libarchive 2.8.3';
+    }
+
+    protected function getGNUTarVersionOutput()
+    {
+        return 'tar (GNU tar) 1.17
+Copyright (C) 2007 Free Software Foundation, Inc.
+License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Modified to support extended attributes.
+Written by John Gilmore and Jay Fenlason.';
+    }
+
+    abstract public function getProbeClassName();
+    abstract public function getCorrespondingVersionOutput();
+    abstract public function getNonCorrespondingVersionOutput();
+}

+ 21 - 0
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/BSDTarVersionProbeTest.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Alchemy\Zippy\Tests\Adapter\VersionProbe;
+
+class BSDTarVersionProbeTest extends AbstractTarVersionProbeTest
+{
+    public function getProbeClassName()
+    {
+        return 'Alchemy\Zippy\Adapter\VersionProbe\BSDTarVersionProbe';
+    }
+
+    public function getCorrespondingVersionOutput()
+    {
+        return $this->getBSDTarVersionOutput();
+    }
+
+    public function getNonCorrespondingVersionOutput()
+    {
+        return $this->getGNUTarVersionOutput();
+    }
+}

+ 21 - 0
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/GNUTarVersionProbeTest.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Alchemy\Zippy\Tests\Adapter\VersionProbe;
+
+class GNUTarVersionProbeTest extends AbstractTarVersionProbeTest
+{
+    public function getProbeClassName()
+    {
+        return 'Alchemy\Zippy\Adapter\VersionProbe\GNUTarVersionProbe';
+    }
+
+    public function getCorrespondingVersionOutput()
+    {
+        return $this->getGNUTarVersionOutput();
+    }
+
+    public function getNonCorrespondingVersionOutput()
+    {
+        return $this->getBSDTarVersionOutput();
+    }
+}

+ 24 - 0
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/ZipExtensionVersionProbeTest.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace Alchemy\Zippy\Tests\Adapter\VersionProbe;
+
+use Alchemy\Zippy\Tests\TestCase;
+use Alchemy\Zippy\Adapter\VersionProbe\ZipExtensionVersionProbe;
+use Alchemy\Zippy\Adapter\VersionProbe\VersionProbeInterface;
+
+class ZipExtensionVersionProbeTest extends TestCase
+{
+    /**
+     * @covers Alchemy\Zippy\Adapter\VersionProbe\ZipExtensionVersionProbe::getStatus
+     */
+    public function testGetStatus()
+    {
+        $expectation = VersionProbeInterface::PROBE_OK;
+        if (false === class_exists('ZipArchive')) {
+            $expectation = VersionProbeInterface::PROBE_NOTSUPPORTED;
+        }
+
+        $probe = new ZipExtensionVersionProbe();
+        $this->assertEquals($expectation, $probe->getStatus());
+    }
+}

+ 143 - 0
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/VersionProbe/ZipVersionProbeTest.php

@@ -0,0 +1,143 @@
+<?php
+
+namespace Alchemy\Zippy\Tests\Adapter\VersionProbe;
+
+use Alchemy\Zippy\Tests\TestCase;
+use Alchemy\Zippy\Adapter\VersionProbe\ZipVersionProbe;
+use Alchemy\Zippy\Adapter\VersionProbe\VersionProbeInterface;
+
+class ZipVersionProbeTest extends TestCase
+{
+    /**
+     * @covers Alchemy\Zippy\Adapter\VersionProbe\ZipVersionProbe::getStatus
+     */
+    public function testGetStatusIsOk()
+    {
+        $mockedProcessBuilderInflator = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+
+        $mockedProcessBuilderInflator
+            ->expects($this->once())
+            ->method('add')
+            ->with('-h')
+            ->will($this->returnSelf());
+        $processInflator = $this->getSuccessFullMockProcess();
+        $mockedProcessBuilderInflator
+            ->expects($this->once())
+            ->method('getProcess')
+            ->will($this->returnValue($processInflator));
+        $processInflator
+            ->expects($this->once())
+            ->method('getOutput')
+            ->will($this->returnValue('Copyright (c) 1990-2008 Info-ZIP - Type \'zip "-L"\' for software license.
+Zip 3.0 (July 5th 2008). Usage:
+zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
+  The default action is to add or replace zipfile entries from list, which
+  can include the special name - to compress standard input.
+  If zipfile and list are omitted, zip compresses stdin to stdout.
+  -f   freshen: only changed files  -u   update: only changed or new files
+  -d   delete entries in zipfile    -m   move into zipfile (delete OS files)
+  -r   recurse into directories     -j   junk (don\'t record) directory names
+  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
+  -1   compress faster              -9   compress better
+  -q   quiet operation              -v   verbose operation/print version info
+  -c   add one-line comments        -z   add zipfile comment
+  -@   read names from stdin        -o   make zipfile as old as latest entry
+  -x   exclude the following names  -i   include only the following names
+  -F   fix zipfile (-FF try harder) -D   do not add directory entries
+  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
+  -T   test zipfile integrity       -X   eXclude eXtra file attributes
+  -y   store symbolic links as the link instead of the referenced file
+  -e   encrypt                      -n   don\'t compress these suffixes
+  -h2  show more help'));
+
+        $mockedProcessBuilderDeflator = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+
+        $mockedProcessBuilderDeflator
+            ->expects($this->once())
+            ->method('add')
+            ->with('-h')
+            ->will($this->returnSelf());
+        $processDeflator = $this->getSuccessFullMockProcess();
+        $mockedProcessBuilderDeflator
+            ->expects($this->once())
+            ->method('getProcess')
+            ->will($this->returnValue($processDeflator));
+        $processDeflator
+            ->expects($this->once())
+            ->method('getOutput')
+            ->will($this->returnValue('UnZip 5.52 of 28 February 2005, by Info-ZIP.  Maintained by C. Spieler.  Send
+bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
+
+Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
+  Default action is to extract files in list, except those in xlist, to exdir;
+  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).
+
+  -p  extract files to pipe, no messages     -l  list files (short format)
+  -f  freshen existing files, create none    -t  test compressed archive data
+  -u  update files, create if necessary      -z  display archive comment
+  -x  exclude files that follow (in xlist)   -d  extract files into exdir
+
+modifiers:                                   -q  quiet mode (-qq => quieter)
+  -n  never overwrite existing files         -a  auto-convert any text files
+  -o  overwrite files WITHOUT prompting      -aa treat ALL files as text
+  -j  junk paths (do not make directories)   -v  be verbose/print version info
+  -C  match filenames case-insensitively     -L  make (some) names lowercase
+  -X  restore UID/GID info                   -V  retain VMS version numbers
+  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
+Examples (see unzip.txt for more info):
+  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
+  unzip -p foo | more  => send contents of foo.zip via pipe into program more
+  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer'));
+
+        $probe = new ZipVersionProbe($this->getMockedProcessBuilderFactory($mockedProcessBuilderInflator), $this->getMockedProcessBuilderFactory($mockedProcessBuilderDeflator));
+
+        $this->assertEquals(VersionProbeInterface::PROBE_OK, $probe->getStatus());
+        // second time is served from cache
+        $this->assertEquals(VersionProbeInterface::PROBE_OK, $probe->getStatus());
+    }
+    /**
+     * @covers Alchemy\Zippy\Adapter\VersionProbe\ZipVersionProbe::getStatus
+     */
+    public function testGetStatusIsNotOk()
+    {
+        $mockedProcessBuilderInflator = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+
+        $mockedProcessBuilderInflator
+            ->expects($this->once())
+            ->method('add')
+            ->with('-h')
+            ->will($this->returnSelf());
+        $processInflator = $this->getSuccessFullMockProcess();
+        $mockedProcessBuilderInflator
+            ->expects($this->once())
+            ->method('getProcess')
+            ->will($this->returnValue($processInflator));
+        $processInflator
+            ->expects($this->once())
+            ->method('getOutput')
+            ->will($this->returnValue('bsdtar 2.8.3 - libarchive 2.8.3'));
+
+        $mockedProcessBuilderDeflator = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+
+        $mockedProcessBuilderDeflator
+            ->expects($this->once())
+            ->method('add')
+            ->with('-h')
+            ->will($this->returnSelf());
+        $processDeflator = $this->getSuccessFullMockProcess();
+        $mockedProcessBuilderDeflator
+            ->expects($this->once())
+            ->method('getProcess')
+            ->will($this->returnValue($processDeflator));
+        $processDeflator
+            ->expects($this->once())
+            ->method('getOutput')
+            ->will($this->returnValue('bsdtar 2.8.3 - libarchive 2.8.3'));
+
+        $probe = new ZipVersionProbe($this->getMockedProcessBuilderFactory($mockedProcessBuilderInflator), $this->getMockedProcessBuilderFactory($mockedProcessBuilderDeflator));
+
+        $this->assertEquals(VersionProbeInterface::PROBE_NOTSUPPORTED, $probe->getStatus());
+        // second time is served from cache
+        $this->assertEquals(VersionProbeInterface::PROBE_NOTSUPPORTED, $probe->getStatus());
+    }
+}

+ 74 - 82
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/ZipAdapterTest.php

@@ -3,10 +3,9 @@
 namespace Alchemy\Zippy\Tests\Adapter;
 
 use Alchemy\Zippy\Adapter\ZipAdapter;
-use Alchemy\Zippy\Tests\TestCase;
 use Alchemy\Zippy\Parser\ParserFactory;
 
-class ZipAdapterTest extends TestCase
+class ZipAdapterTest extends AdapterTestCase
 {
     protected static $zipFile;
 
@@ -32,6 +31,11 @@ class ZipAdapterTest extends TestCase
     }
 
     public function setUp()
+    {
+        $this->adapter = $this->provideSupportedAdapter();
+    }
+
+    protected function provideNotSupportedAdapter()
     {
         $inflator = $deflator = $this->getMockBuilder('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactory')
                                     ->disableOriginalConstructor()
@@ -40,7 +44,25 @@ class ZipAdapterTest extends TestCase
 
         $outputParser = ParserFactory::create(ZipAdapter::getName());
 
-        $this->adapter = new ZipAdapter($outputParser, $this->getResourceManagerMock(), $inflator, $deflator);
+        $adapter = new ZipAdapter($outputParser, $this->getResourceManagerMock(), $inflator, $deflator);
+        $this->setProbeIsNotOk($adapter);
+
+        return $adapter;
+    }
+
+    protected function provideSupportedAdapter()
+    {
+        $inflator = $deflator = $this->getMockBuilder('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactory')
+                                    ->disableOriginalConstructor()
+                                    ->setMethods(array('useBinary'))
+                                    ->getMock();
+
+        $outputParser = ParserFactory::create(ZipAdapter::getName());
+
+        $adapter = new ZipAdapter($outputParser, $this->getResourceManagerMock(), $inflator, $deflator);
+        $this->setProbeIsOk($adapter);
+
+        return $adapter;
     }
 
     /**
@@ -48,41 +70,41 @@ class ZipAdapterTest extends TestCase
      */
     public function testCreateNoFiles()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->create(self::$zipFile, array());
     }
 
     public function testCreate()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('-r'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
-            ->with($this->equalTo(self::$zipFile))
+            ->with($this->equalTo($this->getExpectedAbsolutePathForTarget(self::$zipFile)))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('setWorkingDirectory')
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('lalala'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -94,7 +116,8 @@ class ZipAdapterTest extends TestCase
                                     ->setMethods(array('useBinary'))
                                     ->getMock();
 
-        $this->adapter = new ZipAdapter($outputParser, $manager, $this->getZippyMockBuilder($mockProcessBuilder), $deflator);
+        $this->adapter = new ZipAdapter($outputParser, $manager, $this->getMockedProcessBuilderFactory($mockedProcessBuilder), $deflator);
+        $this->setProbeIsOk($this->adapter);
 
         $this->adapter->create(self::$zipFile, array(__FILE__));
 
@@ -115,26 +138,26 @@ class ZipAdapterTest extends TestCase
         $resource = $this->getResource(self::$zipFile);
         $archive = $this->adapter->open($resource);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('-l'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo($resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setDeflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setDeflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->listMembers($resource);
     }
@@ -143,74 +166,74 @@ class ZipAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$zipFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('-r'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('-u'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo($resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->add($resource, array(__DIR__ . '/../TestCase.php'));
     }
 
     public function testgetInflatorVersion()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('-h'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
         $this->adapter->setParser($this->getMock('Alchemy\Zippy\Parser\ParserInterface'));
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->getInflatorVersion();
     }
 
     public function testgetDeflatorVersion()
     {
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('-h'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
         $this->adapter->setParser($this->getMock('Alchemy\Zippy\Parser\ParserInterface'));
-        $this->adapter->setDeflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setDeflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->getDeflatorVersion();
     }
@@ -219,33 +242,33 @@ class ZipAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$zipFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('-d'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo($resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(__DIR__ . '/../TestCase.php'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo('path-to-file'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
@@ -257,7 +280,7 @@ class ZipAdapterTest extends TestCase
             ->method('getLocation')
             ->will($this->returnValue('path-to-file'));
 
-        $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setInflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->remove($resource, array(
             __DIR__ . '/../TestCase.php',
@@ -269,26 +292,26 @@ class ZipAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$zipFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo('-o'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo($resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setDeflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setDeflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $dir = $this->adapter->extract($resource);
         $pathinfo = pathinfo(self::$zipFile);
@@ -299,38 +322,38 @@ class ZipAdapterTest extends TestCase
     {
         $resource = $this->getResource(self::$zipFile);
 
-        $mockProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
+        $mockedProcessBuilder = $this->getMock('Symfony\Component\Process\ProcessBuilder');
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(0))
             ->method('add')
             ->with($this->equalTo($resource->getResource()))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(1))
             ->method('add')
             ->with($this->equalTo('-d'))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(2))
             ->method('add')
             ->with($this->equalTo(__DIR__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->at(3))
             ->method('add')
             ->with($this->equalTo(__FILE__))
             ->will($this->returnSelf());
 
-        $mockProcessBuilder
+        $mockedProcessBuilder
             ->expects($this->once())
             ->method('getProcess')
             ->will($this->returnValue($this->getSuccessFullMockProcess()));
 
-        $this->adapter->setDeflator($this->getZippyMockBuilder($mockProcessBuilder));
+        $this->adapter->setDeflator($this->getMockedProcessBuilderFactory($mockedProcessBuilder));
 
         $this->adapter->extractMembers($resource, array(__FILE__), __DIR__);
     }
@@ -349,35 +372,4 @@ class ZipAdapterTest extends TestCase
     {
         $this->assertEquals(array('unzip'), ZipAdapter::getDefaultDeflatorBinaryName());
     }
-
-    private function getSuccessFullMockProcess()
-    {
-        $mockProcess = $this
-            ->getMockBuilder('Symfony\Component\Process\Process')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('run');
-
-        $mockProcess
-            ->expects($this->once())
-            ->method('isSuccessful')
-            ->will($this->returnValue(true));
-
-        return $mockProcess;
-    }
-
-    private function getZippyMockBuilder($mockedProcessBuilder)
-    {
-        $mockBuilder = $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface');
-
-        $mockBuilder
-            ->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($mockedProcessBuilder));
-
-        return $mockBuilder;
-    }
 }

+ 22 - 8
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Adapter/ZipExtensionAdapterTest.php

@@ -2,17 +2,16 @@
 
 namespace Alchemy\Zippy\Tests\Adapter;
 
-use Alchemy\Zippy\Tests\TestCase;
 use Alchemy\Zippy\Adapter\ZipExtensionAdapter;
 use Alchemy\Zippy\Adapter\Resource\ZipArchiveResource;
 
-class ZipExtensionAdapterTest extends TestCase
+class ZipExtensionAdapterTest extends AdapterTestCase
 {
     private $adapter;
 
     public function setUp()
     {
-        $this->adapter = new ZipExtensionAdapter($this->getResourceManagerMock());
+        $this->adapter = $this->provideSupportedAdapter();
     }
 
     public function testNewInstance()
@@ -22,6 +21,22 @@ class ZipExtensionAdapterTest extends TestCase
         $this->assertInstanceOf('Alchemy\Zippy\Adapter\ZipExtensionAdapter', $adapter);
     }
 
+    protected function provideSupportedAdapter()
+    {
+        $adapter = new ZipExtensionAdapter($this->getResourceManagerMock());
+        $this->setProbeIsOk($adapter);
+
+        return $adapter;
+    }
+
+    protected function provideNotSupportedAdapter()
+    {
+        $adapter = new ZipExtensionAdapter($this->getResourceManagerMock());
+        $this->setProbeIsNotOk($adapter);
+
+        return $adapter;
+    }
+
     /**
      * @expectedException Alchemy\Zippy\Exception\NotSupportedException
      */
@@ -35,6 +50,7 @@ class ZipExtensionAdapterTest extends TestCase
         $file = __DIR__ . '/zip-file.zip';
         $manager = $this->getResourceManagerMock(__DIR__, array(__FILE__));
         $this->adapter = new ZipExtensionAdapter($manager);
+        $this->setProbeIsOk($this->adapter);
         $archive = $this->adapter->create($file, array(__FILE__));
         $this->assertInstanceOf('Alchemy\Zippy\Archive\Archive', $archive);
         $this->assertFileExists($file);
@@ -59,11 +75,6 @@ class ZipExtensionAdapterTest extends TestCase
         unlink($file);
     }
 
-    public function testIsSupported()
-    {
-        $this->assertInternalType('boolean', $this->adapter->isSupported());
-    }
-
     public function testGetName()
     {
         $this->assertInternalType('string', $this->adapter->getName());
@@ -230,6 +241,7 @@ class ZipExtensionAdapterTest extends TestCase
 
         $manager = $this->getResourceManagerMock(__DIR__, $files);
         $this->adapter = new ZipExtensionAdapter($manager);
+        $this->setProbeIsOk($this->adapter);
         $this->adapter->add(new ZipArchiveResource($resource), $files);
 
         rmdir($dir);
@@ -260,6 +272,7 @@ class ZipExtensionAdapterTest extends TestCase
 
         $manager = $this->getResourceManagerMock(__DIR__, $files);
         $this->adapter = new ZipExtensionAdapter($manager);
+        $this->setProbeIsOk($this->adapter);
         $this->adapter->add(new ZipArchiveResource($resource), $files);
     }
 
@@ -292,6 +305,7 @@ class ZipExtensionAdapterTest extends TestCase
 
         $manager = $this->getResourceManagerMock(__DIR__, $files);
         $this->adapter = new ZipExtensionAdapter($manager);
+        $this->setProbeIsOk($this->adapter);
         $this->adapter->add(new ZipArchiveResource($resource), $files);
     }
 }

+ 2 - 2
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/FileStrategy/FileStrategyTestCase.php

@@ -16,7 +16,7 @@ abstract class FileStrategyTestCase extends TestCase
         $container
                 ->expects($this->any())
                 ->method('offsetGet')
-                ->will($this->returnCallback(function($offset) use ($that) {
+                ->will($this->returnCallback(function ($offset) use ($that) {
                     if (array_key_exists('Alchemy\Zippy\Adapter\AdapterInterface', class_implements($offset))) {
                         return $that->getMock('Alchemy\Zippy\Adapter\AdapterInterface');
                     }
@@ -38,7 +38,7 @@ abstract class FileStrategyTestCase extends TestCase
         $container
                 ->expects($this->any())
                 ->method('offsetGet')
-                ->will($this->returnCallback(function($offset) use ($that) {
+                ->will($this->returnCallback(function ($offset) use ($that) {
                     if (array_key_exists('Alchemy\Zippy\Adapter\AdapterInterface', class_implements($offset))) {
                         return $that->getMock('Alchemy\Zippy\Adapter\AdapterInterface');
                     }

+ 4 - 1
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Parser/BSDTarOutputParserTest.php

@@ -48,8 +48,11 @@ class BSDTarOutputParserTest extends TestCase
         $this->assertEquals('practice/records', $memberFile['location']);
         $this->assertEquals(10240, $memberFile['size']);
         $date = $memberFile['mtime'];
+
+        $currentDate = new \DateTime();
+        $expected = \DateTime::createFromFormat('d-m-Y H:i:s', '22-01-'.$currentDate->format('Y').' 13:31:00');
         $this->assertTrue($date instanceof \DateTime);
-        $this->assertEquals('1358861460', $date->format("U"));
+        $this->assertEquals($expected->format('U'), $date->format("U"));
 
         ini_set('date.timezone', $current_timezone);
     }

+ 8 - 27
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Resource/ResourceCollectionTest.php

@@ -12,7 +12,7 @@ class ResourceCollectionTest extends TestCase
      */
     public function testConstructWithoutElements()
     {
-        $collection = new ResourceCollection('supa-context');
+        $collection = new ResourceCollection('supa-context', array(), false);
         $this->assertEquals('supa-context', $collection->getContext());
         $this->assertEquals(array(), $collection->toArray());
     }
@@ -22,36 +22,17 @@ class ResourceCollectionTest extends TestCase
      */
     public function testConstructWithElements()
     {
-        $data = array('one', 'two' => 'three');
-        $collection = new ResourceCollection('supa-context', $data);
+        $data = array($this->createResourceMock(), 'two' => $this->createResourceMock());
+        $collection = new ResourceCollection('supa-context', $data, false);
         $this->assertEquals('supa-context', $collection->getContext());
         $this->assertEquals($data, $collection->toArray());
     }
 
-    /**
-     * @covers Alchemy\Zippy\Resource\ResourceCollection::getContext
-     * @covers Alchemy\Zippy\Resource\ResourceCollection::setContext
-     */
-    public function testGetSetContext()
-    {
-        $collection = new ResourceCollection('supa-context');
-        $this->assertEquals('supa-context', $collection->getContext());
-        $collection->setContext('cool context');
-        $this->assertEquals('cool context', $collection->getContext());
-    }
-
-    /**
-     * @covers Alchemy\Zippy\Resource\ResourceCollection::isTemporary
-     * @covers Alchemy\Zippy\Resource\ResourceCollection::setTemporary
-     */
-    public function testSetIsTemporary()
+    private function createResourceMock()
     {
-        $collection = new ResourceCollection('supa-context');
-        $this->assertFalse($collection->isTemporary());
-        $collection->setTemporary(true);
-        $this->assertTrue($collection->isTemporary());
-        $collection->setTemporary(false);
-        $this->assertFalse($collection->isTemporary());
+        return $this->getMockBuilder('Alchemy\Zippy\Resource\Resource')
+            ->disableOriginalConstructor()
+            ->getMock();
     }
 
     /**
@@ -64,7 +45,7 @@ class ResourceCollectionTest extends TestCase
             $this->getInPlaceResource($first),
             $this->getInPlaceResource($second),
             $this->getInPlaceResource($third),
-        ));
+        ), false);
 
         $this->assertInternalType('boolean', $collection->canBeProcessedInPlace());
         $this->assertEquals($expected, $collection->canBeProcessedInPlace());

+ 55 - 11
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/Resource/ResourceManagerTest.php

@@ -2,6 +2,7 @@
 
 namespace Alchemy\Zippy\Tests\Resource;
 
+use Alchemy\Zippy\Resource\ResourceCollection;
 use Alchemy\Zippy\Tests\TestCase;
 use Alchemy\Zippy\Resource\ResourceManager;
 
@@ -21,25 +22,68 @@ class ResourceManagerTest extends TestCase
         );
 
         $context = '/path/to/current/directory';
-        $request = array('/path/to/a/file1', '/path/to/a/file2');
+        $request = array($this->createProcessableInPlaceResource(), $this->createProcessableInPlaceResource());
 
-        $expectedCollection = $this->getMockBuilder('Alchemy\Zippy\Resource\ResourceCollection')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $expectedCollection->expects($this->any())
-            ->method('getIterator')
-            ->will($this->returnValue(new \ArrayIterator(array())));
+        $expectedCollection = new ResourceCollection($context, $request, false);
 
         $mapper->expects($this->once())
-            ->method('map')
-            ->with($this->equalTo($context), $this->equalTo($request))
-            ->will($this->returnValue($expectedCollection));
+               ->method('map')
+               ->with($this->equalTo($context), $this->equalTo($request))
+               ->will($this->returnValue($expectedCollection));
 
         $collection = $manager->handle($context, $request);
         $this->assertEquals($expectedCollection, $collection);
     }
 
+    public function testHandleNotProcessables()
+    {
+        $mapper = $this->getRequestMapperMock();
+
+        $manager = new ResourceManager(
+            $mapper,
+            $this->getResourceTeleporterMock(),
+            $this->getFilesystemMock()
+        );
+
+        $context = '/path/to/current/directory';
+        $request = array($this->createNotProcessableInPlaceResource(), $this->createNotProcessableInPlaceResource());
+
+        $expectedCollection = new ResourceCollection($context, $request, false);
+
+        $mapper->expects($this->once())
+               ->method('map')
+               ->with($this->equalTo($context), $this->equalTo($request))
+               ->will($this->returnValue($expectedCollection));
+
+        $collection = $manager->handle($context, $request);
+        $this->assertNotEquals($expectedCollection, $collection);
+        $this->assertTrue($collection->isTemporary());
+    }
+
+    private function createProcessableInPlaceResource()
+    {
+        $resource = $this->getMockBuilder('Alchemy\Zippy\Resource\Resource')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $resource->expects($this->any())
+            ->method('canBeProcessedInPlace')
+            ->will($this->returnValue(true));
+
+        return $resource;
+    }
+
+    private function createNotProcessableInPlaceResource()
+    {
+        $resource = $this->getMockBuilder('Alchemy\Zippy\Resource\Resource')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $resource->expects($this->any())
+            ->method('canBeProcessedInPlace')
+            ->will($this->returnValue(false));
+
+        return $resource;
+    }
+
     /**
      * @covers Alchemy\Zippy\Resource\ResourceManager::cleanup
      */

+ 80 - 2
vendor/alchemy/zippy/tests/Alchemy/Zippy/Tests/TestCase.php

@@ -2,14 +2,22 @@
 
 namespace Alchemy\Zippy\Tests;
 
+use Alchemy\Zippy\Adapter\AdapterInterface;
 use Alchemy\Zippy\Resource\ResourceCollection;
 use Alchemy\Zippy\Resource\Resource;
+use Alchemy\Zippy\Adapter\VersionProbe\VersionProbeInterface;
 
 abstract class TestCase extends \PHPUnit_Framework_TestCase
 {
     public static function getResourcesPath()
     {
-        return __DIR__ . '/../../../resources';
+        $dir = __DIR__ . '/../../../resources';
+
+        if (!is_dir($dir)) {
+            mkdir($dir);
+        }
+
+        return $dir;
     }
 
     protected function getResourceManagerMock($context = '', $elements = array())
@@ -18,7 +26,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
             return new Resource($item, $item);
         }, $elements);
 
-        $collection = new ResourceCollection($context, $elements);
+        $collection = new ResourceCollection($context, $elements, false);
 
         $manager = $this
             ->getMockBuilder('Alchemy\Zippy\Resource\ResourceManager')
@@ -44,4 +52,74 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
 
         return $resource;
     }
+
+    protected function setProbeIsOk(AdapterInterface $adapter)
+    {
+        if (!method_exists($adapter, 'setVersionProbe')) {
+            $this->fail('Trying to set a probe on an adapter that does not support it');
+        }
+
+        $probe = $this->getMock('Alchemy\Zippy\Adapter\VersionProbe\VersionProbeInterface');
+        $probe->expects($this->any())
+            ->method('getStatus')
+            ->will($this->returnValue(VersionProbeInterface::PROBE_OK));
+
+        $adapter->setVersionProbe($probe);
+    }
+
+    protected function setProbeIsNotOk(AdapterInterface $adapter)
+    {
+        if (!method_exists($adapter, 'setVersionProbe')) {
+            $this->fail('Trying to set a probe on an adapter that does not support it');
+        }
+
+        $probe = $this->getMock('Alchemy\Zippy\Adapter\VersionProbe\VersionProbeInterface');
+        $probe->expects($this->any())
+            ->method('getStatus')
+            ->will($this->returnValue(VersionProbeInterface::PROBE_NOTSUPPORTED));
+
+        $adapter->setVersionProbe($probe);
+    }
+
+    protected function getMockedProcessBuilderFactory($mockedProcessBuilder, $creations = 1)
+    {
+        $mockedProcessBuilderFactory = $this->getMock('Alchemy\Zippy\ProcessBuilder\ProcessBuilderFactoryInterface');
+
+        $mockedProcessBuilderFactory
+            ->expects($this->exactly($creations))
+            ->method('create')
+            ->will($this->returnValue($mockedProcessBuilder));
+
+        return $mockedProcessBuilderFactory;
+    }
+
+    protected function getSuccessFullMockProcess($runs = 1)
+    {
+        $mockProcess = $this
+            ->getMockBuilder('Symfony\Component\Process\Process')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $mockProcess
+            ->expects($this->exactly($runs))
+            ->method('run');
+
+        $mockProcess
+            ->expects($this->exactly($runs))
+            ->method('isSuccessful')
+            ->will($this->returnValue(true));
+
+        return $mockProcess;
+    }
+
+    protected function getExpectedAbsolutePathForTarget($target)
+    {
+        $directory = dirname($target);
+
+        if (!is_dir($directory)) {
+            throw new \InvalidArgumentException(sprintf('Unable to get the absolute path for %s', $target));
+        }
+
+        return realpath($directory).'/'.basename($target);
+    }
 }

+ 1 - 1
vendor/autoload.php

@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInita8f026bf9d98359b269f8c0671d2720b::getLoader();
+return ComposerAutoloaderInitc572b980089f175cae6f618557157d1d::getLoader();

+ 0 - 6
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/.gitignore

@@ -1,6 +0,0 @@
-vendor/
-Resources/docs/code-coverage
-phpunit.xml
-
-Resources/public/js/bootstrap.compiled*.js
-Resources/public/css/bootstrap.compiled*.css

+ 0 - 218
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/DependencyInjection/BcBootstrapExtension.php

@@ -1,218 +0,0 @@
-<?php
-/**
- * This file is part of BcBootstrapBundle.
- *
- * (c) 2012-2013 by Florian Eckerstorfer
- */
-
-namespace Bc\Bundle\BootstrapBundle\DependencyInjection;
-
-use Symfony\Component\Config\FileLocator;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
-use Symfony\Component\DependencyInjection\Loader;
-use Symfony\Component\HttpKernel\DependencyInjection\Extension;
-
-/**
- * BcBootstrapExtension
- *
- * @package    BcBootstrapBundle
- * @subpackage DependencyInjection
- * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
- * @copyright  2012-2013 Florian Eckerstorfer
- * @license    http://opensource.org/licenses/MIT The MIT License
- * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
- */
-class BcBootstrapExtension extends Extension implements PrependExtensionInterface
-{
-    /** @var string */
-    private $formTemplate = 'BcBootstrapBundle:Form:form_div_layout.html.twig';
-
-    /** @var string */
-    private $menuTemplate = 'BcBootstrapBundle:Menu:menu.html.twig';
-
-    /** @var string */
-    private $paginationTemplate = 'BcBootstrapBundle:Pagination:pagination.html.twig';
-
-    /**
-     * {@inheritDoc}
-     */
-    public function load(array $configs, ContainerBuilder $container)
-    {
-        $configuration = new Configuration();
-        $config = $this->processConfiguration($configuration, $configs);
-
-        $loader = new Loader\YamlFileLoader(
-            $container,
-            new FileLocator(__DIR__.'/../Resources/config')
-        );
-        $loader->load('services.yml');
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public function prepend(ContainerBuilder $container)
-    {
-        $bundles = $container->getParameter('kernel.bundles');
-
-        // Configure AsseticBundle
-        if (isset($bundles['AsseticBundle'])) {
-            $this->configureAsseticBundle($container);
-        }
-
-        // Configure TwigBundle
-        if (isset($bundles['TwigBundle'])) {
-            $this->configureTwigBundle($container);
-        }
-
-        // Configure KnpMenuBundle
-        if (isset($bundles['TwigBundle']) && isset($bundles['KnpMenuBundle'])) {
-            $this->configureKnpMenuBundle($container);
-        }
-
-        if (isset($bundles['TwigBundle']) && isset($bundles['KnpPaginatorBundle'])) {
-            $this->configureKnpPaginatorBundle($container);
-        }
-    }
-
-    /**
-     * Configures the AsseticBundle.
-     *
-     * @param ContainerBuilder $container The service container
-     *
-     * @return void
-     */
-    private function configureAsseticBundle(ContainerBuilder $container)
-    {
-        $configs = $container->getExtensionConfig($this->getAlias());
-        $config = $this->processConfiguration(new Configuration(), $configs);
-
-        foreach ($container->getExtensions() as $name => $extension) {
-            switch ($name) {
-                case 'assetic':
-                    $container->prependExtensionConfig(
-                        $name,
-                        array(
-                            'assets'    => $this->buildAsseticConfig($config)
-                        )
-                    );
-                    break;
-            }
-        }
-    }
-
-    /**
-     * Configures the TwigBundle.
-     *
-     * @param ContainerBuilder $container The service container
-     *
-     * @return void
-     */
-    private function configureTwigBundle(ContainerBuilder $container)
-    {
-        foreach ($container->getExtensions() as $name => $extension) {
-            switch ($name) {
-                case 'twig':
-                    $container->prependExtensionConfig(
-                        $name,
-                        array('form'  => array('resources' => array($this->formTemplate)))
-                    );
-                    break;
-            }
-        }
-    }
-
-    /**
-     * Configures the KnpMenuBundle.
-     *
-     * @param ContainerBuilder $container The service container
-     *
-     * @return void
-     */
-    private function configureKnpMenuBundle(ContainerBuilder $container)
-    {
-        foreach ($container->getExtensions() as $name => $extension) {
-            switch ($name) {
-                case 'knp_menu':
-                    $container->prependExtensionConfig(
-                        $name,
-                        array('twig' => array('template'  => $this->menuTemplate))
-                    );
-                    break;
-            }
-        }
-    }
-
-    /**
-     * Configures the KnpPaginatorBundle.
-     *
-     * @param ContainerBuilder $container The service container
-     *
-     * @return void
-     */
-    private function configureKnpPaginatorBundle(ContainerBuilder $container)
-    {
-        foreach ($container->getExtensions() as $name => $extension) {
-            switch ($name) {
-                case 'knp_paginator':
-                    $container->prependExtensionConfig(
-                        $name,
-                        array('template' => array('pagination' => $this->paginationTemplate))
-                    );
-                    break;
-            }
-        }
-    }
-
-    private function buildAsseticConfig(array $config)
-    {
-        return array(
-            'bootstrap_css' => $this->buildAsseticBootstrapCssConfig($config),
-            'bootstrap_js'  => $this->buildAsseticBootstrapJsConfig($config),
-            'jquery'        => $this->buildAsseticJqueryConfig($config)
-        );
-    }
-
-    private function buildAsseticBootstrapCssConfig(array $config)
-    {
-        return array(
-            'inputs'        => array(
-                $config['assets_dir'].'/less/bootstrap.less',
-                $config['assets_dir'].'/less/responsive.less'
-            ),
-            'filters'       => array($config['less_filter'], 'cssrewrite'),
-            'output'        => $config['output_dir'].'/css/bootstrap.css'
-        );
-    }
-
-    private function buildAsseticBootstrapJsConfig(array $config)
-    {
-        return array(
-            'inputs'        => array(
-                $config['assets_dir'].'/js/bootstrap-transition.js',
-                $config['assets_dir'].'/js/bootstrap-alert.js',
-                $config['assets_dir'].'/js/bootstrap-button.js',
-                $config['assets_dir'].'/js/bootstrap-carousel.js',
-                $config['assets_dir'].'/js/bootstrap-collapse.js',
-                $config['assets_dir'].'/js/bootstrap-dropdown.js',
-                $config['assets_dir'].'/js/bootstrap-modal.js',
-                $config['assets_dir'].'/js/bootstrap-tooltip.js',
-                $config['assets_dir'].'/js/bootstrap-popover.js',
-                $config['assets_dir'].'/js/bootstrap-scrollspy.js',
-                $config['assets_dir'].'/js/bootstrap-tab.js',
-                $config['assets_dir'].'/js/bootstrap-typeahead.js',
-                $config['assets_dir'].'/js/bootstrap-affix.js'
-            ),
-            'output'        => $config['output_dir'].'/js/bootstrap.js'
-        );
-    }
-
-    private function buildAsseticJqueryConfig(array $config)
-    {
-        return array(
-            'inputs'        => array($config['jquery_path']),
-            'output'        => $config['output_dir'].'/js/jquery.js'
-        );
-    }
-}

+ 0 - 53
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/DependencyInjection/Configuration.php

@@ -1,53 +0,0 @@
-<?php
-/**
- * This file is part of BcBootstrapBundle.
- *
- * (c) 2012-2013 by Florian Eckerstorfer
- */
-
-namespace Bc\Bundle\BootstrapBundle\DependencyInjection;
-
-use Symfony\Component\Config\Definition\Builder\TreeBuilder;
-use Symfony\Component\Config\Definition\ConfigurationInterface;
-
-/**
- * Configuration
- *
- * @package    BcBootstrapBundle
- * @subpackage DependencyInjection
- * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
- * @copyright  2012-2013 Florian Eckerstorfer
- * @license    http://opensource.org/licenses/MIT The MIT License
- * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
- */
-class Configuration implements ConfigurationInterface
-{
-    /**
-     * {@inheritDoc}
-     */
-    public function getConfigTreeBuilder()
-    {
-        return $this->buildConfigTree();
-    }
-
-    private function buildConfigTree()
-    {
-        $treeBuilder = new TreeBuilder();
-        $rootNode = $treeBuilder->root('bc_bootstrap');
-
-        $rootNode
-            ->children()
-            ->scalarNode('output_dir')->defaultValue('')->end()
-            ->scalarNode('assets_dir')->defaultValue('%kernel.root_dir%/../vendor/twbs/bootstrap')->end()
-            ->scalarNode('jquery_path')->defaultValue('%kernel.root_dir%/../vendor/jquery/jquery/jquery-1.9.1.js')->end()
-            ->scalarNode('less_filter')
-                ->defaultValue('less')
-                ->validate()
-                ->ifNotInArray(array('less', 'lessphp'))
-                    ->thenInvalid('Invalid less filter "%s"')
-                ->end()
-            ->end();
-
-        return $treeBuilder;
-    }
-}

+ 0 - 8
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Makefile

@@ -1,8 +0,0 @@
-phpcs:
-	@./vendor/bin/phpcs --standard=vendor/instaclick/symfony2-coding-standard/Symfony2 --ignore="vendor/,Tests/" .
-
-phpcs-test:
-	@./vendor/bin/phpcs --standard=vendor/instaclick/symfony2-coding-standard/Symfony2 Tests/
-
-phpmd:
-	@./vendor/bin/phpmd ./ text codesize,controversial,design,naming,unusedcode --exclude vendor/

+ 0 - 105
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/README.md

@@ -1,105 +0,0 @@
-BcBootstrapBundle
-=================
-
-By [Florian Eckerstorfer](http://florianeckerstorfer.com)
-
-[![Build Status](https://secure.travis-ci.org/braincrafted/bootstrap-bundle.png)](http://travis-ci.org/braincrafted/bootstrap-bundle)
-
-
-About
------
-
-BcBootstrapBundle is [Bootstrap, from Twitter](http://twitter.github.com/bootstrap/) encapsulated in a [Symfony2](http://symfony.com) bundle.
-
-This bundle is highly opiniated by how I use Twitter Bootstrap and Symfony.
-
-
-Installation
-------------
-
-First you need to add `braincrafted/bootstrap-bundle` to `composer.json`:
-
-    {
-       "require": {
-            "braincrafted/bootstrap-bundle": "dev-master"
-        }
-    }
-
-Please note that `dev-master` points to the latest release. If you want to use the latest development version please use `dev-develop`. Of course you can also use an explicit version number, e.g., `1.3.*`.
-
-You also have to add `BcBootstrapBundle` to your `AppKernel.php`:
-
-    // app/AppKernel.php
-    ...
-    class AppKernel extends Kernel
-    {
-        ...
-        public function registerBundles()
-        {
-            $bundles = array(
-                ...
-                new Bc\Bundle\BootstrapBundle\BcBootstrapBundle()
-            );
-            ...
-
-            return $bundles;
-        }
-        ...
-    }
-
-
-Download Assets
----------------
-
-This bundle does no longer contain the asset files from Twitter Bootstrap (images, stylesheets and JavaScripts). The best way to include those assets is to add Twitter Bootstrap to your `composer.json`:
-
-    {
-       "require": {
-            "twbs/bootstrap": "2.3.*"
-        }
-    }
-
-You can find a detailed description in the documentation.
-
-
-More Information
-----------------
-
-Check out the [documentation](http://bootstrap.braincrafted.com) to find out how you can use BcBootstrapBundle in your Symfony2 project.
-
-
-Compatibility
--------------
-
-- **BcBootstrapBundle v1.3.***
-    - Twitter Bootstrap v2.3.*
-    - Symfony 2.2.*
-- **BcBootstrapBundle v1.4.***
-    - Twitter Bootstrap v2.3.*
-    - Symfony 2.2.*
-
-
-Changelog
----------
-
-### Version 1.4.0
-
-- Changed namespace to `Bc\Bundle\BootstrapBundle`
-- Automatically configure Twig
-- Automatically configure KnpMenuBundle
-- Automatically configure KnpPaginatorBundle
-- Automatically configure Assetic
-- Improved layout of error messages in compound fields
-- Improved code style (usage of PHP_CodeSniffer and PHPMD)
-- Support for `data-prototype` option in collection fields
-- Helper and template for flash messages
-
-License
--------
-
-- The bundle is licensed under the [MIT License](http://opensource.org/licenses/MIT)
-- The CSS and Javascript from the Twitter Bootstrap are licensed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
-
-
-[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/braincrafted/bootstrap-bundle/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
-

+ 0 - 15
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/config/services.yml

@@ -1,15 +0,0 @@
-parameters:
-
-services:
-    bc_bootstrap.twig.icon_extension:
-        class: Bc\Bundle\BootstrapBundle\Twig\BootstrapIconExtension
-        tags:
-            - { name: twig.extension }
-    bc_bootstrap.twig.label_extension:
-        class: Bc\Bundle\BootstrapBundle\Twig\BootstrapLabelExtension
-        tags:
-            - { name: twig.extension }
-    bc_bootstrap.twig.badge_extension:
-        class: Bc\Bundle\BootstrapBundle\Twig\BootstrapBadgeExtension
-        tags:
-            - { name: twig.extension }

+ 0 - 553
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/views/Form/form_div_layout.html.twig

@@ -1,553 +0,0 @@
-{# Widgets #}
-
-{% block form_widget %}
-{% spaceless %}
-    {% if compound %}
-        {{ block('form_widget_compound') }}
-    {% else %}
-        {{ block('form_widget_simple') }}
-    {% endif %}
-{% endspaceless %}
-{% endblock form_widget %}
-
-{% block form_widget_simple %}
-{% spaceless %}
-    {% set type = type|default('text') %}
-    {% if attr.prepend_input is defined and attr.append_input is defined and attr.prepend_input is not empty and attr.append_input is not empty %}
-        {{ block('form_widget_prepend_append_input') }}
-    {% elseif attr.prepend_input is defined and attr.prepend_input is not empty %}
-        {{ block('form_widget_prepend_input') }}
-    {% elseif attr.append_input is defined and attr.append_input is not empty %}
-        {{ block('form_widget_append_input') }}
-    {% else %}
-        <input type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}>
-    {% endif %}
-    {% if attr.help_block is defined %}
-        {{ block('help_block') }}
-    {% endif %}
-    {% if attr.help is defined %}
-        {{ block('help_inline') }}
-    {% endif %}
-{% endspaceless %}
-{% endblock form_widget_simple %}
-
-{% block form_widget_prepend_append_input %}
-{% spaceless %}
-    <div class="input-prepend input-append">
-        <span class="add-on">
-        {% if attr.prepend_input.icon is defined and attr.prepend_input.icon is not empty %}
-            <i class="{{ attr.prepend_input.icon }}"></i>
-        {% else %}
-            {{ attr.prepend_input|trans({}, translation_domain) }}
-        {% endif %}
-        </span>
-        {% set append_input = attr.append_input|trans({}, translation_domain) %}
-        {% set attr = attr|merge({'prepend_input': '', 'append_input': ''}) %}
-        {{ block('form_widget_simple') }}
-        <span class="add-on">
-        {% if attr.append_input.icon is defined and attr.append_input.icon is not empty %}
-            <i class="{{ attr.append_input.icon }}"></i>
-        {% else %}
-            {{ append_input }}
-        {% endif %}
-        </span>
-    </div>
-{% endspaceless %}
-{% endblock form_widget_prepend_append_input %}
-
-{% block form_widget_prepend_input %}
-{% spaceless %}
-    <div class="input-prepend">
-    <span class="add-on">
-    {% if attr.prepend_input.icon is defined and attr.prepend_input.icon is not empty %}
-        <i class="{{ attr.prepend_input.icon }}"></i>
-    {% else %}
-        {{ attr.prepend_input|trans({}, translation_domain) }}
-    {% endif %}
-    </span>
-        {% set attr = attr|merge({'prepend_input': ''}) %}
-        {{ block('form_widget_simple') }}
-    </div>
-{% endspaceless %}
-{% endblock form_widget_prepend_input %}
-
-{% block form_widget_append_input %}
-{% spaceless %}
-    <div class="input-append">
-        {% set append_input = attr.append_input|trans({}, translation_domain) %}
-        {% set attr = attr|merge({'append_input': ''}) %}
-        {{ block('form_widget_simple') }}
-        <span class="add-on">
-        {% if attr.append_input.icon is defined and attr.append_input.icon is not empty %}
-            <i class="{{ attr.append_input.icon }}"></i>
-        {% else %}
-            {{ append_input }}
-        {% endif %}
-        </span>
-    </div>
-{% endspaceless %}
-{% endblock form_widget_append_input %}
-
-{% block form_widget_compound %}
-{% spaceless %}
-    <div {{ block('widget_container_attributes') }}>
-        {% if form.parent is empty %}
-            {{ form_errors(form) }}
-        {% endif %}
-        {{ block('form_rows') }}
-        {{ form_rest(form) }}
-    </div>
-{% endspaceless %}
-{% endblock form_widget_compound %}
-
-{% block collection_widget %}
-{% spaceless %}
-    {% if prototype is defined %}
-        {% set attr = attr|merge({'data-prototype': form_row(prototype) }) %}
-    {% endif %}
-    {{ block('form_widget') }}
-{% endspaceless %}
-{% endblock collection_widget %}
-
-{% block textarea_widget %}
-{% spaceless %}
-    <textarea {{ block('widget_attributes') }}>{{ value }}</textarea>
-{% endspaceless %}
-{% endblock textarea_widget %}
-
-{% block choice_widget %}
-{% spaceless %}
-    {% if expanded %}
-        {{ block('choice_widget_expanded') }}
-    {% else %}
-        {{ block('choice_widget_collapsed') }}
-    {% endif %}
-{% endspaceless %}
-{% endblock choice_widget %}
-
-{% block choice_widget_expanded %}
-{% spaceless %}
-    {% set child_vars = {'attr': attr} %}
-    {% for child in form %}
-        {{ form_label(child, null, child_vars) }}
-    {% endfor %}
-{% endspaceless %}
-{% endblock choice_widget_expanded %}
-
-{% block choice_widget_collapsed %}
-{% spaceless %}
-    <select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
-        {% if empty_value is not none %}
-            <option value="">{{ empty_value|trans({}, translation_domain) }}</option>
-        {% endif %}
-        {% if preferred_choices|length > 0 %}
-            {% set options = preferred_choices %}
-            {{ block('choice_widget_options') }}
-            {% if choices|length > 0 and separator is not none %}
-                <option disabled="disabled">{{ separator }}</option>
-            {% endif %}
-        {% endif %}
-        {% set options = choices %}
-        {{ block('choice_widget_options') }}
-    </select>
-{% endspaceless %}
-{% endblock choice_widget_collapsed %}
-
-{% block choice_widget_options %}
-{% spaceless %}
-    {% for group_label, choice in options %}
-        {% if choice is iterable %}
-            <optgroup label="{{ group_label|trans({}, translation_domain) }}">
-                {% set options = choice %}
-                {{ block('choice_widget_options') }}
-            </optgroup>
-        {% else %}
-            <option value="{{ choice.value }}"{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice.label|trans({}, translation_domain) }}</option>
-        {% endif %}
-    {% endfor %}
-{% endspaceless %}
-{% endblock choice_widget_options %}
-
-{% block checkbox_widget %}
-{% spaceless %}
-    <input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %}>
-{% endspaceless %}
-{% endblock checkbox_widget %}
-
-{% block radio_widget %}
-{% spaceless %}
-    <input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %}>
-{% endspaceless %}
-{% endblock radio_widget %}
-
-{% block datetime_widget %}
-{% spaceless %}
-    {% if widget == 'single_text' %}
-        {{ block('form_widget_simple') }}
-    {% else %}
-        <div {{ block('widget_container_attributes') }}>
-            {{ form_errors(form.date) }}
-            {{ form_errors(form.time) }}
-            {{ form_widget(form.date) }}
-            {{ form_widget(form.time) }}
-        </div>
-    {% endif %}
-{% endspaceless %}
-{% endblock datetime_widget %}
-
-{% block date_widget %}
-{% spaceless %}
-    {% if widget == 'single_text' %}
-        {{ block('form_widget_simple') }}
-    {% else %}
-        <div {{ block('widget_container_attributes') }}>
-            {{ date_pattern|replace({
-                '{{ year }}':  form_widget(form.year),
-                '{{ month }}': form_widget(form.month),
-                '{{ day }}':   form_widget(form.day),
-            })|raw }}
-        </div>
-    {% endif %}
-{% endspaceless %}
-{% endblock date_widget %}
-
-{% block time_widget %}
-{% spaceless %}
-    {% if widget == 'single_text' %}
-        {{ block('form_widget_simple') }}
-    {% else %}
-        <div {{ block('widget_container_attributes') }}>
-            {{ form_widget(form.hour, { 'attr': { 'size': '1' } }) }}:{{ form_widget(form.minute, { 'attr': { 'size': '1' } }) }}{% if with_seconds %}:{{ form_widget(form.second, { 'attr': { 'size': '1' } }) }}{% endif %}
-        </div>
-    {% endif %}
-{% endspaceless %}
-{% endblock time_widget %}
-
-{% block number_widget %}
-{% spaceless %}
-    {# type="number" doesn't work with floats #}
-    {% set type = type|default('text') %}
-    {{ block('form_widget_simple') }}
-{% endspaceless %}
-{% endblock number_widget %}
-
-{% block integer_widget %}
-{% spaceless %}
-    {% set type = type|default('number') %}
-    {{ block('form_widget_simple') }}
-{% endspaceless %}
-{% endblock integer_widget %}
-
-{% block money_widget %}
-{% spaceless %}
-    {{ money_pattern|replace({ '{{ widget }}': block('form_widget_simple') })|raw }}
-{% endspaceless %}
-{% endblock money_widget %}
-
-{% block url_widget %}
-{% spaceless %}
-    {% set type = type|default('url') %}
-    {{ block('form_widget_simple') }}
-{% endspaceless %}
-{% endblock url_widget %}
-
-{% block search_widget %}
-{% spaceless %}
-    {% set attr = attr|merge({'class': (attr.class|default('') ~ ' search-query')|trim}) %}
-    {% set type = type|default('search') %}
-    {{ block('form_widget_simple') }}
-{% endspaceless %}
-{% endblock search_widget %}
-
-{% block percent_widget %}
-{% spaceless %}
-    {% set type = type|default('text') %}
-    {{ block('form_widget_simple') }} %
-{% endspaceless %}
-{% endblock percent_widget %}
-
-{% block password_widget %}
-{% spaceless %}
-    {% set type = type|default('password') %}
-    {{ block('form_widget_simple') }}
-{% endspaceless %}
-{% endblock password_widget %}
-
-{% block hidden_widget %}
-{% spaceless %}
-    {% set type = type|default('hidden') %}
-    {{ block('form_widget_simple') }}
-{% endspaceless %}
-{% endblock hidden_widget %}
-
-{% block email_widget %}
-{% spaceless %}
-    {% set type = type|default('email') %}
-    {{ block('form_widget_simple') }}
-{% endspaceless %}
-{% endblock email_widget %}
-
-{# Labels #}
-
-{% block form_label %}
-{% spaceless %}
-    {% if not compound %}
-        {% set label_attr = label_attr|merge({'for': id}) %}
-    {% endif %}
-    {% if required %}
-        {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
-    {% endif %}
-    {% if form_type is defined and form_type == 'horizontal' %}
-        {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' control-label')|trim}) %}
-    {% endif %}
-    {% if label is empty %}
-        {% set label = name|humanize %}
-    {% endif %}
-    <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
-{% endspaceless %}
-{% endblock form_label %}
-
-{% block checkbox_label %}
-{% spaceless %}
-    {% if not compound %}
-        {% set label_attr = label_attr|merge({'for': id}) %}
-    {% endif %}
-    {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' checkbox')|trim}) %}
-    {% if attr.inline is defined and attr.inline %}
-        {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' inline')|trim}) %}
-    {% endif %}
-    {% if required %}
-        {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
-    {% endif %}
-    {% if label is empty %}
-        {% set label = name|humanize %}
-    {% endif %}
-{% endspaceless %}
-    <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
-        {{ form_widget(form) }} {{ label|trans({}, translation_domain) }}
-    </label>
-{% endblock checkbox_label %}
-
-{% block radio_label %}
-{% spaceless %}
-    {% if not compound %}
-        {% set label_attr = label_attr|merge({'for': id}) %}
-    {% endif %}
-    {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' radio')|trim}) %}
-    {% if attr.inline is defined and attr.inline %}
-        {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' inline')|trim}) %}
-    {% endif %}
-    {% if required %}
-        {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
-    {% endif %}
-    {% if label is empty %}
-        {% set label = name|humanize %}
-    {% endif %}
-{% endspaceless %}
-    <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
-        {{ form_widget(form) }} {{ label|trans({}, translation_domain) }}
-    </label>
-{% endblock radio_label %}
-
-
-{# Rows #}
-
-{% block repeated_row %}
-{% spaceless %}
-    {#
-    No need to render the errors here, as all errors are mapped
-    to the first child (see RepeatedTypeValidatorExtension).
-    #}
-    {{ block('form_rows') }}
-{% endspaceless %}
-{% endblock repeated_row %}
-
-{% block form_row %}
-{% spaceless %}
-    {% if form_type is defined and form_type == 'inline' %}
-        {{ block('inline_row') }}
-    {% elseif form_type is defined and form_type == 'horizontal' %}
-        {{ block('horizontal_row') }}
-    {% else %}
-        {{ form_label(form) }}
-        {{ form_widget(form) }}
-        {{ form_errors(form) }}
-    {% endif %}
-{% endspaceless %}
-{% endblock form_row %}
-
-{% block inline_row %}
-    {{ form_widget(form) }}&nbsp;
-{% endblock inline_row %}
-
-{% block horizontal_row %}
-{% spaceless %}
-    <div class="control-group{% if errors|length %} error{% endif %}{% if validation_state is defined %} {{validation_state}}{% endif %}">
-        {{ form_label(form) }}
-        <div class="controls">
-            {{ form_widget(form) }}
-            {{ form_errors(form) }}
-        </div>
-    </div>
-{% endspaceless %}
-{% endblock horizontal_row %}
-
-{% block checkbox_row %}
-{% spaceless %}
-    {#
-    In order to make the click area bigger, the checkbox is
-    placed inside the label. See checkbox_label block.
-    #}
-    {% if form_type is defined and form_type == 'horizontal' %}
-        {{ block('horizontal_checkbox_row') }}
-    {% else %}
-        {{ form_label(form) }}
-        {{ form_errors(form) }}
-    {% endif %}
-{% endspaceless %}
-{% endblock checkbox_row %}
-
-{% block horizontal_checkbox_row %}
-{% spaceless %}
-    <div class="control-group">
-        <div class="controls">
-            {{ form_label(form) }}
-            {{ form_errors(form) }}
-        </div>
-    </div>
-{% endspaceless %}
-{% endblock horizontal_checkbox_row %}
-
-{% block search_row %}
-{% spaceless %}
-    {{ form_widget(form) }}
-    {{ form_errors(form) }}
-{% endspaceless %}
-{% endblock search_row %}
-
-{% block hidden_row %}
-    {{ form_widget(form) }}
-{% endblock hidden_row %}
-
-{# Misc #}
-
-{% block form_enctype %}
-{% spaceless %}
-    {% if multipart %}enctype="multipart/form-data"{% endif %}
-{% endspaceless %}
-{% endblock form_enctype %}
-
-{% block form_errors %}
-{% spaceless %}
-    {% if errors|length == 1 %}
-    <span class="help-inline">{{
-        errors[0].messagePluralization is null
-            ? errors[0].messageTemplate|trans(errors[0].messageParameters, 'validators')
-            : errors[0].messageTemplate|transchoice(errors[0].messagePluralization, errors[0].messageParameters, 'validators')
-    }}</span>
-    {% elseif errors|length > 0 %}
-    <ul class="help-block">
-        {% for error in errors %}
-            <li>{{
-                error.messagePluralization is null
-                    ? error.messageTemplate|trans(error.messageParameters, 'validators')
-                    : error.messageTemplate|transchoice(error.messagePluralization, error.messageParameters, 'validators')
-            }}</li>
-        {% endfor %}
-    </ul>
-    {% endif %}
-{% endspaceless %}
-{% endblock form_errors %}
-
-{% block form_errors_compound %}
-{% spaceless %}
-    {% if errors|length == 1 %}
-    <div class="alert alert-error control-group error">
-        <span class="help-inline">{{
-            errors[0].messagePluralization is null
-                ? errors[0].messageTemplate|trans(errors[0].messageParameters, 'validators')
-                : errors[0].messageTemplate|transchoice(errors[0].messagePluralization, errors[0].messageParameters, 'validators')
-        }}</span>
-    </div>
-    {% elseif errors|length > 0 %}
-    <div class="alert alert-error control-group error">
-        <ul class="help-block">
-            {% for error in errors %}
-                <li>{{
-                    error.messagePluralization is null
-                        ? error.messageTemplate|trans(error.messageParameters, 'validators')
-                        : error.messageTemplate|transchoice(error.messagePluralization, error.messageParameters, 'validators')
-                }}</li>
-            {% endfor %}
-        </ul>
-    </div>
-    {% endif %}
-{% endspaceless %}
-{% endblock form_errors_compound %}
-
-{% block form_rest %}
-{% spaceless %}
-    {% for child in form %}
-        {% if not child.rendered %}
-            {{ block('form_rows') }}
-        {% endif %}
-    {% endfor %}
-{% endspaceless %}
-{% endblock form_rest %}
-
-{% block help_block %}
-{% spaceless %}
-    {% if attr.help_block is defined %}
-    <span class="help-block">{{ attr.help_block|trans({}, translation_domain) }}</span>
-    {% endif %}
-{% endspaceless %}
-{% endblock help_block %}
-
-{% block help_inline %}
-{% spaceless %}
-    {% if attr.help is defined %}
-    <span class="help-inline">{{ attr.help|trans({}, translation_domain) }}</span>
-    {% endif %}
-{% endspaceless %}
-{% endblock help_inline %}
-
-{# Support #}
-
-{% block form_rows %}
-{% spaceless %}
-    {% set child_vars = {} %}
-    {% if form_type is defined %}
-        {% set child_vars = child_vars|merge({'form_type': form_type}) %}
-    {% endif %}
-
-    {% for child in form %}
-        {{ form_row(child, child_vars) }}
-    {% endfor %}
-{% endspaceless %}
-{% endblock form_rows %}
-
-{% block widget_attributes %}
-{% spaceless %}
-    id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if disabled %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
-    {% for attrname, attrvalue in attr %}{% if attrname in ['placeholder', 'title'] %}{{ attrname }}="{{ attrvalue|trans({}, translation_domain) }}" {% else %}{{ attrname }}="{{ attrvalue }}" {% endif %}{% endfor %}
-{% endspaceless %}
-{% endblock widget_attributes %}
-
-{% block widget_container_attributes %}
-{% spaceless %}
-    {% if id is not empty %}id="{{ id }}" {% endif %}
-    {% for attrname, attrvalue in attr %}{{ attrname }}="{{ attrvalue }}" {% endfor %}
-{% endspaceless %}
-{% endblock widget_container_attributes %}
-
-{# Deprecated in Symfony 2.1, to be removed in 2.3 #}
-
-{% block generic_label %}{{ block('form_label') }}{% endblock %}
-{% block widget_choice_options %}{{ block('choice_widget_options') }}{% endblock %}
-{% block field_widget %}{{ block('form_widget_simple') }}{% endblock %}
-{% block field_label %}{{ block('form_label') }}{% endblock %}
-{% block field_row %}{{ block('form_row') }}{% endblock %}
-{% block field_enctype %}{{ block('form_enctype') }}{% endblock %}
-{% block field_errors %}{{ block('form_errors') }}{% endblock %}
-{% block field_rest %}{{ block('form_rest') }}{% endblock %}
-{% block field_rows %}{{ block('form_rows') }}{% endblock %}

+ 0 - 3
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/views/_html5shiv.html.twig

@@ -1,3 +0,0 @@
-<!--[if lt IE 9]>
-<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
-<![endif]-->

+ 0 - 75
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Tests/Twig/BootstrapBadgeExtensionTest.php

@@ -1,75 +0,0 @@
-<?php
-/**
- * This file is part of BcBootstrapBundle.
- *
- * (c) 2012-2013 by Florian Eckerstorfer
- */
-
-namespace Bc\Bundle\BootstrapBundle\Tests\Twig;
-
-use Bc\Bundle\BootstrapBundle\Twig\BootstrapBadgeExtension;
-
-/**
- * BootstrapBadgeExtensionTest
- *
- * @category   Test
- * @package    BcBootstrapBundle
- * @subpackage Twig
- * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
- * @copyright  2012-2013 Florian Eckerstorfer
- * @license    http://opensource.org/licenses/MIT The MIT License
- * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
- */
-class BootstrapBadgeExtensionTest extends \PHPUnit_Framework_TestCase
-{
-    /** @var \Braincrafted\BootstrapBundle\Twig\BootstrapBadgeExtension */
-    private $extension;
-
-    /**
-     * Set up
-     */
-    public function setUp()
-    {
-        $this->extension = new BootstrapBadgeExtension();
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapBadgeExtension::badgeFilter
-     */
-    public function testBadgeFilter()
-    {
-        $this->assertEquals(
-            '<span class="badge">Hello World</span>',
-            $this->extension->badgeFilter('Hello World'),
-            '->badgeFilter() returns the HTML code for the given badge.'
-        );
-        $this->assertEquals(
-            '<span class="badge badge-success">Hello World</span>',
-            $this->extension->badgeFilter('Hello World', 'success'),
-            '->badgeFilter() returns the HTML code for the given success badge.'
-        );
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapBadgeExtension::getFilters
-     */
-    public function testGetFilters()
-    {
-        $filters = $this->extension->getFilters();
-        $this->assertCount(6, $filters, '->getFilters() returns 2 filters.');
-        $this->assertTrue(isset($filters['badge']), '->getFilters() returns "badge" filter.');
-        $this->assertTrue(isset($filters['badge_success']), '->getFilters() returns "badge_success" filter.');
-        $this->assertTrue(isset($filters['badge_warning']), '->getFilters() returns "badge_warning" filter.');
-        $this->assertTrue(isset($filters['badge_important']), '->getFilters() returns "badge_important" filter.');
-        $this->assertTrue(isset($filters['badge_info']), '->getFilters() returns "badge_info" filter.');
-        $this->assertTrue(isset($filters['badge_inverse']), '->getFilters() returns "badge_inverse" filter.');
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapBadgeExtension::getName
-     */
-    public function testGetName()
-    {
-        $this->assertEquals('bootstrap_badge_extension', $this->extension->getName(), '->getName() returns the name.');
-    }
-}

+ 0 - 88
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Tests/Twig/BootstrapIconExtensionTest.php

@@ -1,88 +0,0 @@
-<?php
-/**
- * This file is part of BcBootstrapBundle.
- *
- * (c) 2012-2013 by Florian Eckerstorfer
- */
-
-namespace Bc\Bundle\BootstrapBundle\Tests\Twig;
-
-use Bc\Bundle\BootstrapBundle\Twig\BootstrapIconExtension;
-
-/**
- * BootstrapIconExtensionTest
- *
- * @category   Test
- * @package    BraincraftedBootstrapBundle
- * @subpackage Twig
- * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
- * @copyright  2012-2013 Florian Eckerstorfer
- * @license    http://opensource.org/licenses/MIT The MIT License
- * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
- */
-class BootstrapIconExtensionTest extends \PHPUnit_Framework_TestCase
-{
-    /** @var \Braincrafted\BootstrapBundle\Twig\BootstrapIconExtension */
-    private $extension;
-
-    /**
-     * Set up
-     */
-    public function setUp()
-    {
-        $this->extension = new BootstrapIconExtension();
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapIconExtension::iconFilter
-     */
-    public function testIconFilter()
-    {
-        $this->assertEquals(
-            '<i class="icon-heart"></i>',
-            $this->extension->iconFilter('heart'),
-            '->iconFilter() returns the HTML code for the given icon.'
-        );
-        $this->assertEquals(
-            '<i class="icon-white icon-heart"></i>',
-            $this->extension->iconFilter('heart', 'white'),
-            '->iconFilter() returns the HTML code for the given icon in white.'
-        );
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapIconExtension::parseIconsFilter
-     */
-    public function testParseIconsFilter()
-    {
-        $this->assertEquals(
-            '<i class="icon-heart"></i> foobar',
-            $this->extension->parseIconsFilter('.icon-heart foobar'),
-            '->parseIconsFilter() returns the HTML code with the replaced icons.'
-        );
-        $this->assertEquals(
-            '<i class="icon-white icon-heart"></i> foobar',
-            $this->extension->parseIconsFilter('.icon-heart foobar', 'white'),
-            '->parseIconsFilter() returns the HTML code with the replaced icons in white.'
-        );
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapIconExtension::getFilters
-     */
-    public function testGetFilters()
-    {
-        $filters = $this->extension->getFilters();
-        $this->assertCount(2, $filters, '->getFilters() returns 2 filters.');
-        $this->assertTrue(isset($filters['parse_icons']), '->getFilters() returns "parse_icons" filter.');
-        $this->assertTrue(isset($filters['icon']), '->getFilters() returns "icon" filter.');
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapIconExtension::getName
-     */
-    public function testGetName()
-    {
-        $this->assertEquals('bootstrap_icon_extension', $this->extension->getName(), '->getName() returns the name.');
-    }
-}

+ 0 - 75
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Tests/Twig/BootstrapLabelExtensionTest.php

@@ -1,75 +0,0 @@
-<?php
-/**
- * This file is part of BcBootstrapBundle.
- *
- * (c) 2012-2013 by Florian Eckerstorfer
- */
-
-namespace Bc\Bundle\BootstrapBundle\Tests\Twig;
-
-use Bc\Bundle\BootstrapBundle\Twig\BootstrapLabelExtension;
-
-/**
- * BootstrapLabelExtensionTest
- *
- * @category   Test
- * @package    BcBootstrapBundle
- * @subpackage Twig
- * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
- * @copyright  2012-2013 Florian Eckerstorfer
- * @license    http://opensource.org/licenses/MIT The MIT License
- * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
- */
-class BootstrapLabelExtensionTest extends \PHPUnit_Framework_TestCase
-{
-    /** @var \Braincrafted\BootstrapBundle\Twig\BootstrapLabelExtension */
-    private $extension;
-
-    /**
-     * @return void
-     */
-    public function setUp()
-    {
-        $this->extension = new BootstrapLabelExtension();
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapLabelExtension::labelFilter
-     */
-    public function testLabelFilter()
-    {
-        $this->assertEquals(
-            '<span class="label">Hello World</span>',
-            $this->extension->labelFilter('Hello World'),
-            '->labelFilter() returns the HTML code for the given label.'
-        );
-        $this->assertEquals(
-            '<span class="label label-success">Hello World</span>',
-            $this->extension->labelFilter('Hello World', 'success'),
-            '->labelFilter() returns the HTML code for the given success label.'
-        );
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapLabelExtension::getFilters
-     */
-    public function testGetFilters()
-    {
-        $filters = $this->extension->getFilters();
-        $this->assertCount(6, $filters, '->getFilters() returns 2 filters.');
-        $this->assertTrue(isset($filters['label']), '->getFilters() returns "label" filter.');
-        $this->assertTrue(isset($filters['label_success']), '->getFilters() returns "label_success" filter.');
-        $this->assertTrue(isset($filters['label_warning']), '->getFilters() returns "label_warning" filter.');
-        $this->assertTrue(isset($filters['label_important']), '->getFilters() returns "label_important" filter.');
-        $this->assertTrue(isset($filters['label_info']), '->getFilters() returns "label_info" filter.');
-        $this->assertTrue(isset($filters['label_inverse']), '->getFilters() returns "label_inverse" filter.');
-    }
-
-    /**
-     * @covers Braincrafted\BootstrapBundle\Twig\BootstrapLabelExtension::getName
-     */
-    public function testGetName()
-    {
-        $this->assertEquals('bootstrap_label_extension', $this->extension->getName(), '->getName() returns the name.');
-    }
-}

+ 0 - 121
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Twig/BootstrapBadgeExtension.php

@@ -1,121 +0,0 @@
-<?php
-/**
- * This file is part of BcBootstrapBundle.
- *
- * (c) 2012-2013 by Florian Eckerstorfer
- */
-
-namespace Bc\Bundle\BootstrapBundle\Twig;
-
-use Twig_Extension;
-use Twig_Filter_Method;
-
-/**
- * BootstrapLabelExtension
- *
- * @category   TwigExtension
- * @package    BcBootstrapBundle
- * @subpackage Twig
- * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
- * @copyright  2012-2013 Florian Eckerstorfer
- * @license    http://opensource.org/licenses/MIT The MIT License
- * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
- */
-class BootstrapBadgeExtension extends Twig_Extension
-{
-    /**
-     * {@inheritDoc}
-     */
-    public function getFilters()
-    {
-        return array(
-            'badge'          => new Twig_Filter_Method($this, 'badgeFilter', array('is_safe' => array('html'))),
-            'badge_success'  => new Twig_Filter_Method($this, 'badgeSuccessFilter', array('is_safe' => array('html'))),
-            'badge_warning'  => new Twig_Filter_Method($this, 'badgeWarningFilter', array('is_safe' => array('html'))),
-            'badge_important'=> new Twig_Filter_Method($this, 'badgeImportantFilter', array('is_safe' => array('html'))),
-            'badge_info'     => new Twig_Filter_Method($this, 'badgeInfoFilter', array('is_safe' => array('html'))),
-            'badge_inverse'  => new Twig_Filter_Method($this, 'badgeInverseFilter', array('is_safe' => array('html')))
-        );
-    }
-
-    /**
-     * Returns the HTML code for a badge.
-     *
-     * @param string $text The text of the badge
-     * @param string $type The type of badge
-     *
-     * @return string The HTML code of the badge
-     */
-    public function badgeFilter($text, $type = null)
-    {
-        return sprintf('<span class="badge%s">%s</span>', ($type ? ' badge-' . $type : ''), $text);
-    }
-
-    /**
-     * Returns the HTML code for a success badge.
-     *
-     * @param string $text The text of the badge
-     *
-     * @return string The HTML code of the badge
-     */
-    public function badgeSuccessFilter($text)
-    {
-        return $this->badgeFilter($text, 'success');
-    }
-
-    /**
-     * Returns the HTML code for a warning badge.
-     *
-     * @param string $text The text of the badge
-     *
-     * @return string The HTML code of the badge
-     */
-    public function badgeWarningFilter($text)
-    {
-        return $this->badgeFilter($text, 'warning');
-    }
-
-    /**
-     * Returns the HTML code for a important badge.
-     *
-     * @param string $text The text of the badge
-     *
-     * @return string The HTML code of the badge
-     */
-    public function badgeImportantFilter($text)
-    {
-        return $this->badgeFilter($text, 'important');
-    }
-
-    /**
-     * Returns the HTML code for a info badge.
-     *
-     * @param string $text The text of the badge
-     *
-     * @return string The HTML code of the badge
-     */
-    public function badgeInfoFilter($text)
-    {
-        return $this->badgeFilter($text, 'info');
-    }
-
-    /**
-     * Returns the HTML code for a inverse badge.
-     *
-     * @param string $text The text of the badge
-     *
-     * @return string The HTML code of the badge
-     */
-    public function badgeInverseFilter($text)
-    {
-        return $this->badgeFilter($text, 'inverse');
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public function getName()
-    {
-        return 'bootstrap_badge_extension';
-    }
-}

+ 0 - 38
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/composer.json

@@ -1,38 +0,0 @@
-{
-    "name":         "braincrafted/bootstrap-bundle",
-    "version":      "1.4.2",
-    "description":  "Twitter Bootstrap for Symfony2",
-    "keywords":     ["bootstrap"],
-    "type":         "symfony-bundle",
-    "license":      "MIT",
-    "authors":     [
-        {
-            "name":     "Florian Eckerstorfer",
-            "email":    "florian@eckerstorfer.co",
-            "homepage": "http://florianeckerstorfer.com"
-        }
-    ],
-    "require":      {
-        "php":              ">=5.3.3"
-    },
-    "require-dev": {
-        "knplabs/knp-menu":                     "dev-master",
-        "knplabs/knp-menu-bundle":              "dev-master",
-        "knplabs/knp-markdown-bundle":          "dev-master",
-        "knplabs/knp-paginator-bundle":         "dev-master",
-        "nikic/php-parser":                     "dev-master",
-        "instaclick/php-code-sniffer":          "dev-master",
-        "instaclick/symfony2-coding-standard":  "dev-master",
-        "phpmd/phpmd":                          "1.4.*"
-    },
-    "suggest":      {
-        "knplabs/knp-paginator-bundle": "BraincraftedBootstrapBundle styles the pagination provided by KnpPaginatorBundle.",
-        "knplabs/knp-menu":             "Required to use KnpMenuBundle.",
-        "knplabs/knp-menu-bundle":      "BraincraftedBootstrapBundle styles the menus provided by KnpMenuBundle.",
-        "twbs/bootstrap":            "Twitter Bootstrap provides the assets (images, CSS and JS)"
-    },
-    "autoload": {
-        "psr-0": { "Bc\\Bundle\\BootstrapBundle": "" }
-    },
-    "target-dir": "Bc/Bundle/BootstrapBundle"
-}

+ 0 - 1333
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/composer.lock

@@ -1,1333 +0,0 @@
-{
-    "_readme": [
-        "This file locks the dependencies of your project to a known state",
-        "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
-    ],
-    "hash": "ad3460d7548b6c561af3e579489cfd02",
-    "packages": [
-
-    ],
-    "packages-dev": [
-        {
-            "name": "dflydev/markdown",
-            "version": "v1.0.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/dflydev/dflydev-markdown.git",
-                "reference": "v1.0.2"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://github.com/dflydev/dflydev-markdown/zipball/v1.0.2",
-                "reference": "v1.0.2",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-0": {
-                    "dflydev\\markdown": "src"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "New BSD License"
-            ],
-            "authors": [
-                {
-                    "name": "Dragonfly Development Inc.",
-                    "email": "info@dflydev.com",
-                    "homepage": "http://dflydev.com"
-                },
-                {
-                    "name": "Beau Simensen",
-                    "email": "beau@dflydev.com",
-                    "homepage": "http://beausimensen.com"
-                },
-                {
-                    "name": "Michel Fortin",
-                    "homepage": "http://michelf.com"
-                },
-                {
-                    "name": "John Gruber",
-                    "homepage": "http://daringfireball.net"
-                }
-            ],
-            "description": "PHP Markdown & Extra",
-            "homepage": "http://github.com/dflydev/dflydev-markdown",
-            "keywords": [
-                "markdown"
-            ],
-            "time": "2012-01-15 19:36:37"
-        },
-        {
-            "name": "doctrine/common",
-            "version": "2.3.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/doctrine/common",
-                "reference": "2.3.0"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://github.com/doctrine/common/zipball/2.3.0",
-                "reference": "2.3.0",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.2"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.3.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Doctrine\\Common": "lib/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Jonathan Wage",
-                    "email": "jonwage@gmail.com",
-                    "homepage": "http://www.jwage.com/"
-                },
-                {
-                    "name": "Guilherme Blanco",
-                    "email": "guilhermeblanco@gmail.com",
-                    "homepage": "http://www.instaclick.com"
-                },
-                {
-                    "name": "Roman Borschel",
-                    "email": "roman@code-factory.org"
-                },
-                {
-                    "name": "Benjamin Eberlei",
-                    "email": "kontakt@beberlei.de"
-                },
-                {
-                    "name": "Johannes Schmitt",
-                    "email": "schmittjoh@gmail.com",
-                    "homepage": "http://jmsyst.com",
-                    "role": "Developer of wrapped JMSSerializerBundle"
-                }
-            ],
-            "description": "Common Library for Doctrine projects",
-            "homepage": "http://www.doctrine-project.org",
-            "keywords": [
-                "annotations",
-                "collections",
-                "eventmanager",
-                "persistence",
-                "spl"
-            ],
-            "time": "2012-09-19 22:55:18"
-        },
-        {
-            "name": "instaclick/php-code-sniffer",
-            "version": "dev-master",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/instaclick/PHP_CodeSniffer.git",
-                "reference": "4cab7ffbac5df3f495797dbbb6321545f6ab8cde"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/instaclick/PHP_CodeSniffer/zipball/4cab7ffbac5df3f495797dbbb6321545f6ab8cde",
-                "reference": "4cab7ffbac5df3f495797dbbb6321545f6ab8cde",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.1.2"
-            },
-            "bin": [
-                "scripts/phpcs"
-            ],
-            "type": "library",
-            "autoload": {
-                "classmap": [
-                    "CodeSniffer.php",
-                    "CodeSniffer/CLI.php",
-                    "CodeSniffer/Exception.php",
-                    "CodeSniffer/File.php",
-                    "CodeSniffer/MultiFileSniff.php",
-                    "CodeSniffer/Reporting.php",
-                    "CodeSniffer/Report.php",
-                    "CodeSniffer/Sniff.php",
-                    "CodeSniffer/Tokens.php",
-                    "CodeSniffer/Reports/",
-                    "CodeSniffer/CommentParser/",
-                    "CodeSniffer/Tokenizers/",
-                    "CodeSniffer/DocGenerators/",
-                    "CodeSniffer/Standards/AbstractPatternSniff.php",
-                    "CodeSniffer/Standards/AbstractScopeSniff.php",
-                    "CodeSniffer/Standards/AbstractVariableSniff.php",
-                    "CodeSniffer/Standards/IncorrectPatternException.php",
-                    "CodeSniffer/Standards/Generic/Sniffs/",
-                    "CodeSniffer/Standards/MySource/Sniffs/",
-                    "CodeSniffer/Standards/PEAR/Sniffs/",
-                    "CodeSniffer/Standards/PSR1/Sniffs/",
-                    "CodeSniffer/Standards/PSR2/Sniffs/",
-                    "CodeSniffer/Standards/Squiz/Sniffs/",
-                    "CodeSniffer/Standards/Zend/Sniffs/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Instaclick",
-                    "role": "fork maintainer"
-                }
-            ],
-            "description": "(fork) PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
-            "homepage": "http://instaclick.com",
-            "keywords": [
-                "phpcs",
-                "standards"
-            ],
-            "time": "2013-01-04 16:10:29"
-        },
-        {
-            "name": "instaclick/symfony2-coding-standard",
-            "version": "dev-master",
-            "target-dir": "Symfony2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/instaclick/Symfony2-coding-standard.git",
-                "reference": "da9e7f875ced2be544407bbfc522ad9cf71641c2"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/instaclick/Symfony2-coding-standard/zipball/da9e7f875ced2be544407bbfc522ad9cf71641c2",
-                "reference": "da9e7f875ced2be544407bbfc522ad9cf71641c2",
-                "shasum": ""
-            },
-            "require": {
-                "nikic/php-parser": "dev-master"
-            },
-            "type": "library",
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Instaclick",
-                    "homepage": "http://instaclick.com/",
-                    "role": "Maintainer"
-                }
-            ],
-            "description": "A code standard to check against the Symfony coding standards.",
-            "time": "2013-01-04 17:00:44"
-        },
-        {
-            "name": "knplabs/knp-components",
-            "version": "1.2.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/KnpLabs/knp-components.git",
-                "reference": "1.2.2"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/KnpLabs/knp-components/zipball/1.2.2",
-                "reference": "1.2.2",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.2"
-            },
-            "suggest": {
-                "doctrine/common": "to allow usage pagination with Doctrine ArrayCollection",
-                "doctrine/mongodb-odm": "to allow usage pagination with Doctrine ODM MongoDB",
-                "doctrine/orm": "to allow usage pagination with Doctrine ORM",
-                "propel/propel1": "to allow usage pagination with Propel ORM",
-                "ruflin/Elastica": "to allow usage pagination with ElasticSearch Client",
-                "solarium/solarium": "to allow usage pagination with Solarium Client"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.2.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Knp\\Component": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "KnpLabs Team",
-                    "homepage": "http://knplabs.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://github.com/KnpLabs/knp-components/contributors"
-                }
-            ],
-            "description": "Knplabs component library",
-            "homepage": "http://github.com/KnpLabs/knp-components",
-            "keywords": [
-                "components",
-                "knp",
-                "knplabs",
-                "pager",
-                "paginator"
-            ],
-            "time": "2013-02-20 12:05:07"
-        },
-        {
-            "name": "knplabs/knp-markdown-bundle",
-            "version": "dev-master",
-            "target-dir": "Knp/Bundle/MarkdownBundle",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/KnpLabs/KnpMarkdownBundle.git",
-                "reference": "1a31848de5aad77b32d2b152bdce51cfbc9edcca"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/KnpLabs/KnpMarkdownBundle/zipball/1a31848de5aad77b32d2b152bdce51cfbc9edcca",
-                "reference": "1a31848de5aad77b32d2b152bdce51cfbc9edcca",
-                "shasum": ""
-            },
-            "require": {
-                "dflydev/markdown": "1.0.*@dev",
-                "php": ">=5.3.3",
-                "symfony/framework-bundle": ">=2.0,<2.3-dev"
-            },
-            "suggest": {
-                "ext-sundown": "to use optional support for php-sundown extension instead of php implementation",
-                "symfony/twig-bundle": "to use the Twig markdown filter"
-            },
-            "type": "symfony-bundle",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.2.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Knp\\Bundle\\MarkdownBundle": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "KnpLabs Team",
-                    "homepage": "http://knplabs.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://github.com/KnpLabs/KnpMarkdownBundle/contributors"
-                }
-            ],
-            "description": "Knplabs markdown bundle transforms markdown into html",
-            "homepage": "http://github.com/KnpLabs/KnpMarkdownBundle",
-            "keywords": [
-                "bundle",
-                "knp",
-                "knplabs",
-                "markdown"
-            ],
-            "time": "2012-10-17 19:09:15"
-        },
-        {
-            "name": "knplabs/knp-menu",
-            "version": "dev-master",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/KnpLabs/KnpMenu.git",
-                "reference": "730bc37232f5f813822acf80edfbd89381ea5971"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/KnpLabs/KnpMenu/zipball/730bc37232f5f813822acf80edfbd89381ea5971",
-                "reference": "730bc37232f5f813822acf80edfbd89381ea5971",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.0"
-            },
-            "require-dev": {
-                "pimple/pimple": "1.0.*",
-                "silex/silex": "1.0.*",
-                "twig/twig": ">=1.2,<2.0-dev"
-            },
-            "suggest": {
-                "pimple/pimple": "for the built-in implementations of the menu provider and renderer provider",
-                "silex/silex": "for the integration with your silex application",
-                "twig/twig": "for the TwigRenderer and the integration with your templates"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Knp\\Menu\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Christophe Coevoet",
-                    "email": "stof@notk.org"
-                },
-                {
-                    "name": "KnpLabs",
-                    "homepage": "http://knplabs.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://github.com/KnpLabs/KnpMenu/contributors"
-                }
-            ],
-            "description": "An object oriented menu library",
-            "homepage": "http://knplabs.com",
-            "keywords": [
-                "menu",
-                "tree"
-            ],
-            "time": "2012-12-27 13:04:16"
-        },
-        {
-            "name": "knplabs/knp-menu-bundle",
-            "version": "dev-master",
-            "target-dir": "Knp/Bundle/MenuBundle",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/KnpLabs/KnpMenuBundle.git",
-                "reference": "8f84c396927809e885f7a17ef3737358c001d78f"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/KnpLabs/KnpMenuBundle/zipball/8f84c396927809e885f7a17ef3737358c001d78f",
-                "reference": "8f84c396927809e885f7a17ef3737358c001d78f",
-                "shasum": ""
-            },
-            "require": {
-                "knplabs/knp-menu": "2.0.*",
-                "symfony/framework-bundle": ">=2.0,<2.3-dev"
-            },
-            "type": "symfony-bundle",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Knp\\Bundle\\MenuBundle": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Christophe Coevoet",
-                    "email": "stof@notk.org"
-                },
-                {
-                    "name": "Knplabs",
-                    "homepage": "http://knplabs.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://github.com/KnpLabs/KnpMenuBundle/contributors"
-                }
-            ],
-            "description": "This bundle provides an integration of the KnpMenu library",
-            "keywords": [
-                "menu"
-            ],
-            "time": "2013-03-18 17:08:00"
-        },
-        {
-            "name": "knplabs/knp-paginator-bundle",
-            "version": "dev-master",
-            "target-dir": "Knp/Bundle/PaginatorBundle",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/KnpLabs/KnpPaginatorBundle.git",
-                "reference": "6d93d89a3c913155d9d1778db4232db0e4d6f3e3"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/KnpLabs/KnpPaginatorBundle/zipball/6d93d89a3c913155d9d1778db4232db0e4d6f3e3",
-                "reference": "6d93d89a3c913155d9d1778db4232db0e4d6f3e3",
-                "shasum": ""
-            },
-            "require": {
-                "knplabs/knp-components": ">=1.1,<2.0",
-                "php": ">=5.3.3",
-                "symfony/framework-bundle": ">=2.0,<3.0",
-                "twig/twig": ">=1.5,<2.0"
-            },
-            "type": "symfony-bundle",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.3.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Knp\\Bundle\\PaginatorBundle": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "KnpLabs Team",
-                    "homepage": "http://knplabs.com"
-                },
-                {
-                    "name": "Symfony2 Community",
-                    "homepage": "http://github.com/KnpLabs/KnpPaginatorBundle/contributors"
-                }
-            ],
-            "description": "Paginator bundle for Symfony2 to automate pagination and simplify sorting and other features",
-            "homepage": "http://github.com/KnpLabs/KnpPaginatorBundle",
-            "keywords": [
-                "Symfony2",
-                "bundle",
-                "knp",
-                "knplabs",
-                "pager",
-                "pagination",
-                "paginator"
-            ],
-            "time": "2013-04-08 18:28:56"
-        },
-        {
-            "name": "nikic/php-parser",
-            "version": "dev-master",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/nikic/PHP-Parser.git",
-                "reference": "5fca55702b4e035b60a7b1cbac538572db47121d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/5fca55702b4e035b60a7b1cbac538572db47121d",
-                "reference": "5fca55702b4e035b60a7b1cbac538572db47121d",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.2"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "0.9-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "PHPParser": "lib/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Nikita Popov"
-                }
-            ],
-            "description": "A PHP parser written in PHP",
-            "keywords": [
-                "parser",
-                "php"
-            ],
-            "time": "2013-03-05 14:42:24"
-        },
-        {
-            "name": "pdepend/pdepend",
-            "version": "1.1.0",
-            "source": {
-                "type": "git",
-                "url": "git://github.com/pdepend/pdepend.git",
-                "reference": "1.1.0"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://github.com/pdepend/pdepend/zipball/1.1.0",
-                "reference": "1.1.0",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.2.3"
-            },
-            "bin": [
-                "src/bin/pdepend"
-            ],
-            "type": "library",
-            "notification-url": "https://packagist.org/downloads/",
-            "description": "Official version of pdepend to be handled with Composer",
-            "time": "2012-09-12 04:09:19"
-        },
-        {
-            "name": "phpmd/phpmd",
-            "version": "1.4.1",
-            "source": {
-                "type": "git",
-                "url": "git://github.com/phpmd/phpmd.git",
-                "reference": "1.4.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://github.com/phpmd/phpmd/archive/1.4.1.zip",
-                "reference": "1.4.1",
-                "shasum": ""
-            },
-            "require": {
-                "pdepend/pdepend": "*",
-                "php": ">=5.3.0"
-            },
-            "bin": [
-                "src/bin/phpmd"
-            ],
-            "type": "library",
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                "../../pdepend/pdepend/src/main/php",
-                "src/main/php"
-            ],
-            "description": "Official version of PHPMD handled with Composer.",
-            "time": "2012-12-14 12:25:09"
-        },
-        {
-            "name": "psr/log",
-            "version": "1.0.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/log",
-                "reference": "1.0.0"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://github.com/php-fig/log/archive/1.0.0.zip",
-                "reference": "1.0.0",
-                "shasum": ""
-            },
-            "type": "library",
-            "autoload": {
-                "psr-0": {
-                    "Psr\\Log\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
-                }
-            ],
-            "description": "Common interface for logging libraries",
-            "keywords": [
-                "log",
-                "psr",
-                "psr-3"
-            ],
-            "time": "2012-12-21 11:40:51"
-        },
-        {
-            "name": "symfony/config",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/Config",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Config.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Config/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Config\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony Config Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-03-01 10:42:10"
-        },
-        {
-            "name": "symfony/dependency-injection",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/DependencyInjection",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/DependencyInjection.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "require-dev": {
-                "symfony/config": ">=2.2,<2.3-dev",
-                "symfony/yaml": ">=2.0,<3.0"
-            },
-            "suggest": {
-                "symfony/config": "2.2.*",
-                "symfony/yaml": "2.2.*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\DependencyInjection\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony DependencyInjection Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-03-23 07:49:54"
-        },
-        {
-            "name": "symfony/event-dispatcher",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/EventDispatcher",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/EventDispatcher.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "require-dev": {
-                "symfony/dependency-injection": ">=2.0,<3.0"
-            },
-            "suggest": {
-                "symfony/dependency-injection": "2.2.*",
-                "symfony/http-kernel": "2.2.*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\EventDispatcher\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony EventDispatcher Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-02-11 11:26:43"
-        },
-        {
-            "name": "symfony/filesystem",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/Filesystem",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Filesystem.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Filesystem/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Filesystem\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony Filesystem Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-01-17 15:25:59"
-        },
-        {
-            "name": "symfony/framework-bundle",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Bundle/FrameworkBundle",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/FrameworkBundle.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/FrameworkBundle/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "doctrine/common": ">=2.2,<3.0",
-                "php": ">=5.3.3",
-                "symfony/config": ">=2.2,<2.3-dev",
-                "symfony/dependency-injection": ">=2.0,<3.0",
-                "symfony/event-dispatcher": ">=2.1,<3.0",
-                "symfony/filesystem": ">=2.1,<2.3-dev",
-                "symfony/http-kernel": ">=2.2,<2.3-dev",
-                "symfony/routing": ">=2.2,<2.3-dev",
-                "symfony/stopwatch": ">=2.2,<2.3-dev",
-                "symfony/templating": ">=2.1,<3.0",
-                "symfony/translation": ">=2.2,<2.3-dev"
-            },
-            "require-dev": {
-                "symfony/finder": ">=2.0,<3.0",
-                "symfony/security": ">=2.2,<2.3-dev"
-            },
-            "suggest": {
-                "symfony/console": "2.2.*",
-                "symfony/finder": "2.2.*",
-                "symfony/form": "2.2.*",
-                "symfony/validator": "2.2.*"
-            },
-            "type": "symfony-bundle",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Bundle\\FrameworkBundle\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony FrameworkBundle",
-            "homepage": "http://symfony.com",
-            "time": "2013-04-06 10:15:43"
-        },
-        {
-            "name": "symfony/http-foundation",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/HttpFoundation",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/HttpFoundation.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\HttpFoundation\\": ""
-                },
-                "classmap": [
-                    "Symfony/Component/HttpFoundation/Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony HttpFoundation Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-04-06 10:15:43"
-        },
-        {
-            "name": "symfony/http-kernel",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/HttpKernel",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/HttpKernel.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3",
-                "psr/log": ">=1.0,<2.0",
-                "symfony/event-dispatcher": ">=2.1,<3.0",
-                "symfony/http-foundation": ">=2.2,<2.3-dev"
-            },
-            "require-dev": {
-                "symfony/browser-kit": "2.2.*",
-                "symfony/class-loader": ">=2.1,<3.0",
-                "symfony/config": ">=2.0,<3.0",
-                "symfony/console": "2.2.*",
-                "symfony/dependency-injection": ">=2.0,<3.0",
-                "symfony/finder": ">=2.0,<3.0",
-                "symfony/process": ">=2.0,<3.0",
-                "symfony/routing": ">=2.2,<2.3-dev",
-                "symfony/stopwatch": ">=2.2,<2.3-dev"
-            },
-            "suggest": {
-                "symfony/browser-kit": "2.2.*",
-                "symfony/class-loader": "2.2.*",
-                "symfony/config": "2.2.*",
-                "symfony/console": "2.2.*",
-                "symfony/dependency-injection": "2.2.*",
-                "symfony/finder": "2.2.*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\HttpKernel\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony HttpKernel Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-04-06 10:16:33"
-        },
-        {
-            "name": "symfony/routing",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/Routing",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Routing.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "require-dev": {
-                "doctrine/common": ">=2.2,<3.0",
-                "psr/log": ">=1.0,<2.0",
-                "symfony/config": ">=2.2,<2.3-dev",
-                "symfony/yaml": ">=2.0,<3.0"
-            },
-            "suggest": {
-                "doctrine/common": "~2.2",
-                "symfony/config": "2.2.*",
-                "symfony/yaml": "2.2.*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Routing\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony Routing Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-03-23 12:03:22"
-        },
-        {
-            "name": "symfony/stopwatch",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/Stopwatch",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Stopwatch.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Stopwatch\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony Stopwatch Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-01-04 16:58:00"
-        },
-        {
-            "name": "symfony/templating",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/Templating",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Templating.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Templating/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Templating\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony Templating Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-01-17 15:25:59"
-        },
-        {
-            "name": "symfony/translation",
-            "version": "v2.2.1",
-            "target-dir": "Symfony/Component/Translation",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Translation.git",
-                "reference": "v2.2.1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Translation/zipball/v2.2.1",
-                "reference": "v2.2.1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "require-dev": {
-                "symfony/config": ">=2.0,<2.3-dev",
-                "symfony/yaml": ">=2.2,<3.0"
-            },
-            "suggest": {
-                "symfony/config": "2.2.*",
-                "symfony/yaml": "2.2.*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.2-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Translation\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony Translation Component",
-            "homepage": "http://symfony.com",
-            "time": "2013-04-01 08:06:05"
-        },
-        {
-            "name": "twig/twig",
-            "version": "v1.12.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/fabpot/Twig.git",
-                "reference": "v1.12.3"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.12.3",
-                "reference": "v1.12.3",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.2.4"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.12-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Twig_": "lib/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Armin Ronacher",
-                    "email": "armin.ronacher@active-4.com"
-                }
-            ],
-            "description": "Twig, the flexible, fast, and secure template language for PHP",
-            "homepage": "http://twig.sensiolabs.org",
-            "keywords": [
-                "templating"
-            ],
-            "time": "2013-04-08 12:40:11"
-        }
-    ],
-    "aliases": [
-
-    ],
-    "minimum-stability": "stable",
-    "stability-flags": {
-        "knplabs/knp-menu": 20,
-        "knplabs/knp-menu-bundle": 20,
-        "knplabs/knp-markdown-bundle": 20,
-        "knplabs/knp-paginator-bundle": 20,
-        "nikic/php-parser": 20,
-        "instaclick/php-code-sniffer": 20,
-        "instaclick/symfony2-coding-standard": 20
-    },
-    "platform": {
-        "php": ">=5.3.3"
-    },
-    "platform-dev": [
-
-    ]
-}

+ 7 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/.gitignore

@@ -0,0 +1,7 @@
+/build/
+/vendor/
+/Resources/docs/code-coverage
+/phpunit.xml
+/composer.lock
+*.sublime-project
+*.sublime-workspace

+ 44 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/.scrutinizer.yml

@@ -0,0 +1,44 @@
+filter:
+    excluded_paths:
+        - 'vendor/*'
+        - 'app/*'
+        - 'web/*'
+        - 'Tests/*'
+before_commands:
+    - 'composer --prefer-source --dev install'
+    - 'cp phpunit.xml.dist phpunit.xml'
+tools:
+    php_mess_detector:
+        config:
+            naming_rules: { boolean_method_name: true }
+            controversial_rules: { camel_case_class_name: true, camel_case_property_name: true, camel_case_method_name: true, camel_case_parameter_name: true, camel_case_variable_name: true }
+    php_analyzer:
+        config:
+            parameter_reference_check: { enabled: false }
+            checkstyle: { enabled: true, no_trailing_whitespace: true, naming: { enabled: true, local_variable: '^[a-z][a-zA-Z0-9]*$', abstract_class_name: ^Abstract|Factory$, utility_class_name: 'Utils?$', constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$', property_name: '^[a-z][a-zA-Z0-9]*$', method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$', parameter_name: '^[a-z][a-zA-Z0-9]*$', interface_name: '^[A-Z][a-zA-Z0-9]*Interface$', type_name: '^[A-Z][a-zA-Z0-9]*$', exception_name: '^[A-Z][a-zA-Z0-9]*Exception$', isser_method_name: '^(?:is|has|should|may|supports)' } }
+            unreachable_code: { enabled: true }
+            check_access_control: { enabled: false }
+            typo_checks: { enabled: true }
+            check_variables: { enabled: true }
+            suspicious_code: { enabled: false, overriding_parameter: false, overriding_closure_use: false, parameter_closure_use_conflict: false, parameter_multiple_times: false, non_existent_class_in_instanceof_check: false, non_existent_class_in_catch_clause: false, assignment_of_null_return: false, non_commented_switch_fallthrough: false, non_commented_empty_catch_block: false, overriding_private_members: false, use_statement_alias_conflict: false, precedence_in_condition_assignment: false }
+            dead_assignments: { enabled: true }
+            verify_php_doc_comments: { enabled: true, parameters: true, return: true, suggest_more_specific_types: true, ask_for_return_if_not_inferrable: true, ask_for_param_type_annotation: true }
+            loops_must_use_braces: { enabled: true }
+            check_usage_context: { enabled: true, method_call_on_non_object: { enabled: true, ignore_null_pointer: true }, foreach: { value_as_reference: true, traversable: true }, missing_argument: true, argument_type_checks: lenient }
+            simplify_boolean_return: { enabled: true }
+            phpunit_checks: { enabled: true }
+            reflection_checks: { enabled: false }
+            precedence_checks: { enabled: true, assignment_in_condition: true, comparison_of_bit_result: true }
+            basic_semantic_checks: { enabled: true }
+            doc_comment_fixes: { enabled: true }
+            reflection_fixes: { enabled: false }
+            use_statement_fixes: { enabled: true, remove_unused: true, preserve_multiple: false, order_alphabetically: false }
+    php_code_sniffer:
+        config:
+            standard: PSR2
+    sensiolabs_security_checker: true
+    php_code_coverage:
+        config_path: phpunit.xml.dist
+    php_cpd: true
+    php_loc: true
+    php_pdepend: true

+ 5 - 1
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/.travis.yml → vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/.travis.yml

@@ -1,11 +1,15 @@
 language: php
 
 php:
+  - 5.3.3
   - 5.3
   - 5.4
+  - 5.5
 
 before_script:
   - wget http://getcomposer.org/composer.phar
-  - php composer.phar install --dev
+  - php composer.phar --prefer-source --dev install
   - cp phpunit.xml.dist phpunit.xml
+
+script:
   - phpunit

+ 6 - 5
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/BcBootstrapBundle.php → vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/BraincraftedBootstrapBundle.php

@@ -1,23 +1,24 @@
 <?php
+
 /**
- * This file is part of BcBootstrapBundle.
+ * This file is part of BraincraftedBootstrapBundle.
  *
  * (c) 2012-2013 by Florian Eckerstorfer
  */
 
-namespace Bc\Bundle\BootstrapBundle;
+namespace Braincrafted\Bundle\BootstrapBundle;
 
 use Symfony\Component\HttpKernel\Bundle\Bundle;
 
 /**
- * BcBootstrapBundle
+ * BraincraftedBootstrapBundle
  *
- * @package   BcBootstrapBundle
+ * @package   BraincraftedBootstrapBundle
  * @author    Florian Eckerstorfer <florian@eckerstorfer.co>
  * @copyright 2012-2013 Florian Eckerstorfer
  * @license   http://opensource.org/licenses/MIT The MIT License
  * @link      http://bootstrap.braincrafted.com Bootstrap for Symfony2
  */
-class BcBootstrapBundle extends Bundle
+class BraincraftedBootstrapBundle extends Bundle
 {
 }

+ 0 - 0
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/CHANGELOG.md → vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/CHANGELOG.md


+ 29 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/CONTRIBUTING.md

@@ -0,0 +1,29 @@
+Contributing
+============
+
+Thank you for contributing to BraincraftedBootstrapBundle.
+
+Here are a few rules to make code reviews and merging your code into the repository easier.
+
+You MUST follow the [PSR-1](http://www.php-fig.org/psr/1/) and
+[PSR-2](http://www.php-fig.org/psr/2/). If you don't know about them, read the recommendations. You can use
+[PHP-CS-Fixer tool](http://cs.sensiolabs.org/) to find errors in your code.
+
+You MUST run the test suite.
+
+You MUST write (or update) unit tests.
+
+You SHOULD write documentation.
+
+Please, write [commit messages that make
+sense](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
+and [rebase your branch](http://git-scm.com/book/en/Git-Branching-Rebasing)
+before submitting your Pull Request.
+
+If asked, [squash your
+commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html). This is used to "clean" your Pull
+Request before merging it (we don't want commits such as `fix tests`, `fix 2`, `fix 3`, etc.).
+
+Thank you!
+
+This document is based on an article by [William Durand](http://williamdurand.fr/2013/11/20/on-creating-pull-requests/).

+ 113 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Command/GenerateCommand.php

@@ -0,0 +1,113 @@
+<?php
+
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ *
+ * (c) 2012-2013 by Florian Eckerstorfer
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\Command;
+
+use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+use Braincrafted\Bundle\BootstrapBundle\Util\PathUtil;
+
+/**
+ * GenerateCommand
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage Command
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2012-2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ * @link       http://bootstrap.braincrafted.com BraincraftedBootstrapBundle
+ */
+class GenerateCommand extends ContainerAwareCommand
+{
+    /** @var PathUtil */
+    private $pathUtil;
+
+    /**
+     * {@inheritDoc}
+     */
+    public function __construct($name = null)
+    {
+        $this->pathUtil = new PathUtil;
+
+        parent::__construct($name);
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @codeCoverageIgnore
+     */
+    protected function configure()
+    {
+        $this
+            ->setName('braincrafted:bootstrap:generate')
+            ->setDescription('Generates a custom bootstrap.less')
+        ;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected function execute(InputInterface $input, OutputInterface $output)
+    {
+        $config = $this->getContainer()->getParameter('braincrafted_bootstrap.customize');
+
+        if (false === isset($config['variables_file']) || null === $config['variables_file']) {
+            $output->writeln('<error>Found no custom variables.less file.</error>');
+
+            return;
+        }
+
+        $filter = $this->getContainer()->getParameter('braincrafted_bootstrap.less_filter');
+        if ('less' !== $filter && 'lessphp' !== $filter) {
+            $output->writeln(
+                '<error>Bundle must be configured with "less" or "lessphp" to generated bootstrap.less</error>'
+            );
+
+            return;
+        }
+
+        $output->writeln('<comment>Found custom variables file. Generating...</comment>');
+        $this->executeGenerateBootstrap($config);
+        $output->writeln(sprintf('Saved to <info>%s</info>', $config['bootstrap_output']));
+    }
+
+    protected function executeGenerateBootstrap(array $config)
+    {
+        // In the template for bootstrap.less we need the path where Bootstraps .less files are stored and the path
+        // to the variables.less file.
+        // Absolute path do not work in LESSs import statement, we have to calculate the relative ones
+
+        $lessDir = $this->pathUtil->getRelativePath(
+            dirname($config['bootstrap_output']),
+            $this->getContainer()->getParameter('braincrafted_bootstrap.assets_dir')
+        );
+        $variablesDir = $this->pathUtil->getRelativePath(
+            dirname($config['bootstrap_output']),
+            dirname($config['variables_file'])
+        );
+        $variablesFile = sprintf(
+            '%s%s%s',
+            $variablesDir,
+            strlen($variablesDir) > 0 ? '/' : '',
+            basename($config['variables_file'])
+        );
+
+        // We can now use Twig to render the bootstrap.less file and save it
+        $content = $this->getContainer()->get('twig')->render(
+            $config['bootstrap_template'],
+            array(
+                'variables_file' => $variablesFile,
+                'assets_dir'     => $lessDir
+            )
+        );
+        file_put_contents($config['bootstrap_output'], $content);
+    }
+}

+ 91 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Command/InstallCommand.php

@@ -0,0 +1,91 @@
+<?php
+
+namespace Braincrafted\Bundle\BootstrapBundle\Command;
+
+use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Filesystem\Filesystem;
+use Symfony\Component\Filesystem\Exception\IOException;
+
+class InstallCommand extends ContainerAwareCommand
+{
+    /**
+     * {@inheritDoc}
+     */
+    protected function configure()
+    {
+        $this->setName('braincrafted:bootstrap:install')
+            ->setDescription('Installs the icon font');
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected function execute(InputInterface $input, OutputInterface $output)
+    {
+        $destDir = $this->getDestDir();
+
+        $finder = new Finder;
+        $fs = new Filesystem;
+
+        try {
+            $fs->mkdir($destDir);
+        } catch (IOException $e) {
+            $output->writeln(sprintf('<error>Could not create directory %s.</error>', $destDir));
+
+            return;
+        }
+
+        $srcDir = $this->getSrcDir();
+        if (false === file_exists($srcDir)) {
+            $output->writeln(sprintf(
+                '<error>Fonts directory "%s" does not exist. Did you install twbs/bootstrap? '.
+                'If you used something other than Compoer you need to manually change the path in '.
+                '"braincrafted_bootstrap.assets_dir".</error>',
+                $srcDir
+            ));
+
+            return;
+        }
+        $finder->files()->in($srcDir);
+
+        foreach ($finder as $file) {
+            $dest = sprintf('%s/%s', $destDir, $file->getBaseName());
+            try {
+                $fs->copy($file, $dest);
+            } catch (IOException $e) {
+                $output->writeln(sprintf('<error>Could not copy %s</error>', $file->getBaseName()));
+                return;
+            }
+        }
+
+        $output->writeln(sprintf('Copied Glyphicon fonts to <comment>%s</comment>.', $destDir));
+    }
+
+    /**
+     * @return string
+     */
+    protected function getSrcDir()
+    {
+        return sprintf('%s/fonts', $this->getContainer()->getParameter('braincrafted_bootstrap.assets_dir'));
+    }
+
+    /**
+     * @return string
+     */
+    protected function getDestDir()
+    {
+        $outputDir = $this->getContainer()->getParameter('braincrafted_bootstrap.output_dir');
+        if (strlen($outputDir) > 0 && '/' !== substr($outputDir, -1)) {
+            $outputDir .= '/';
+        }
+
+        return sprintf(
+            '%s/../web/%sfonts',
+            $this->getContainer()->getParameter('kernel.root_dir'),
+            $outputDir
+        );
+    }
+}

+ 98 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Composer/ScriptHandler.php

@@ -0,0 +1,98 @@
+<?php
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ *
+ * (c) 2013 Florian Eckerstorfer <florian@eckerstorfer.co>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\Composer;
+
+use Symfony\Component\Process\Process;
+use Symfony\Component\Process\PhpExecutableFinder;
+use Composer\Script\CommandEvent;
+
+/**
+ * ScriptHandler
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage Composer
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ *
+ * @codeCoverageIgnore
+ */
+class ScriptHandler
+{
+    /**
+     * @param CommandEvent $event
+     */
+    public static function install(CommandEvent $event)
+    {
+        $options = self::getOptions($event);
+        $appDir = $options['symfony-app-dir'];
+
+        if (!is_dir($appDir)) {
+            printf(
+                'The symfony-app-dir (%s) specified in composer.json was not found in %s, can not build bootstrap '.
+                'file.%s',
+                $appDir,
+                getcwd(),
+                PHP_EOL
+            );
+
+            return;
+        }
+
+        static::executeCommand($event, $appDir, 'braincrafted:bootstrap:install', $options['process-timeout']);
+    }
+
+    protected static function executeCommand(CommandEvent $event, $appDir, $cmd, $timeout = 300)
+    {
+        $php = escapeshellarg(self::getPhp());
+        $console = escapeshellarg($appDir.'/console');
+        if ($event->getIO()->isDecorated()) {
+            $console .= ' --ansi';
+        }
+
+        $process = new Process($php.' '.$console.' '.$cmd, null, null, null, $timeout);
+        $process->run(function ($type, $buffer) {
+            echo $buffer;
+        });
+        if (!$process->isSuccessful()) {
+            throw new \RuntimeException(
+                sprintf('An error occurred when executing the "%s" command.', escapeshellarg($cmd))
+            );
+        }
+    }
+
+    protected static function getOptions(CommandEvent $event)
+    {
+        $options = array_merge(array(
+            'symfony-app-dir' => 'app',
+            'symfony-web-dir' => 'web',
+            'symfony-assets-install' => 'hard'
+        ), $event->getComposer()->getPackage()->getExtra());
+
+        $options['symfony-assets-install'] = getenv('SYMFONY_ASSETS_INSTALL') ?: $options['symfony-assets-install'];
+
+        $options['process-timeout'] = $event->getComposer()->getConfig()->get('process-timeout');
+
+        return $options;
+    }
+
+    protected static function getPhp()
+    {
+        $phpFinder = new PhpExecutableFinder;
+        if (!$phpPath = $phpFinder->find()) {
+            throw new \RuntimeException(
+                'The php executable could not be found, add it to your PATH environment variable and try again'
+            );
+        }
+
+        return $phpPath;
+    }
+}

+ 132 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/DependencyInjection/AsseticConfiguration.php

@@ -0,0 +1,132 @@
+<?php
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ *
+ * (c) 2012-2013 by Florian Eckerstorfer
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\DependencyInjection;
+
+/**
+ * AsseticConfiguration
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage DependencyInjection
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2012-2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
+ */
+class AsseticConfiguration
+{
+    /**
+     * Builds the assetic configuration.
+     *
+     * @param array $config
+     *
+     * @return array
+     */
+    public function build(array $config)
+    {
+        $output = array();
+
+        // Fix path in output dir
+        if ('/' !== substr($config['output_dir'], -1) && strlen($config['output_dir']) > 0) {
+            $config['output_dir'] .= '/';
+        }
+
+        if ('none' !== $config['less_filter']) {
+            $output['bootstrap_css'] = $this->buildCssWithLess($config);
+        } else {
+            $output['bootstrap_css'] = $this->buildCssWithoutLess($config);
+        }
+
+        $output['bootstrap_js'] = $this->buildJs($config);
+        $output['jquery'] = $this->buildJquery($config);
+
+        return $output;
+    }
+
+    /**
+     * @param array $config
+     *
+     * @return array
+     */
+    protected function buildCssWithoutLess(array $config)
+    {
+        $inputs = array(
+            $config['assets_dir'].'/dist/css/bootstrap.css',
+        );
+
+        return array(
+            'inputs'  => $inputs,
+            'filters' => array('cssrewrite'),
+            'output'  => $config['output_dir'].'css/bootstrap.css'
+        );
+    }
+
+    /**
+     * @param array $config
+     *
+     * @return array
+     */
+    protected function buildCssWithLess(array $config)
+    {
+        $bootstrapFile = $config['assets_dir'].'/less/bootstrap.less';
+        if (true === isset($config['customize']['variables_file']) &&
+            null !== $config['customize']['variables_file']) {
+            $bootstrapFile = $config['customize']['bootstrap_output'];
+        }
+
+        $inputs = array(
+            $bootstrapFile,
+            __DIR__.'/../Resources/less/form.less'
+        );
+
+        return array(
+            'inputs'  => $inputs,
+            'filters' => array($config['less_filter']),
+            'output'  => $config['output_dir'].'css/bootstrap.css'
+        );
+    }
+
+    /**
+     * @param array $config
+     *
+     * @return array
+     */
+    protected function buildJs(array $config)
+    {
+        return array(
+            'inputs'  => array(
+                $config['assets_dir'].'/js/transition.js',
+                $config['assets_dir'].'/js/alert.js',
+                $config['assets_dir'].'/js/button.js',
+                $config['assets_dir'].'/js/carousel.js',
+                $config['assets_dir'].'/js/collapse.js',
+                $config['assets_dir'].'/js/dropdown.js',
+                $config['assets_dir'].'/js/modal.js',
+                $config['assets_dir'].'/js/tooltip.js',
+                $config['assets_dir'].'/js/popover.js',
+                $config['assets_dir'].'/js/scrollspy.js',
+                $config['assets_dir'].'/js/tab.js',
+                $config['assets_dir'].'/js/affix.js',
+                __DIR__.'/../Resources/js/bc-bootstrap-collection.js'
+            ),
+            'output'        => $config['output_dir'].'js/bootstrap.js'
+        );
+    }
+
+    /**
+     * @param array $config
+     *
+     * @return array
+     */
+    protected function buildJquery(array $config)
+    {
+        return array(
+            'inputs' => array($config['jquery_path']),
+            'output' => $config['output_dir'].'js/jquery.js'
+        );
+    }
+}

+ 179 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/DependencyInjection/BraincraftedBootstrapExtension.php

@@ -0,0 +1,179 @@
+<?php
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ *
+ * (c) 2012-2013 by Florian Eckerstorfer
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\DependencyInjection;
+
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
+use Symfony\Component\DependencyInjection\Loader;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+
+use Braincrafted\Bundle\BootstrapBundle\DependencyInjection\AsseticConfiguration;
+
+/**
+ * BraincraftedBootstrapExtension
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage DependencyInjection
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2012-2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
+ */
+class BraincraftedBootstrapExtension extends Extension implements PrependExtensionInterface
+{
+    /** @var string */
+    protected $formTemplate = 'BraincraftedBootstrapBundle:Form:bootstrap.html.twig';
+
+    /** @var string */
+    protected $menuTemplate = 'BraincraftedBootstrapBundle:Menu:bootstrap.html.twig';
+
+    /** @var string */
+    protected $paginationTemplate = 'BraincraftedBootstrapBundle:Pagination:bootstrap.html.twig';
+
+    /**
+     * {@inheritDoc}
+     */
+    public function load(array $configs, ContainerBuilder $container)
+    {
+        $configuration = new Configuration();
+        $config = $this->processConfiguration($configuration, $configs);
+
+        $loader = new Loader\XmlFileLoader(
+            $container,
+            new FileLocator(__DIR__.'/../Resources/config')
+        );
+        $loader->load('services/form.xml');
+        $loader->load('services/twig.xml');
+        $loader->load('services/session.xml');
+
+        if (true === isset($config['customize'])) {
+            $container->setParameter('braincrafted_bootstrap.customize', $config['customize']);
+        }
+        $container->setParameter('braincrafted_bootstrap.assets_dir', $config['assets_dir']);
+        $container->setParameter('braincrafted_bootstrap.output_dir', $config['output_dir']);
+        $container->setParameter('braincrafted_bootstrap.less_filter', $config['less_filter']);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function prepend(ContainerBuilder $container)
+    {
+        $bundles = $container->getParameter('kernel.bundles');
+
+        $configs = $container->getExtensionConfig($this->getAlias());
+        $config = $this->processConfiguration(new Configuration(), $configs);
+
+        // Configure Assetic if AsseticBundle is activated and the option
+        // "braincrafted_bootstrap.auto_configure.assetic" is set to TRUE (default value).
+        if (true === isset($bundles['AsseticBundle']) && true === $config['auto_configure']['assetic']) {
+            $this->configureAsseticBundle($container, $config);
+        }
+
+        // Configure Twig if TwigBundle is activated and the option
+        // "braincrafted_bootstrap.auto_configure.twig" is set to TRUE (default value).
+        if (true === isset($bundles['TwigBundle']) && true === $config['auto_configure']['twig']) {
+            $this->configureTwigBundle($container);
+        }
+
+        // Configure KnpMenu if KnpMenuBundle and TwigBundle are activated and the option
+        // "braincrafted_bootstrap.auto_configure.knp_menu" is set to TRUE (default value).
+        if (true === isset($bundles['TwigBundle']) &&
+            true === isset($bundles['KnpMenuBundle']) &&
+            true === $config['auto_configure']['knp_menu']) {
+            $this->configureKnpMenuBundle($container);
+        }
+
+        // Configure KnpPaginiator if KnpPaginatorBundle and TwigBundle are activated and the option
+        // "braincrafted_bootstrap.auto_configure.knp_paginator" is set to TRUE (default value).
+        if (true === isset($bundles['TwigBundle']) &&
+            true === isset($bundles['KnpPaginatorBundle']) &&
+            true === $config['auto_configure']['knp_paginator']) {
+            $this->configureKnpPaginatorBundle($container);
+        }
+    }
+
+    /**
+     * @param ContainerBuilder $container The service container
+     * @param array            $config    The bundle configuration
+     *
+     * @return void
+     */
+    protected function configureAsseticBundle(ContainerBuilder $container, array $config)
+    {
+        foreach (array_keys($container->getExtensions()) as $name) {
+            switch ($name) {
+                case 'assetic':
+                    $asseticConfig = new AsseticConfiguration;
+                    $container->prependExtensionConfig(
+                        $name,
+                        array('assets' => $asseticConfig->build($config))
+                    );
+                    break;
+            }
+        }
+    }
+
+    /**
+     * @param ContainerBuilder $container The service container
+     *
+     * @return void
+     */
+    protected function configureTwigBundle(ContainerBuilder $container)
+    {
+        foreach (array_keys($container->getExtensions()) as $name) {
+            switch ($name) {
+                case 'twig':
+                    $container->prependExtensionConfig(
+                        $name,
+                        array('form'  => array('resources' => array($this->formTemplate)))
+                    );
+                    break;
+            }
+        }
+    }
+
+    /**
+     * @param ContainerBuilder $container The service container
+     *
+     * @return void
+     */
+    protected function configureKnpMenuBundle(ContainerBuilder $container)
+    {
+        foreach (array_keys($container->getExtensions()) as $name) {
+            switch ($name) {
+                case 'knp_menu':
+                    $container->prependExtensionConfig(
+                        $name,
+                        array('twig' => array('template'  => $this->menuTemplate))
+                    );
+                    break;
+            }
+        }
+    }
+
+    /**
+     * @param ContainerBuilder $container The service container
+     *
+     * @return void
+     */
+    protected function configureKnpPaginatorBundle(ContainerBuilder $container)
+    {
+        foreach (array_keys($container->getExtensions()) as $name) {
+            switch ($name) {
+                case 'knp_paginator':
+                    $container->prependExtensionConfig(
+                        $name,
+                        array('template' => array('pagination' => $this->paginationTemplate))
+                    );
+                    break;
+            }
+        }
+    }
+}

+ 79 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/DependencyInjection/Configuration.php

@@ -0,0 +1,79 @@
+<?php
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ *
+ * (c) 2012-2013 by Florian Eckerstorfer
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\DependencyInjection;
+
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+use Symfony\Component\Config\Definition\ConfigurationInterface;
+
+/**
+ * Configuration
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage DependencyInjection
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2012-2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
+ */
+class Configuration implements ConfigurationInterface
+{
+    /**
+     * {@inheritDoc}
+     */
+    public function getConfigTreeBuilder()
+    {
+        return $this->buildConfigTree();
+    }
+
+    private function buildConfigTree()
+    {
+        $treeBuilder = new TreeBuilder();
+        $rootNode = $treeBuilder->root('braincrafted_bootstrap');
+
+        $rootNode
+            ->children()
+                ->scalarNode('output_dir')->defaultValue('')->end()
+                ->scalarNode('assets_dir')
+                    ->defaultValue('%kernel.root_dir%/../vendor/twbs/bootstrap')
+                ->end()
+                ->scalarNode('jquery_path')
+                    ->defaultValue('%kernel.root_dir%/../vendor/jquery/jquery/jquery-1.10.2.js')
+                ->end()
+                ->scalarNode('less_filter')
+                    ->defaultValue('less')
+                    ->validate()
+                        ->ifNotInArray(array('less', 'lessphp', 'none'))
+                        ->thenInvalid('Invalid less filter "%s"')
+                    ->end()
+                ->end()
+                ->arrayNode('customize')
+                    ->addDefaultsIfNotSet()
+                    ->children()
+                        ->scalarNode('variables_file')->end()
+                        ->scalarNode('bootstrap_output')
+                            ->defaultValue('%kernel.root_dir%/Resources/less/bootstrap.less')
+                        ->end()
+                        ->scalarNode('bootstrap_template')
+                            ->defaultValue('BraincraftedBootstrapBundle:Bootstrap:bootstrap.less.twig')
+                        ->end()
+                    ->end()
+                ->end()
+                ->arrayNode('auto_configure')
+                    ->addDefaultsIfNotSet()
+                    ->children()
+                        ->booleanNode('assetic')->defaultValue(true)->end()
+                        ->booleanNode('twig')->defaultValue(true)->end()
+                        ->booleanNode('knp_menu')->defaultValue(true)->end()
+                        ->booleanNode('knp_paginator')->defaultValue(true)->end()
+                    ->end()
+                ->end()
+            ->end();
+
+        return $treeBuilder;
+    }
+}

+ 40 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Extension/TypeSetterExtension.php

@@ -0,0 +1,40 @@
+<?php
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ * (c) 2012-2013 by Florian Eckerstorfer
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\Form\Extension;
+
+use Symfony\Component\Form\AbstractTypeExtension;
+use Symfony\Component\Form\FormView;
+use Symfony\Component\Form\FormInterface;
+
+/**
+ * TypeSetterExtension
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage Form
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2012-2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
+ */
+class TypeSetterExtension extends AbstractTypeExtension
+{
+    /**
+     * {@inheritDoc}
+     */
+    public function buildView(FormView $view, FormInterface $form, array $options)
+    {
+        $view->vars['original_type'] = $form->getConfig()->getType()->getName();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getExtendedType()
+    {
+        return "form";
+    }
+}

+ 98 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Type/BootstrapCollectionType.php

@@ -0,0 +1,98 @@
+<?php
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ * (c) 2012-2013 by Florian Eckerstorfer
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\Form\Type;
+
+use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\FormView;
+use Symfony\Component\Form\FormInterface;
+use Symfony\Component\OptionsResolver\Options;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+
+/**
+ * BootstrapCollectionType
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage Form
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2012-2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
+ */
+class BootstrapCollectionType extends AbstractType
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function buildView(FormView $view, FormInterface $form, array $options)
+    {
+        $view->vars = array_replace(
+            $view->vars,
+            array(
+                'allow_add'          => $options['allow_add'],
+                'allow_delete'       => $options['allow_delete'],
+                'add_button_text'    => $options['add_button_text'],
+                'delete_button_text' => $options['delete_button_text'],
+                'sub_widget_col'     => $options['sub_widget_col'],
+                'button_col'         => $options['button_col'],
+                'prototype_name'     => $options['prototype_name']
+            )
+        );
+
+        if (false === $view->vars['allow_delete']) {
+            $view->vars['sub_widget_col'] += $view->vars['button_col'];
+        }
+
+        if ($form->getConfig()->hasAttribute('prototype')) {
+            $view->vars['prototype'] = $form->getConfig()->getAttribute('prototype')->createView($view);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function setDefaultOptions(OptionsResolverInterface $resolver)
+    {
+        $optionsNormalizer = function (Options $options, $value) {
+            // @codeCoverageIgnoreStart
+            $value['block_name'] = 'entry';
+
+            return $value;
+            // @codeCoverageIgnoreEnd
+        };
+
+        $resolver->setDefaults(array(
+            'allow_add'          => false,
+            'allow_delete'       => false,
+            'prototype'          => true,
+            'prototype_name'     => '__name__',
+            'type'               => 'text',
+            'add_button_text'    => 'Add',
+            'delete_button_text' => 'Delete',
+            'sub_widget_col'     => 10,
+            'button_col'         => 2,
+            'options'            => array(),
+        ));
+
+        $resolver->setNormalizers(array('options' => $optionsNormalizer));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getParent()
+    {
+        return 'collection';
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getName()
+    {
+        return 'bootstrap_collection';
+    }
+}

+ 97 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Type/FormActionsType.php

@@ -0,0 +1,97 @@
+<?php
+
+namespace Braincrafted\Bundle\BootstrapBundle\Form\Type;
+
+use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Button;
+use Symfony\Component\Form\ButtonBuilder;
+use Symfony\Component\Form\FormBuilderInterface;
+use Symfony\Component\Form\FormInterface;
+use Symfony\Component\Form\FormView;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+
+/**
+ * Class FormActionsType
+ *
+ * Adds support for form actions, printing buttons in a single line, and correctly offset.
+ *
+ * @package Braincrafted\Bundle\BootstrapBundle\Form\Type
+ *
+ * @author Rafael Dohms <code@doh.ms>
+ */
+class FormActionsType extends AbstractType
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function buildForm(FormBuilderInterface $builder, array $options)
+    {
+        foreach ($options['buttons'] as $name => $config) {
+            $this->addButton($builder, $name, $config);
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     *
+     * @param FormView $view
+     * @param FormInterface $form
+     * @param array $options
+     */
+    public function buildView(FormView $view, FormInterface $form, array $options)
+    {
+        if ($form->count() == 0) {
+            return;
+        }
+
+        array_map(array($this, 'validateButton'), $form->all());
+    }
+
+    /**
+     * Adds a button
+     *
+     * @param FormBuilderInterface $builder
+     * @param $name
+     * @param $config
+     * @throws \InvalidArgumentException
+     * @return ButtonBuilder
+     */
+    protected function addButton($builder, $name, $config)
+    {
+        $options = (isset($config['options']))? $config['options'] : array();
+        $builder->add($name, $config['type'], $options);
+    }
+
+    /**
+     * Validates if child is a Button
+     *
+     * @param FormInterface $field
+     * @throws \InvalidArgumentException
+     */
+    protected function validateButton(FormInterface $field)
+    {
+        if (!$field instanceof Button) {
+            throw new \InvalidArgumentException("Children of FormActionsType must be instances of the Button class");
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setDefaultOptions(OptionsResolverInterface $resolver)
+    {
+        $resolver->setDefaults(array(
+                'buttons'        => array(),
+                'options'        => array(),
+                'mapped'         => false,
+            ));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'form_actions';
+    }
+}

+ 105 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Form/Type/MoneyType.php

@@ -0,0 +1,105 @@
+<?php
+/**
+ * This file is part of BraincraftedBootstrapBundle.
+ * (c) 2012-2013 by Florian Eckerstorfer
+ */
+
+namespace Braincrafted\Bundle\BootstrapBundle\Form\Type;
+
+use Symfony\Component\Form\Extension\Core\Type\MoneyType as BaseMoneyType;
+use Symfony\Component\Form\FormInterface;
+use Symfony\Component\Form\FormView;
+
+/**
+ * MoneyType
+ *
+ * @package    BraincraftedBootstrapBundle
+ * @subpackage Form
+ * @author     Florian Eckerstorfer <florian@eckerstorfer.co>
+ * @copyright  2012-2013 Florian Eckerstorfer
+ * @license    http://opensource.org/licenses/MIT The MIT License
+ * @link       http://bootstrap.braincrafted.com Bootstrap for Symfony2
+ */
+class MoneyType extends BaseMoneyType
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function buildView(FormView $view, FormInterface $form, array $options)
+    {
+        $view->vars['money_pattern'] = self::getPattern($options['currency']);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'money';
+    }
+
+    /**
+     * Returns the pattern for this locale
+     *
+     * The pattern contains the placeholder "{{ widget }}" where the HTML tag should
+     * be inserted
+     *
+     * @param string $currency
+     *
+     * @return string Returns the pattern
+     */
+    protected static function getPattern($currency)
+    {
+        if (!$currency) {
+            return '{{ widget }}';
+        }
+
+        $locale = \Locale::getDefault();
+
+        if (!isset(self::$patterns[$locale])) {
+            self::$patterns[$locale] = array();
+        }
+
+        if (!isset(self::$patterns[$locale][$currency])) {
+            $format = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);
+            $pattern = $format->formatCurrency('123', $currency);
+
+            // the spacings between currency symbol and number are ignored, because
+            // a single space leads to better readability in combination with input
+            // fields
+            // the regex also considers non-break spaces (0xC2 or 0xA0 in UTF-8)
+
+            preg_match(
+                '/^([^\s\xc2\xa0]*)[\s\xc2\xa0]*123(?:[,.]0+)?[\s\xc2\xa0]*([^\s\xc2\xa0]*)$/u',
+                $pattern,
+                $matches
+            );
+
+            self::$patterns[$locale][$currency] = self::parsePatternMatches($matches);
+        }
+
+        return self::$patterns[$locale][$currency];
+    }
+
+    /**
+     * Parses the given pattern matches array and returns the pattern string.
+     *
+     * @param array $matches Pattern matches
+     *
+     * @return string Pattern
+     */
+    protected static function parsePatternMatches(array $matches)
+    {
+        if (!empty($matches[1])) {
+            return '{{ tag_start }}'.$matches[1].'{{ tag_end }} {{ widget }}';
+        }
+
+        if (!empty($matches[2])) {
+            return '{{ widget }} {{ tag_start }}'.$matches[2].'{{ tag_end }}';
+        }
+
+        // @codeCoverageIgnoreStart
+        return '{{ widget }}';
+        // @codeCoverageIgnoreEnd
+    }
+}

+ 1 - 1
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/LICENSE → vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/LICENSE

@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2012 Florian Eckerstorfer
+Copyright (c) 2012-2013 Florian Eckerstorfer
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 

+ 215 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/README.md

@@ -0,0 +1,215 @@
+[BraincraftedBootstrapBundle](http://bootstrap.braincrafted.com)
+=================
+
+BraincraftedBootstrapBundle helps you integrate [Bootstrap](http://getbootstrap.com) in your [Symfony2](http://symfony.com) project.
+
+[![Build Status](https://secure.travis-ci.org/braincrafted/bootstrap-bundle.png)](http://travis-ci.org/braincrafted/bootstrap-bundle)
+[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/braincrafted/bootstrap-bundle/badges/quality-score.png?s=28e07378182fddc3cdf2c764437a72b6eaf55a45)](https://scrutinizer-ci.com/g/braincrafted/bootstrap-bundle/)
+[![Code Coverage](https://scrutinizer-ci.com/g/braincrafted/bootstrap-bundle/badges/coverage.png?s=6258b68071860a349841a0450f39e7cc6ad5da23)](https://scrutinizer-ci.com/g/braincrafted/bootstrap-bundle/)
+
+[![Latest Stable Version](https://poser.pugx.org/braincrafted/bootstrap-bundle/v/stable.png)](https://packagist.org/packages/braincrafted/bootstrap-bundle)
+[![Total Downloads](https://poser.pugx.org/braincrafted/bootstrap-bundle/downloads.png)](https://packagist.org/packages/braincrafted/bootstrap-bundle)
+
+Developed by [Florian Eckerstorfer](http://florian.ec) and many amazing [contributors](https://github.com/braincrafted/bootstrap-bundle/contributors).
+
+
+Installation
+------------
+
+First you need to add `braincrafted/bootstrap-bundle` to `composer.json`:
+
+```json
+{
+   "require": {
+        "braincrafted/bootstrap-bundle": "dev-master"
+    }
+}
+```
+
+Please note that `dev-master` points to the latest release. If you want to use the latest development version please use `dev-develop`. Of course you can also use an explicit version number, e.g., `2.0.*`.
+
+You also have to add `BraincraftedBootstrapBundle` to your `AppKernel.php`:
+
+```php
+// app/AppKernel.php
+//...
+class AppKernel extends Kernel
+{
+    //...
+    public function registerBundles()
+    {
+        $bundles = array(
+            ...
+            new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle()
+        );
+        //...
+
+        return $bundles;
+    }
+    //...
+}
+```
+Additionally you have to install Bootstrap and jQuery as dependencies and configure Assetic to compile the LESS files. You can find more information in the [Getting Started](http://bootstrap.braincrafted.com/getting-started.html) section of the documentation.
+
+
+Compatibility
+-------------
+
+This bundle has two main dependencies, Symfony and Bootstrap. The following table shows which version of BraincraftedBootstrapBundle is compatible with which version of Symfony and Bootstrap.
+
+<table>
+    <thead>
+        <tr>
+            <th>BootstrapBundle</th>
+            <th>Symfony</th>
+            <th>Bootstrap</th>
+            <th>jQuery</th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td><strong>v1.3.*</strong></td>
+            <td>v2.2.*</td>
+            <td>v2.3.*</td>
+            <td>v1.9.*</td>
+        </tr>
+        <tr>
+            <td><strong>v1.4.*</strong></td>
+            <td>v2.2.*</td>
+            <td>v2.3.*</td>
+            <td>v1.9.*</td>
+        </tr>
+        <tr>
+            <td><strong>v1.5.*</strong></td>
+            <td>v2.2.*</td>
+            <td>v2.3.*</td>
+            <td>v1.9.*</td>
+        </tr>
+        <tr>
+            <td><strong>v2.0.*</strong></td>
+            <td>v2.3.*<br>v2.4.*</td>
+            <td>v3.0.*<br>v3.1.*</td>
+            <td>v1.10.*<br>v1.11.*</td>
+        </tr>
+    </tbody>
+</table>
+
+
+Changelog
+---------
+
+### Version 2.0.1 (3 April 2014)
+
+- #168 Removed CSS class `row` from form-group
+- #182 Added support for form actions (row with multiple buttons) (by [rdohms](https://github.com/rdohms))
+- #187 Made default button class changable (by [sandello-alkr](https://github.com/sandello-alkr))
+- #188 Added icons to form buttons (by [mvrhov](https://github.com/mvrhov))
+- #190 Added support for stacked tabs (by [aur1mas](https://github.com/aur1mas))
+- #192 Added method to reset flash bag (by [JulienRamel](https://github.com/JulienRamel))
+- #196 Removed CSS class `nav` from child elements (by [dylanschoenmakers](https://github.com/dylanschoenmakers))
+- #198 Added parsing of icons in prepend and append input groups (by [yvh](https://github.com/yvh))
+- Fixed `file` form type (by [hsz](https://github.com/hsz))
+
+### Version 2.0.0-alpha1
+
+- Updated to Symfony v2.3.6
+- Updated to Bootstrap v3.0.1
+- Updated to jQuery v1.10.2
+- Remove `include_responsive` option because Bootstrap 3.0 no longer has a non responsive version
+- Added `boostrap_money` form type that uses Bootstraps prepend or append style to display the currency
+- `percent` form type uses Bootstraps append style to display the percent sign
+- Changed namespace back to `Braincrafted\Bundle\BootstrapBundle`
+- Support for custom `variables.less`
+- Several Twig filters are now functions
+- Added `bootstrap_set_style` and `bootstrap_get_style` Twig functions to globally set the style of forms
+- Added command to generate custom `bootstrap.less` file
+- Added command to copy icon fonts into `web/` directory
+- Added Composer script handler for copying icon fonts
+- Pagination now supports disabled links
+- Added Twig function `badge`
+- Removed Twig filters `badge_*` (Bootstrap v3.0 does not include multiply badge styles)
+- Twig filters `label_*` are now Twig functions
+- Twig filter `icon` is now a Twig function
+- Added `braincrafted_collection` form type
+
+#### Version 2.0.0-alpha2
+
+- Fixed compatibility with PHP 5.3 (Fixes [#111](https://github.com/braincrafted/bootstrap-bundle/issues/111))
+- Renamed `braincrafted_collection` to `bootstrap_collection`
+- `widget_col`, `label_col` and `simple_col` can be defined in form builder (Fixes [#113](https://github.com/braincrafted/bootstrap-bundle/issues/113))
+- Add support for input groups
+- Fix bug with inline forms when no placeholder is defined
+
+#### Version 2.0.0-alpha3
+
+- Fixed configuration of input groups in form builder (Fixes [#115](https://github.com/braincrafted/bootstrap-bundle/issues/115))
+- Fixed trailing slash in `braincrafted_bootstrap.output_dir` option
+- Fixed undefined variable in pagination template
+- Better tested
+
+#### Version 2.0.0-beta1
+
+- Fixed duplicate `div.form-group` in `choice_widget_expanded` (Fixes [#131](https://github.com/braincrafted/bootstrap-bundle/issues/131))
+- Use correct assets when not using LESS (Fixes [#128](https://github.com/braincrafted/bootstrap-bundle/issues/128)) [[amcgowanca](https://github.com/amcgowanca)]
+- Add `col_size` option to set the column size for form widgets (Fixes [#127](https://github.com/braincrafted/bootstrap-bundle/issues/127))
+- Add support for `simple_col` options in `textarea_widget`
+- Renamed views
+- Add error messages in `checkbox_row` and `radio_widget` (Fixes [#118](https://github.com/braincrafted/bootstrap-bundle/issues/118))
+
+#### Version 2.0.0-beta2 (9 December 2013)
+
+- #133: Fix `label_col`, `widget_col`, `col_size` and `simple_col` options in collection widgets
+- #136: Added translation to `bootstrap_collection` widget
+- #137: Removed `cssrewrite` filter from default Assetic configuration
+- #139: Fix JavaScript for nested `bootstrap_collection` widgets (by [wizart](https://github.com/wizart))
+- #140: Improved dependency list in `composer.json` (by [hason](https://github.com/hason))
+- #142: Added translation for help block and error messages
+- #143: Added translation to flash message template (by [rdohms](https://github.com/rdohms))
+- #144: Fix class attribute for checkbox widget (by [squaye85](https://github.com/squaye85))
+- #145: Added possibility to style global error messages
+- Renamed `customize_variables` configuration option into `customize`
+
+#### Version 2.0.0-stable (2 January 2014)
+
+- #152: Add form name attribute (by [nonlux](https://github.com/nonlux))
+- #154: Fix Bootstrap Collection form type for nested types
+- #155: Use `braincrafted_bootstrap.output_dir` option when installing icon font
+- #52: Add class option for pagination
+- #148: Add `label_col` and `widget_col` option for the whole form (by [florianeckerstorfer](https://github.com/florianeckerstorfer) and [dirkluijk](https://github.com/dirkluijk))
+- #156: Add support for error messages with parameters (by [thanosp](https://github.com/thanosp))
+- #157: Use print shiv instead of standard shiv (by [mvrhov](https://github.com/mvrhov))
+- #161: Set `style` option in FormBuilder
+- #162: Set depth of navigation.
+
+### Version 1.5.0
+
+- Works with new Bootstrap repository `twbs/bootstrap`
+- Basic support for Bootstrap v3.0
+- Allow override options in menus
+- Extend from base form layout
+- Fixed problems with removing elemnts in JavaScript collection form type
+- Various other bugfixes
+
+### Version 1.4.0
+
+- Changed namespace to `Bc\Bundle\BootstrapBundle`
+- Automatically configure Twig
+- Automatically configure KnpMenuBundle
+- Automatically configure KnpPaginatorBundle
+- Automatically configure Assetic
+- Improved layout of error messages in compound fields
+- Improved code style (usage of PHP_CodeSniffer and PHPMD)
+- Support for `data-prototype` option in collection fields
+- Helper and template for flash messages
+
+### Version 1.2.0
+
+- Added support for Assetic
+
+
+License
+-------
+
+- The bundle is licensed under the [MIT License](http://opensource.org/licenses/MIT)
+- The CSS and Javascript from the Twitter Bootstrap are licensed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)
+

+ 32 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/config/services/form.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<container xmlns="http://symfony.com/schema/dic/services"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
+
+    <parameters>
+        <parameter key="braincrafted_bootstrap.form.type.collection.class">Braincrafted\Bundle\BootstrapBundle\Form\Type\BootstrapCollectionType</parameter>
+        <parameter key="braincrafted_bootstrap.form.type.money.class">Braincrafted\Bundle\BootstrapBundle\Form\Type\MoneyType</parameter>
+        <parameter key="braincrafted_bootstrap.form.type.form_actions.class">Braincrafted\Bundle\BootstrapBundle\Form\Type\FormActionsType</parameter>
+        <parameter key="braincrafted_bootstrap.form.extension.typesetter_extension.class">Braincrafted\Bundle\BootstrapBundle\Form\Extension\TypeSetterExtension</parameter>
+    </parameters>
+
+    <services>
+
+        <service id="braincrafted_bootstrap.form.type.collection" class="%braincrafted_bootstrap.form.type.collection.class%">
+            <tag name="form.type" alias="bootstrap_collection" />
+        </service>
+
+        <service id="braincrafted_bootstrap.form.type.money" class="%braincrafted_bootstrap.form.type.money.class%">
+            <tag name="form.type" alias="money" />
+        </service>
+
+        <service id="braincrafted_bootstrap.form.type.form_actions" class="%braincrafted_bootstrap.form.type.form_actions.class%">
+            <tag name="form.type" alias="form_actions" />
+        </service>
+
+        <service id="braincrafted_bootstrap.form.extension.typesetter_extension" class="%braincrafted_bootstrap.form.extension.typesetter_extension.class%">
+            <tag name="form.type_extension" alias="form" />
+        </service>
+
+    </services>
+</container>

+ 17 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/config/services/session.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<container xmlns="http://symfony.com/schema/dic/services"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
+
+    <parameters>
+        <parameter key="braincrafted_bootstrap.flash.class">Braincrafted\Bundle\BootstrapBundle\Session\FlashMessage</parameter>
+    </parameters>
+
+    <services>
+
+        <service id="braincrafted_bootstrap.flash" class="%braincrafted_bootstrap.flash.class%">
+            <argument type="service" id="session" />
+        </service>
+
+    </services>
+</container>

+ 32 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/config/services/twig.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<container xmlns="http://symfony.com/schema/dic/services"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
+
+    <parameters>
+        <parameter key="braincrafted_bootstrap.twig.icon_extension.class">Braincrafted\Bundle\BootstrapBundle\Twig\BootstrapIconExtension</parameter>
+        <parameter key="braincrafted_bootstrap.twig.label_extension.class">Braincrafted\Bundle\BootstrapBundle\Twig\BootstrapLabelExtension</parameter>
+        <parameter key="braincrafted_bootstrap.twig.badge_extension.class">Braincrafted\Bundle\BootstrapBundle\Twig\BootstrapBadgeExtension</parameter>
+        <parameter key="braincrafted_bootstrap.twig.form_extension.class">Braincrafted\Bundle\BootstrapBundle\Twig\BootstrapFormExtension</parameter>
+    </parameters>
+
+    <services>
+
+        <service id="braincrafted_bootstrap.twig.icon_extension" class="%braincrafted_bootstrap.twig.icon_extension.class%">
+            <tag name="twig.extension" />
+        </service>
+
+        <service id="braincrafted_bootstrap.twig.label_extension" class="%braincrafted_bootstrap.twig.label_extension.class%">
+            <tag name="twig.extension" />
+        </service>
+
+        <service id="braincrafted_bootstrap.twig.badge_extension" class="%braincrafted_bootstrap.twig.badge_extension.class%">
+            <tag name="twig.extension" />
+        </service>
+
+        <service id="braincrafted_bootstrap.twig.form_extension" class="%braincrafted_bootstrap.twig.form_extension.class%">
+            <tag name="twig.extension" />
+        </service>
+
+    </services>
+</container>

+ 123 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/js/bc-bootstrap-collection.js

@@ -0,0 +1,123 @@
+/* ==========================================================
+ * bc-bootstrap-collection.js
+ * http://bootstrap.braincrafted.com
+ * ==========================================================
+ * Copyright 2013 Florian Eckerstorfer
+ *
+ * ========================================================== */
+
+
+!function ($) {
+
+    "use strict"; // jshint ;_;
+
+    /* COLLECTION CLASS DEFINITION
+     * ====================== */
+
+    var addField = '[data-addfield="collection"]',
+        removeField = '[data-removefield="collection"]',
+        CollectionAdd = function (el) {
+            $(el).on('click', addField, this.addField);
+        },
+        CollectionRemove = function (el) {
+            $(el).on('click', removeField, this.removeField);
+        }
+    ;
+
+    CollectionAdd.prototype.addField = function (e) {
+        var $this = $(this),
+            selector = $this.attr('data-collection'),
+            prototypeName = $this.attr('data-prototype-name')
+        ;
+
+        e && e.preventDefault();
+
+        var collection = $('#'+selector),
+            list = collection.find('> ul'),
+            count = list.find('li').size()
+        ;
+
+        var newWidget = collection.attr('data-prototype');
+
+        // Check if an element with this ID already exists.
+        // If it does, increase the count by one and try again
+        var newName = newWidget.match(/id="(.*?)"/);
+        var re = new RegExp(prototypeName, "g");
+        while ($('#' + newName[1].replace(re, count)).size() > 0) {
+            count++;
+        }
+        newWidget = newWidget.replace(re, count);
+        newWidget = newWidget.replace(/__id__/g, newName[1].replace(re, count));
+        var newLi = $('<li></li>').html(newWidget);
+        newLi.appendTo(list);
+    };
+
+    CollectionRemove.prototype.removeField = function (e) {
+        var $this = $(this),
+            selector = $this.attr('data-field')
+        ;
+
+        e && e.preventDefault();
+
+        var listElement = $this.closest('li').remove();
+    }
+
+
+    /* COLLECTION PLUGIN DEFINITION
+     * ======================= */
+
+    var oldAdd = $.fn.addField;
+    var oldRemove = $.fn.removeField;
+
+    $.fn.addField = function (option) {
+        return this.each(function () {
+            var $this = $(this),
+                data = $this.data('addfield')
+            ;
+            if (!data) {
+                $this.data('addfield', (data = new CollectionAdd(this)));
+            }
+            if (typeof option == 'string') {
+                data[option].call($this);
+            }
+        });
+    };
+
+    $.fn.removeField = function (option) {
+        return this.each(function() {
+            var $this = $(this),
+                data = $this.data('removefield')
+            ;
+            if (!data) {
+                $this.data('removefield', (data = new CollectionRemove(this)));
+            }
+            if (typeof option == 'string') {
+                data[option].call($this);
+            }
+        });
+    };
+
+    $.fn.addField.Constructor = CollectionAdd;
+    $.fn.removeField.Constructor = CollectionRemove;
+
+
+    /* COLLECTION NO CONFLICT
+     * ================= */
+
+    $.fn.addField.noConflict = function () {
+        $.fn.addField = oldAdd;
+        return this;
+    }
+    $.fn.removeField.noConflict = function () {
+        $.fn.removeField = oldRemove;
+        return this;
+    }
+
+
+    /* COLLECTION DATA-API
+     * ============== */
+
+    $(document).on('click.addfield.data-api', addField, CollectionAdd.prototype.addField);
+    $(document).on('click.removefield.data-api', removeField, CollectionRemove.prototype.removeField);
+
+ }(window.jQuery);

+ 70 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/less/form.less

@@ -0,0 +1,70 @@
+/**
+ * Additional styles for BraincraftedBootstrapBundle
+ * (c) 2013 Florian Eckerstorfer (http://braincrafted.com)
+ * http://bootstrap.braincrafted.com
+ */
+
+.bootstrap-time {
+    width: 100%;
+    select {
+        display: inline-block;
+        width: auto;
+    }
+}
+
+.bootstrap-date {
+    width: 100%;
+    select {
+        display: inline-block;
+        width: auto;
+        margin-right: 5px;
+    }
+}
+
+.bootstrap-datetime {
+    .bootstrap-time,
+    .bootstrap-date {
+        display: inline-block;
+        width: auto;
+    }
+}
+
+.form-group {
+    .bc-collection {
+        li + li {
+            margin-top: 10px;
+        }
+    }
+}
+
+.form-inline {
+    .form-group {
+        margin-left: 0;
+        margin-right: 0;
+    }
+}
+
+.form-horizontal {
+    .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg12 {
+        .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
+        .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+            padding-left: 0;
+        }
+    }
+}
+
+
+form {
+    .has-error {
+        ul.help-block {
+            list-style: none;
+            padding-left: 0;
+        }
+    }
+    .alert {
+        ul {
+            list-style: none;
+            padding-left: 0;
+        }
+    }
+}

+ 59 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Bootstrap/bootstrap.less.twig

@@ -0,0 +1,59 @@
+/*!
+ * Bootstrap v3.0.0
+ *
+ * Copyright 2013 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world by @mdo and @fat.
+ */
+
+// Core variables and mixins
+@import "{{ variables_file }}";
+@import "{{ assets_dir }}less/mixins.less";
+
+// Reset
+@import "{{ assets_dir }}less/normalize.less";
+@import "{{ assets_dir }}less/print.less";
+
+// Core CSS
+@import "{{ assets_dir }}less/scaffolding.less";
+@import "{{ assets_dir }}less/type.less";
+@import "{{ assets_dir }}less/code.less";
+@import "{{ assets_dir }}less/grid.less";
+@import "{{ assets_dir }}less/tables.less";
+@import "{{ assets_dir }}less/forms.less";
+@import "{{ assets_dir }}less/buttons.less";
+
+// Components
+@import "{{ assets_dir }}less/component-animations.less";
+@import "{{ assets_dir }}less/glyphicons.less";
+@import "{{ assets_dir }}less/dropdowns.less";
+@import "{{ assets_dir }}less/button-groups.less";
+@import "{{ assets_dir }}less/input-groups.less";
+@import "{{ assets_dir }}less/navs.less";
+@import "{{ assets_dir }}less/navbar.less";
+@import "{{ assets_dir }}less/breadcrumbs.less";
+@import "{{ assets_dir }}less/pagination.less";
+@import "{{ assets_dir }}less/pager.less";
+@import "{{ assets_dir }}less/labels.less";
+@import "{{ assets_dir }}less/badges.less";
+@import "{{ assets_dir }}less/jumbotron.less";
+@import "{{ assets_dir }}less/thumbnails.less";
+@import "{{ assets_dir }}less/alerts.less";
+@import "{{ assets_dir }}less/progress-bars.less";
+@import "{{ assets_dir }}less/media.less";
+@import "{{ assets_dir }}less/list-group.less";
+@import "{{ assets_dir }}less/panels.less";
+@import "{{ assets_dir }}less/wells.less";
+@import "{{ assets_dir }}less/close.less";
+
+// Components w/ JavaScript
+@import "{{ assets_dir }}less/modals.less";
+@import "{{ assets_dir }}less/tooltip.less";
+@import "{{ assets_dir }}less/popovers.less";
+@import "{{ assets_dir }}less/carousel.less";
+
+// Utility classes
+@import "{{ assets_dir }}less/utilities.less";
+@import "{{ assets_dir }}less/responsive-utilities.less";

+ 864 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Form/bootstrap.html.twig

@@ -0,0 +1,864 @@
+{% use "form_div_layout.html.twig" %}
+
+{# Widgets #}
+
+{% block form_widget %}
+{% spaceless %}
+    {% if compound %}
+        {{ block('form_widget_compound') }}
+    {% else %}
+        {{ block('form_widget_simple') }}
+    {% endif %}
+{% endspaceless %}
+{% endblock form_widget %}
+
+{% block form_widget_simple %}
+{% spaceless %}
+    {% set style = style|default(bootstrap_get_style()) %}
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if simple_col is not defined and bootstrap_get_simple_col() %}
+        {% set simple_col = bootstrap_get_simple_col() %}
+    {% endif %}
+    {% if attr.simple_col is defined and attr.simple_col is not empty %}
+        {% set simple_col = attr.simple_col %}
+    {% endif  %}
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+    {% if attr.style is defined and attr.style is not empty %}
+        {% set style = attr.style %}
+    {% endif %}
+
+    {% if simple_col is defined and simple_col %}
+        <div class="col-{{ col_size }}-{{ simple_col }}">
+    {% endif %}
+
+    {% set type = type|default('text') %}
+    {% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' form-control')|trim }) %}
+
+    {% if style == 'inline' and (attr.placeholder is not defined or attr.placeholder is empty) %}
+        {% if label is empty %}
+            {% set attr = attr|merge({ 'placeholder': name|humanize }) %}
+        {% else %}
+            {% set attr = attr|merge({ 'placeholder': label}) %}
+        {% endif %}
+    {% endif %}
+
+    <input type="{{ type }}" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}>
+
+    {% if simple_col is defined %}
+        </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock form_widget_simple %}
+
+{% block form_widget_compound %}
+{% spaceless %}
+    <div {{ block('widget_container_attributes') }}>
+        {% if form.parent is empty %}
+            {{ block('global_form_errors') }}
+        {% endif %}
+        {{ block('form_rows') }}
+        {{ form_rest(form) }}
+    </div>
+{% endspaceless %}
+{% endblock form_widget_compound %}
+
+{% block collection_widget %}
+{% spaceless %}
+    {% if prototype is defined %}
+        {% set attr = attr|merge({'data-prototype': form_row(prototype) }) %}
+    {% endif %}
+    {{ block('form_widget') }}
+{% endspaceless %}
+{% endblock collection_widget %}
+
+{% block bootstrap_collection_widget %}
+{% spaceless %}
+    {% if prototype is defined %}
+        {% set prototype_vars = {} %}
+        {% if style is defined %}
+            {% set prototype_vars = prototype_vars|merge({'style': style}) %}
+        {% endif %}
+        {% set prototype_html = '<div class="col-xs-' ~ form.vars.sub_widget_col ~ '">' ~ form_widget(prototype, prototype_vars) ~ '</div>' %}
+        {% if form.vars.allow_delete %}
+            {% set prototype_html = prototype_html ~ '<div class="col-xs-' ~ form.vars.button_col ~ '"><a href="#" class="btn btn-danger btn-small" data-removefield="collection" data-field="__id__">' ~ form.vars.delete_button_text|trans({}, translation_domain) ~ '</a></div>' %}
+        {% endif %}
+        {% set prototype_html = '<div class="row">' ~ prototype_html ~ '</div>' %}
+
+        {% set attr = attr|merge({'data-prototype': prototype_html }) %}
+        {% set attr = attr|merge({'data-prototype-name': prototype_name }) %}
+    {% endif %}
+    <div {{ block('widget_container_attributes') }}>
+        <ul class="bc-collection list-unstyled">
+            {% for field in form %}
+                <li>
+                    <div class="row">
+                        <div class="col-xs-{{ form.vars.sub_widget_col }}">
+                            {{ form_widget(field) }}
+                            {{ form_errors(field) }}
+                        </div>
+                        {% if form.vars.allow_delete %}
+                            <div class="col-xs-{{ form.vars.button_col }}">
+                                <a href="#" class="btn btn-danger btn-small" data-removefield="collection" data-field="{{ field.vars.id }}">{{ form.vars.delete_button_text|trans({}, translation_domain) }}</a>
+                            </div>
+                        {% endif %}
+                    </div>
+                </li>
+            {% endfor %}
+        </ul>
+        {% if form.vars.allow_add %}
+            <a href="#" class="btn btn-primary btn-small" data-addfield="collection" data-collection="{{ form.vars.id }}" data-prototype-name="{{ prototype_name }}">{{ form.vars.add_button_text|trans({}, translation_domain) }}</a>
+        {% endif %}
+    </div>
+{% endspaceless %}
+{% endblock bootstrap_collection_widget %}
+
+{% block textarea_widget %}
+{% spaceless %}
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if attr.simple_col is defined and attr.simple_col is not empty %}
+        {% set simple_col = attr.simple_col %}
+    {% endif  %}
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+
+    {% if simple_col is defined %}
+        <div class="col-{{ col_size }}-{{ simple_col }}">
+    {% endif %}
+
+    {% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' form-control')|trim }) %}
+
+    <textarea {{ block('widget_attributes') }}>{{ value }}</textarea>
+
+    {% if simple_col is defined %}
+        </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock textarea_widget %}
+
+{% block file_widget %}
+{% spaceless %}
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if attr.simple_col is defined and attr.simple_col is not empty %}
+        {% set simple_col = attr.simple_col %}
+    {% endif  %}
+
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+
+    {% if simple_col is defined %}
+        <div class="col-{{ col_size }}-{{ simple_col }}">
+    {% endif %}
+
+    <input type="file" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}>
+
+    {% if simple_col is defined %}
+        </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock file_widget %}
+
+{% block choice_widget %}
+{% spaceless %}
+    {% if expanded %}
+        {{ block('choice_widget_expanded') }}
+    {% else %}
+        {{ block('choice_widget_collapsed') }}
+    {% endif %}
+{% endspaceless %}
+{% endblock choice_widget %}
+
+{% block choice_widget_expanded %}
+{% spaceless %}
+    <div {{ block('widget_container_attributes') }}>
+    {% for child in form %}
+        {% if form.multiple is defined %}
+            {{ checkbox_row(child, { 'no_form_group': true }) }}
+        {% else %}
+            {{ radio_row(child, { 'no_form_group': true }) }}
+        {% endif %}
+    {% endfor %}
+    </div>
+{% endspaceless %}
+{% endblock choice_widget_expanded %}
+
+{% block choice_widget_collapsed %}
+{% spaceless %}
+    {% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' form-control')|trim }) %}
+
+    <select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
+        {% if empty_value is not none %}
+            <option {% if required %} disabled="disabled"{% if value is empty %} selected="selected"{% endif %}{% else %} value=""{% endif %}>{{ empty_value|trans({}, translation_domain) }}</option>
+        {% endif %}
+        {% if preferred_choices|length > 0 %}
+            {% set options = preferred_choices %}
+            {{ block('choice_widget_options') }}
+            {% if choices|length > 0 and separator is not none %}
+                <option disabled="disabled">{{ separator }}</option>
+            {% endif %}
+        {% endif %}
+        {% set options = choices %}
+        {{ block('choice_widget_options') }}
+    </select>
+{% endspaceless %}
+{% endblock choice_widget_collapsed %}
+
+{% block choice_widget_options %}
+{% spaceless %}
+    {% for group_label, choice in options %}
+        {% if choice is iterable %}
+            <optgroup label="{{ group_label|trans({}, translation_domain) }}">
+                {% set options = choice %}
+                {{ block('choice_widget_options') }}
+            </optgroup>
+        {% else %}
+            <option value="{{ choice.value }}"{% if choice is selectedchoice(value) %} selected="selected"{% endif %}>{{ choice.label|trans({}, translation_domain) }}</option>
+        {% endif %}
+    {% endfor %}
+{% endspaceless %}
+{% endblock choice_widget_options %}
+
+{% block checkbox_row %}
+{% spaceless %}
+    {% set style = style|default(bootstrap_get_style()) %}
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if attr.label_col is defined and attr.label_col is not empty %}
+        {% set label_col = attr.label_col %}
+    {% endif %}
+    {% if attr.widget_col is defined and attr.widget_col is not empty %}
+        {% set widget_col = attr.widget_col %}
+    {% endif %}
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+    {% if attr.style is defined and attr.style is not empty %}
+        {% set style = attr.style %}
+    {% endif %}
+
+    {% set class = '' %}
+    {% if align_with_widget is defined or attr.align_with_widget is defined %}
+        {% set widget_col = widget_col|default(bootstrap_get_widget_col()) %}
+        {% set label_col = label_col|default(bootstrap_get_label_col()) %}
+        {% set class = 'col-' ~ col_size ~ '-' ~ widget_col ~ ' col-' ~ col_size ~ '-offset-' ~ label_col %}
+        <div class="form-group {% if not form.vars.valid %} has-error{% endif %}">
+            <div class="{{ class }}">
+    {% elseif no_form_group is not defined or no_form_group == false %}
+        <div class="form-group{% if not form.vars.valid %} has-error{% endif %}">
+    {% endif %}
+        <div class="checkbox">
+            {% if label is not sameas(false) %}
+                {% if not compound %}
+                    {% set label_attr = label_attr|merge({'for': id}) %}
+                {% endif %}
+                {% if required %}
+                    {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
+                {% endif %}
+                {% if label is empty %}
+                    {% set label = name|humanize %}
+                {% endif %}
+                <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
+                    {{ block('checkbox_widget') }}
+                    {{ label|trans({}, translation_domain) }}
+                </label>
+            {% else %}
+                {{ block('checkbox_widget') }}
+            {% endif %}
+            {{ form_errors(form) }}
+        </div>
+    {% if align_with_widget is defined or attr.align_with_widget is defined %}
+        </div>
+        </div>
+    {% elseif no_form_group is not defined or no_form_group == false %}
+        </div>
+    {% endif %}
+
+    {% if style == 'inline' %}&nbsp;{% endif %}
+{% endspaceless %}
+{% endblock checkbox_row %}
+
+{% block radio_row %}
+{% spaceless %}
+    {% set class = '' %}
+
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if attr.label_col is defined and attr.label_col is not empty %}
+        {% set label_col = attr.label_col %}
+    {% endif %}
+    {% if attr.widget_col is defined and attr.widget_col is not empty %}
+        {% set widget_col = attr.widget_col %}
+    {% endif %}
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+
+    {% if align_with_widget is defined or attr.align_with_widget is defined %}
+        {% set widget_col = widget_col|default(bootstrap_get_widget_col()) %}
+        {% set label_col = label_col|default(bootstrap_get_label_col()) %}
+        {% set class = ' col-'~ col_size ~ '-' ~ widget_col ~ ' col-' ~ col_size ~ '-offset-' ~ label_col %}
+        <div class="form-group {% if not form.vars.valid %} has-error{% endif %}">
+            <div class="{{ class }}">
+    {% elseif no_form_group is not defined or no_form_group == false %}
+        <div class="form-group{% if not form.vars.valid %} has-error{% endif %}">
+    {% endif %}
+
+        <div class="radio">
+            {% if label is not sameas(false) %}
+                {% if not compound %}
+                    {% set label_attr = label_attr|merge({'for': id}) %}
+                {% endif %}
+                {% if required %}
+                    {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
+                {% endif %}
+                {% if label is empty %}
+                    {% set label = name|humanize %}
+                {% endif %}
+                <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
+                    {{ block('radio_widget') }}
+                    {{ label|trans({}, translation_domain) }}
+                </label>
+            {% else %}
+                {{ block('radio_widget') }}
+            {% endif %}
+            {{ form_errors(form) }}
+        </div>
+    {% if align_with_widget is defined or attr.align_with_widget is defined %}
+        </div>
+        </div>
+    {% elseif no_form_group is not defined or no_form_group == false %}
+        </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock radio_row %}
+
+{% block checkbox_widget %}
+{% spaceless %}
+    <input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
+{% endspaceless %}
+{% endblock checkbox_widget %}
+
+{% block radio_widget %}
+{% spaceless %}
+    <input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
+{% endspaceless %}
+{% endblock radio_widget %}
+
+{% block datetime_widget %}
+{% spaceless %}
+    {% if widget == 'single_text' %}
+        {{ block('form_widget_simple') }}
+    {% else %}
+        {% set attr = attr|merge({ 'class': 'bootstrap-datetime' }) %}
+        <div {{ block('widget_container_attributes') }}>
+            {{ form_widget(form.date) }}
+            {{ form_widget(form.time) }}
+            {{ form_errors(form.date) }}
+            {{ form_errors(form.time) }}
+        </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock datetime_widget %}
+
+{% block date_widget %}
+{% spaceless %}
+    {% if widget == 'single_text' %}
+        {{ block('form_widget_simple') }}
+    {% else %}
+        {% set attr = attr|merge({ 'class': 'bootstrap-date' }) %}
+        <div {{ block('widget_container_attributes') }}>
+            {{ date_pattern|replace({
+                '{{ year }}':  form_widget(form.year),
+                '{{ month }}': form_widget(form.month),
+                '{{ day }}':   form_widget(form.day),
+            })|raw }}
+        </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock date_widget %}
+
+{% block time_widget %}
+{% spaceless %}
+    {% if widget == 'single_text' %}
+        {{ block('form_widget_simple') }}
+    {% else %}
+        {% set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} %}
+        {% set attr = attr|merge({ 'class': 'bootstrap-time' }) %}
+        <div {{ block('widget_container_attributes') }}>
+            {{ form_widget(form.hour, vars) }}
+            {% if with_minutes %}:{{ form_widget(form.minute, vars) }}{% endif %}
+            {% if with_seconds %}:{{ form_widget(form.second, vars) }}{% endif %}
+        </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock time_widget %}
+
+{% block number_widget %}
+{% spaceless %}
+    {# type="number" doesn't work with floats #}
+    {% set type = type|default('text') %}
+    {{ block('form_widget_simple') }}
+{% endspaceless %}
+{% endblock number_widget %}
+
+{% block integer_widget %}
+{% spaceless %}
+    {% set type = type|default('number') %}
+    {{ block('form_widget_simple') }}
+{% endspaceless %}
+{% endblock integer_widget %}
+
+{% block money_widget %}
+{% spaceless %}
+    <div class="input-group">
+        {{ money_pattern|replace({
+            '{{ widget }}': block('form_widget_simple'),
+            '{{ tag_start }}': '<span class="input-group-addon">',
+            '{{ tag_end }}': '</span>'
+        })|raw }}
+    </div>
+{% endspaceless %}
+{% endblock money_widget %}
+
+{% block url_widget %}
+{% spaceless %}
+    {% set type = type|default('url') %}
+    {{ block('form_widget_simple') }}
+{% endspaceless %}
+{% endblock url_widget %}
+
+{% block search_widget %}
+{% spaceless %}
+    {% set type = type|default('search') %}
+    {{ block('form_widget_simple') }}
+{% endspaceless %}
+{% endblock search_widget %}
+
+{% block percent_widget %}
+{% spaceless %}
+    {% set type = type|default('text') %}
+    <div class="input-group">
+        {{ block('form_widget_simple') }}
+        <span class="input-group-addon">%</span>
+    </div>
+{% endspaceless %}
+{% endblock percent_widget %}
+
+{% block password_widget %}
+{% spaceless %}
+    {% set type = type|default('password') %}
+    {{ block('form_widget_simple') }}
+{% endspaceless %}
+{% endblock password_widget %}
+
+{% block hidden_widget %}
+{% spaceless %}
+    {% set type = type|default('hidden') %}
+    {{ block('form_widget_simple') }}
+{% endspaceless %}
+{% endblock hidden_widget %}
+
+{% block email_widget %}
+{% spaceless %}
+    {% set type = type|default('email') %}
+    {{ block('form_widget_simple') }}
+{% endspaceless %}
+{% endblock email_widget %}
+
+{% block button_widget %}
+{% spaceless %}
+    {% if label is empty %}
+        {% set label = name|humanize %}
+    {% endif %}
+    {% if type is defined and type == 'submit' %}
+        {% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' btn btn-'~attr.type|default('primary'))|trim }) %}
+    {% else %}
+        {% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' btn btn-'~attr.type|default('default'))|trim }) %}
+    {% endif %}
+    <button type="{{ type|default('button') }}" {{ block('button_attributes') }}>{% if attr.icon is defined and attr.icon != '' %}{{ icon(attr.icon) }}{% endif %}{{ label|trans({}, translation_domain) }}</button>
+{% endspaceless %}
+{% endblock button_widget %}
+
+{% block submit_widget %}
+{% spaceless %}
+    {% set type = type|default('submit') %}
+    {{ block('button_widget') }}
+{% endspaceless %}
+{% endblock submit_widget %}
+
+{% block reset_widget %}
+{% spaceless %}
+    {% set type = type|default('reset') %}
+    {{ block('button_widget') }}
+{% endspaceless %}
+{% endblock reset_widget %}
+
+{% block form_actions_widget %}
+    {% for button in form.children %}
+        {{ form_widget(button) }}&nbsp; {# this needs to be here due to https://github.com/twbs/bootstrap/issues/3245 #}
+    {% endfor  %}
+{% endblock %}
+
+{# Labels #}
+
+{% block form_label %}
+{% spaceless %}
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if attr.label_col is defined and attr.label_col is not empty %}
+        {% set label_col = attr.label_col %}
+    {% endif %}
+    {% if attr.widget_col is defined and attr.widget_col is not empty %}
+        {% set widget_col = attr.widget_col %}
+    {% endif %}
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+
+    {% if label is not sameas(false) %}
+        {% set style = style|default(bootstrap_get_style()) %}
+        {% set label_col = label_col|default(bootstrap_get_label_col()) %}
+
+        {% if attr.style is defined and attr.style is not empty %}
+            {% set style = attr.style %}
+        {% endif %}
+
+        {% set label_attr = label_attr|merge({ 'class': (label_attr.class|default('') ~ ' control-label')|trim }) %}
+        {% if style == 'horizontal' %}
+            {% set label_attr = label_attr|merge({ 'class': (label_attr.class|default('') ~ ' col-' ~ col_size ~ '-' ~ label_col)|trim }) %}
+        {% elseif style == 'inline' %}
+            {% set label_attr = label_attr|merge({ 'class': (label_attr.class|default('') ~ ' sr-only')|trim }) %}
+        {% endif %}
+
+        {% if not compound %}
+            {% set label_attr = label_attr|merge({'for': id}) %}
+        {% endif %}
+        {% if required %}
+            {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
+        {% endif %}
+        {% if label is empty %}
+            {% set label = name|humanize %}
+        {% endif %}
+        <label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
+    {% endif %}
+{% endspaceless %}
+{% endblock form_label %}
+
+{% block button_label %}{% endblock %}
+
+{# Rows #}
+
+{% block repeated_row %}
+{% spaceless %}
+    {#
+    No need to render the errors here, as all errors are mapped
+    to the first child (see RepeatedTypeValidatorExtension).
+    #}
+    {{ block('form_rows') }}
+{% endspaceless %}
+{% endblock repeated_row %}
+
+{% block form_row %}
+{% spaceless %}
+    {% set style = style|default(bootstrap_get_style()) %}
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if attr.label_col is defined and attr.label_col is not empty %}
+        {% set label_col = attr.label_col %}
+    {% endif %}
+    {% if attr.widget_col is defined and attr.widget_col is not empty %}
+        {% set widget_col = attr.widget_col %}
+    {% endif %}
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+    {% if attr.style is defined and attr.style is not empty %}
+        {% set style = attr.style %}
+    {% endif %}
+
+    {% set label_col = label_col|default(bootstrap_get_label_col()) %}
+    {% set widget_col = widget_col|default(bootstrap_get_widget_col()) %}
+
+    <div class="form-group{% if not form.vars.valid %} has-error{% endif %}">
+        {% if style == 'horizontal' %}
+            {{ form_label(form) }}
+            <div class="col-{{ col_size }}-{{ widget_col }}">
+                {{ block('form_input_group') }}
+                {{ block('form_help') }}
+                {{ form_errors(form) }}
+            </div>
+        {% else %}
+            {{ form_label(form) }}
+            {{ block('form_input_group') }}
+            {{ block('form_help') }}
+            {{ form_errors(form) }}
+        {% endif %}
+    </div>
+
+    {% if style == 'inline' %}&nbsp;{% endif %}
+{% endspaceless %}
+{% endblock form_row %}
+
+{% block form_input_group %}
+{% spaceless %}
+    {% if attr.input_group is defined and attr.input_group is not empty %}
+        {% set input_group = attr.input_group %}
+    {% endif %}
+    {% set input_group = input_group|default({}) %}
+    {% if input_group is not empty %}
+        {% set ig_size_class = '' %}
+        {% if input_group.size is defined and input_group.size == 'large' %}
+            {% set ig_size_class = ' input-group-lg' %}
+        {% endif  %}
+        {% if input_group.size is defined and input_group.size == 'small' %}
+            {% set ig_size_class = ' input-group-sm' %}
+        {% endif  %}
+        <div class="input-group{{ ig_size_class }}">
+            {% if input_group.prepend is defined and input_group.prepend is not empty %}
+                <span class="input-group-addon">{{ input_group.prepend|raw|parse_icons }}</span>
+            {% endif %}
+            {{ form_widget(form) }}
+            {% if input_group.append is defined and input_group.append is not empty %}
+                <span class="input-group-addon">{{ input_group.append|raw|parse_icons }}</span>
+            {% endif %}
+        </div>
+    {% else %}
+        {{ form_widget(form) }}
+    {% endif %}
+{% endspaceless %}
+{% endblock form_input_group %}
+
+{% block form_help %}
+{% spaceless %}
+    {% if attr.help_text is defined and attr.help_text is not empty %}
+        {% set help_text = attr.help_text %}
+    {% endif %}
+    {% set help_text = help_text|default('') %}
+    {% if help_text is not empty %}
+        <span class="help-block">{{ help_text|trans({}, translation_domain) }}</span>
+    {% endif %}
+{% endspaceless %}
+{% endblock form_help %}
+
+{% block button_row %}
+{% spaceless %}
+    {% set style = style|default(bootstrap_get_style()) %}
+    {% set col_size = col_size|default(bootstrap_get_col_size()) %}
+
+    {% if attr.label_col is defined and attr.label_col is not empty %}
+        {% set label_col = attr.label_col %}
+    {% endif %}
+    {% if attr.widget_col is defined and attr.widget_col is not empty %}
+        {% set widget_col = attr.widget_col %}
+    {% endif %}
+    {% if attr.col_size is defined and attr.col_size is not empty %}
+        {% set col_size = attr.col_size %}
+    {% endif %}
+    {% if attr.style is defined and attr.style is not empty %}
+        {% set style = attr.style %}
+    {% endif %}
+
+    {% set label_col = label_col|default(bootstrap_get_label_col()) %}
+    {% set widget_col = widget_col|default(bootstrap_get_widget_col()) %}
+
+    {% if style == 'horizontal' %}
+    <div class="form-group">
+        <div class="col-{{ col_size }}-offset-{{ label_col }} col-{{ col_size }}-{{ widget_col }}">
+    {% endif %}
+
+    {{ form_widget(form) }}
+
+    {% if style == 'horizontal' %}
+        </div>
+    </div>
+    {% endif %}
+{% endspaceless %}
+{% endblock button_row %}
+
+{% block hidden_row %}
+    {{ form_widget(form) }}
+{% endblock hidden_row %}
+
+{% block form_actions_row %}
+    {{ block('button_row')  }}
+{% endblock %}
+
+{# Misc #}
+
+{% block form %}
+{% spaceless %}
+    {{ form_start(form) }}
+        {{ form_widget(form) }}
+    {{ form_end(form) }}
+{% endspaceless %}
+{% endblock form %}
+
+{% block form_start %}
+{% spaceless %}
+    {% set method = method|upper %}
+    {% if method in ["GET", "POST"] %}
+        {% set form_method = method %}
+    {% else %}
+        {% set form_method = "POST" %}
+    {% endif %}
+
+    {% if style is defined %}
+        {% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' form-' ~ style)|trim }) %}
+        {{ bootstrap_set_style(style) }}
+    {% endif %}
+
+    {% if col_size is defined %}
+        {{ bootstrap_set_col_size(col_size) }}
+    {% endif %}
+
+    {% if widget_col is defined %}
+        {{ bootstrap_set_widget_col(widget_col) }}
+    {% endif %}
+
+    {% if label_col is defined %}
+        {{ bootstrap_set_label_col(label_col) }}
+    {% endif %}
+
+    {% if simple_col is defined %}
+        {{ bootstrap_set_simple_col(simple_col) }}
+    {% endif %}
+
+    {% if attr.role is not defined or attr.role is empty %}
+        {% set attr = attr|merge({ 'role': 'form' }) %}
+    {% endif %}
+
+    <form  name="{{ form.vars.name }}" method="{{ form_method|lower }}" action="{{ action }}"{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
+    {% if form_method != method %}
+        <input type="hidden" name="_method" value="{{ method }}" />
+    {% endif %}
+{% endspaceless %}
+{% endblock form_start %}
+
+{% block form_end %}
+{% spaceless %}
+    {% if not render_rest is defined or render_rest %}
+        {{ form_rest(form) }}
+    {% endif %}
+    </form>
+    {% if bootstrap_get_style() %}
+        {{ bootstrap_set_style('') }}
+    {% endif %}
+    {% if bootstrap_get_col_size() %}
+        {{ bootstrap_set_col_size('lg') }}
+    {% endif %}
+    {% if bootstrap_get_widget_col() %}
+        {{ bootstrap_set_widget_col(10) }}
+    {% endif %}
+    {% if bootstrap_get_label_col() %}
+        {{ bootstrap_set_label_col(2) }}
+    {% endif %}
+    {% if bootstrap_get_simple_col() %}
+        {{ bootstrap_set_simple_col(false) }}
+    {% endif %}
+{% endspaceless %}
+{% endblock form_end %}
+
+{% block form_enctype %}
+{% spaceless %}
+    {% if multipart %}enctype="multipart/form-data"{% endif %}
+{% endspaceless %}
+{% endblock form_enctype %}
+
+{% block global_form_errors %}
+    {% if errors|length > 0 %}
+        {% set global_errors = true %}
+        {{ block('form_errors') }}
+    {% endif %}
+{% endblock global_form_errors %}
+
+{% block form_errors %}
+{% spaceless %}
+    {% set global_errors = global_errors|default(false) %}
+    {% set style = style|default(bootstrap_get_style()) %}
+
+    {% if attr.style is defined and attr.style is not empty %}
+        {% set style = attr.style %}
+    {% endif %}
+
+    {% if errors|length > 0 %}
+        {% if global_errors %}
+            <div class="alert alert-danger">
+        {% endif %}
+        <ul{% if not global_errors %} class="help-block"{% endif %}>
+            {% for error in errors %}
+                <li>{{ error.message|trans(error.messageParameters, translation_domain) }}</li>
+            {% endfor %}
+        </ul>
+        {% if global_errors == true %}
+            </div>
+        {% endif %}
+    {% endif %}
+{% endspaceless %}
+{% endblock form_errors %}
+
+{% block form_rest %}
+{% spaceless %}
+    {% for child in form %}
+        {% if not child.rendered %}
+            {{ form_row(child) }}
+        {% endif %}
+    {% endfor %}
+{% endspaceless %}
+{% endblock form_rest %}
+
+{# Support #}
+
+{% block form_rows %}
+{% spaceless %}
+    {% for child in form %}
+        {% set childAttr = {} %}
+        {% if attr.col_size is defined %}
+            {% set childAttr = childAttr|merge({ 'col_size': attr.col_size }) %}
+        {% endif %}
+        {% if attr.widget_col is defined %}
+            {% set childAttr = childAttr|merge({ 'widget_col': attr.widget_col }) %}
+        {% endif %}
+        {% if attr.label_col is defined %}
+            {% set childAttr = childAttr|merge({ 'label_col': attr.label_col }) %}
+        {% endif %}
+        {% if attr.simple_col is defined %}
+            {% set childAttr = childAttr|merge({ 'simple_col': attr.simple_col }) %}
+        {% endif %}
+        {% if attr.style is defined %}
+            {% set childAttr = childAttr|merge({ 'style': attr.style }) %}
+        {% endif %}
+        {{ form_row(child, childAttr) }}
+    {% endfor %}
+{% endspaceless %}
+{% endblock form_rows %}
+
+{% block widget_attributes %}
+{% spaceless %}
+    id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if disabled %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
+    {% for attrname, attrvalue in attr %}{% if attrname in ['placeholder', 'title'] %}{{ attrname }}="{{ attrvalue|trans({}, translation_domain) }}" {% elseif attrname in ['input_group'] %}{% else %}{{ attrname }}="{{ attrvalue }}" {% endif %}{% endfor %}
+{% endspaceless %}
+{% endblock widget_attributes %}
+
+{% block widget_container_attributes %}
+{% spaceless %}
+    {% if attr.style is defined and (attr.style == 'inline' or attr.style == 'horizontal') %}
+        {% set attr = attr|merge({ 'class': 'form-'~attr.style~attr.class|default('') }) %}
+        {% set attr = attr|merge({ 'style': null }) %}
+    {% endif %}
+    {% if id is not empty %}id="{{ id }}" {% endif %}
+    {% for attrname, attrvalue in attr %}{% if attrvalue is not null %}{{ attrname }}="{{ attrvalue }}" {% endif %}{% endfor %}
+{% endspaceless %}
+{% endblock widget_container_attributes %}
+
+{% block button_attributes %}
+{% spaceless %}
+    id="{{ id }}" name="{{ full_name }}"{% if disabled %} disabled="disabled"{% endif %}
+    {% for attrname, attrvalue in attr %}{{ attrname }}="{{ attrvalue }}" {% endfor %}
+{% endspaceless %}
+{% endblock button_attributes %}

+ 32 - 19
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/views/Menu/menu.html.twig → vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Menu/bootstrap.html.twig

@@ -18,8 +18,9 @@
     the current item, so lets change that.
 #}
 {% set options = options|merge({'currentDepth': 0}) %}
-{% if options.nav_type is defined and options.currentClass is defined and options.currentClass == 'current' %}
+{% if options.style is defined and options.currentClass is defined and options.currentClass == 'current' %}
     {% set options = options|merge({'currentClass': 'active'}) %}
+    {% set options = options|merge({'ancestorClass': 'active'}) %}
 {% endif %}
 
 {% set listAttributes = item.childrenAttributes %}
@@ -28,19 +29,27 @@
 
 {% block list %}
 {% if item.hasChildren and options.depth is not sameas(0) and item.displayChildren %}
-    {% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' nav')|trim}) %}
+    {% set listAttributes = listAttributes|merge({'class': listAttributes.class|default('')|trim}) %}
 
     {% set listClass = '' %}
-    {% if options.nav_type is defined and options.nav_type == 'tabs' %}
+    {% if options.style is defined and options.style == 'tabs' %}
         {% set listClass = 'nav-tabs' %}
-    {% elseif options.nav_type is defined and options.nav_type == 'pills' %}
-        {% set listClass = 'nav-pills' %}
-    {% elseif options.nav_type is defined and options.nav_type == 'stacked_tabs' %}
+    {% elseif options.style is defined and options.style == 'stacked-tabs' %}
         {% set listClass = 'nav-tabs nav-stacked' %}
-    {% elseif options.nav_type is defined and options.nav_type == 'stacked_pills' %}
+    {% elseif options.style is defined and options.style == 'justified-tabs' %}
+        {% set listClass = 'nav-tabs nav-justified' %}
+    {% elseif options.style is defined and options.style == 'pills' %}
+        {% set listClass = 'nav-pills' %}
+    {% elseif options.style is defined and options.style == 'justified-pills' %}
+        {% set listClass = 'nav-pills nav-justified' %}
+    {% elseif options.style is defined and options.style == 'stacked-pills' %}
         {% set listClass = 'nav-pills nav-stacked' %}
-    {% elseif options.nav_type is defined and options.nav_type == 'list' %}
+    {% elseif options.style is defined and options.style == 'list' %}
         {% set listClass = 'nav-list' %}
+    {% elseif options.style is defined and options.style == 'navbar' %}
+        {% set listClass = 'navbar-nav' %}
+    {% elseif options.style is defined and options.style == 'navbar-right' %}
+        {% set listClass = 'navbar-nav navbar-right' %}
     {% endif %}
 
     {% if options.pull is defined and options.pull == 'right' %}
@@ -48,6 +57,8 @@
     {% elseif options.pull is defined and options.pull == 'left' %}
         {% set listClass = (listClass|default('') ~ 'pull-left')|trim %}
     {% endif %}
+    
+    {% set listClass = (item.parent is null) ? listClass ~ ' nav' : listClass %}
 
     {% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' ' ~ listClass)|trim}) %}
 
@@ -59,7 +70,7 @@
 
 {% block dropdownList %}
 {% spaceless %}
-    {% if item.hasChildren and options.depth is not sameas(0) and item.displayChildren %}
+    {% if item.hasChildren and options.depth is not sameas(0) and ((item.extras.dropdown is not defined and item.displayChildren is sameas(true) or item.extras.dropdown is defined and item.extras.dropdown is sameas(true) and item.displayChildren is sameas(true))) %}
         {% set listAttributes = listAttributes|merge({'class': (listAttributes.class|default('') ~ ' dropdown-menu')|trim}) %}
         <ul{{ _self.attributes(listAttributes) }}>
         {{ block('children') }}
@@ -108,15 +119,15 @@
     {%- if item.actsLikeLast %}
         {%- set classes = classes|merge([options.lastClass]) %}
     {%- endif %}
-    {%- if item.hasChildren and ((options.nav_type is defined and options.nav_type == 'list') or options.currentDepth is not sameas(1)) %}
+    {%- if item.hasChildren and ((options.style is defined and options.style == 'list') or options.currentDepth is not sameas(1)) %}
         {%- set classes = classes|merge(['nav-header']) %}
-    {%- elseif item.hasChildren and options.nav_type is defined and options.nav_type in ['tabs', 'pills', 'navbar'] %}
+    {%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] and ((item.extras.dropdown is not defined and item.displayChildren is sameas(true) or item.extras.dropdown is defined and item.extras.dropdown is sameas(true) and item.displayChildren is sameas(true))) %}
         {%- set classes = classes|merge(['dropdown']) %}
     {%- endif %}
 
     {%- set attributes = item.attributes %}
 
-    {%- if options.nav_type is defined and options.nav_type == 'navbar' and attributes.divider is defined and attributes.divider is not empty and options.currentDepth is sameas(1) %}
+    {%- if options.style is defined and options.style == 'navbar' and attributes.divider is defined and attributes.divider is not empty and options.currentDepth is sameas(1) %}
         {%- set classes = classes|merge(['divider-vertical']) %}
     {%- elseif attributes.divider is defined and attributes.divider is not empty %}
         {%- set classes = classes|merge(['divider']) %}
@@ -128,22 +139,24 @@
 {# displaying the item #}
     <li{{ _self.attributes(attributes) }}>
         {%- if attributes.divider is defined and attributes.divider is not empty %}
-        {%- elseif item.hasChildren and options.nav_type is defined and options.nav_type in ['tabs', 'pills', 'navbar'] and options.currentDepth is sameas(1) %}
-        {{ block('dropdownElement') }}
+        {%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] and options.currentDepth is sameas(1) and ((item.extras.dropdown is not defined and item.displayChildren is sameas(true) or item.extras.dropdown is defined and item.extras.dropdown is sameas(true) and item.displayChildren is sameas(true))) %}
+            {{ block('dropdownElement') }}
+        {%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] and options.currentDepth is sameas(1) and ((item.extras.dropdown is defined and item.extras.dropdown is sameas(false) or item.displayChildren(false) )) %}
+            {{ block('linkElement') }}
         {%- elseif item.uri is not empty and ((matcher is defined and not matcher.isCurrent(item)) or options.currentAsLink) %}
-        {{ block('linkElement') }}
+            {{ block('linkElement') }}
         {%- elseif item.uri is not empty and ((item.current is defined and not item.current) or options.currentAsLink) %}
-        {{ block('linkElement') }}
+            {{ block('linkElement') }}
         {%- else %}
-        {{ block('spanElement') }}
+            {{ block('spanElement') }}
         {%- endif %}
 {# render the list of children#}
         {%- set childrenClasses = item.childrenAttribute('class') is not empty ? [item.childrenAttribute('class')] : [] %}
         {%- set childrenClasses = childrenClasses|merge(['menu_level_' ~ item.level]) %}
         {%- set listAttributes = item.childrenAttributes|merge({'class': childrenClasses|join(' ') }) %}
-        {%- if item.hasChildren and options.nav_type is defined and (options.nav_type == 'list' or options.currentDepth is not sameas(1)) %}
+        {%- if item.hasChildren and options.style is defined and (options.style == 'list' or options.currentDepth is not sameas(1)) %}
             {{ block('listList') }}
-        {%- elseif item.hasChildren and options.nav_type is defined and options.nav_type in ['tabs', 'pills', 'navbar'] %}
+        {%- elseif item.hasChildren and options.style is defined and options.style in ['tabs', 'justified-tabs', 'pills', 'justified-pills', 'navbar', 'navbar-right', 'navbar_justified'] %}
             {{ block('dropdownList') }}
         {%- else %}
             {{ block('list') }}

+ 32 - 47
vendor/braincrafted/bootstrap-bundle/Bc/Bundle/BootstrapBundle/Resources/views/Pagination/pagination.html.twig → vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/Pagination/bootstrap.html.twig

@@ -1,42 +1,40 @@
-{# Twitter Bootstrap Sliding pagination control implementation #}
+{% set class = class|default('') %}
 
-{% if style is not defined %}
-    {% set style = 'pagination' %}
-{% endif %}
-
-{% if prev_label is not defined %}
-    {% set prev_label = 'Previous' %}
-{% endif %}
-{% if next_label is not defined %}
-    {% set next_label = 'Next' %}
-{% endif %}
-{% if first_label is not defined %}
-    {% set first_label = 'First' %}
-{% endif %}
-{% if last_label is not defined %}
-    {% set last_label = 'Last' %}
-{% endif %}
+{% if pageCount > 1 %}
+    {% if style is defined and style == 'pager' %}
 
+        {% set prev_label = prev_label|default('Previous') %}
+        {% set next_label = next_label|default('Next') %}
+        {% set aligned = aligned|default(false) %}
 
-{% if pageCount > 1 %}
-    {% if style == 'pagination' %}
-        {% set orientation_class = '' %}
-        {% if alignment is defined %}
-            {% if alignment == 'center' %}
-                {% set orientation_class = ' pagination-centered' %}
-            {% elseif alignment == 'right' %}
-                {% set orientation_class = ' pagination-right' %}
+        <ul class="pager{% if class is not empty %} {{ class }}{% endif %}">
+            {% if previous is defined %}
+                <li{% if aligned %} class="previous"{% endif %}><a href="{{ path(route, query|merge({(pageParameterName): previous})) }}">{{ prev_label|raw }}</a></li>
+            {% else %}
+                <li class="disabled{% if aligned %} previous{% endif %}"><span>{{ prev_label|raw }}</span></li>
+            {% endif %}
+            {% if next is defined %}
+                <li{% if aligned %} class="next"{% endif %}><a href="{{ path(route, query|merge({(pageParameterName): next})) }}">{{ next_label|raw }}</a></li>
+            {% else %}
+                <li class="disabled{% if aligned %} next{% endif %}"><span>{{ next_label|raw }}</span></li>
             {% endif %}
-        {% endif %}
+        </ul>
+    {% else %}
 
-        <div class="pagination{{ orientation_class }}">
-            <ul>
-            {% if first is defined and current != first %}
+        {% set prev_label = prev_label|default('&laquo;') %}
+        {% set next_label = next_label|default('&raquo;') %}
+
+        <ul class="pagination{% if class is not empty %} {{ class }}{% endif %}">
+            {% if first_label is defined and first is defined and current != first %}
                 <li><a href="{{ path(route, query|merge({(pageParameterName): first})) }}">{{ first_label|raw }}</a></li>
+            {% elseif last_label is defined %}
+                <li class="disabled"><span>{{ first_label|raw }}</span></li>
             {% endif %}
 
             {% if previous is defined %}
                 <li><a href="{{ path(route, query|merge({(pageParameterName): previous})) }}">{{ prev_label|raw }}</a></li>
+            {% else %}
+                <li class="disabled"><span>{{ prev_label|raw }}</span></li>
             {% endif %}
 
             {% for page in pagesInRange %}
@@ -50,27 +48,14 @@
 
             {% if next is defined %}
                 <li><a href="{{ path(route, query|merge({(pageParameterName): next})) }}">{{ next_label|raw }}</a></li>
+            {% else %}
+                <li class="disabled"><span>{{ next_label|raw }}</span></li>
             {% endif %}
 
-            {% if last is defined and current != last %}
+            {% if last_label is defined and last is defined and current != last %}
                 <li><a href="{{ path(route, query|merge({(pageParameterName): last})) }}">{{ last_label|raw }}</a></li>
-            {% endif %}
-            </ul>
-        </div>
-    {% else %}
-        {% if aligned is not defined %}
-            {% set aligned = false %}
-        {% endif %}
-        <ul class="pager">
-            {% if previous is defined %}
-                <li{% if aligned %} class="previous"{% endif %}><a href="{{ path(route, query|merge({(pageParameterName): previous})) }}">{{ prev_label|raw }}</a></li>
-            {% else %}
-                <li class="disabled{% if aligned %} previous{% endif %}"><span>{{ prev_label|raw }}</span></li>
-            {% endif %}
-            {% if next is defined %}
-                <li{% if aligned %} class="next"{% endif %}><a href="{{ path(route, query|merge({(pageParameterName): next})) }}">{{ next_label|raw }}</a></li>
-            {% else %}
-                <li class="disabled{% if aligned %} next{% endif %}"><span>{{ next_label|raw }}</span></li>
+            {% elseif last_label is defined %}
+                <li class="disabled"><span>{{ last_label|raw }}</span></li>
             {% endif %}
         </ul>
     {% endif %}

+ 34 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/flash.html.twig

@@ -0,0 +1,34 @@
+{% if translation_domain is not defined %}
+    {% set translation_domain = null %}
+{% endif %}
+{% if close is not defined %}
+    {% set close = false %}
+{% endif %}
+
+{% for flashMessage in app.session.flashbag.get('alert') %}
+    <div class="alert alert-warning">
+        {% if close %}<button type="button" class="close" data-dismiss="alert">&times;</button>{% endif %}
+        {{ flashMessage|trans({}, translation_domain) }}
+    </div>
+{% endfor %}
+
+{% for flashMessage in app.session.flashbag.get('error') %}
+    <div class="alert alert-danger">
+        {% if close %}<button type="button" class="close" data-dismiss="alert">&times;</button>{% endif %}
+        {{ flashMessage|trans({}, translation_domain) }}
+    </div>
+{% endfor %}
+
+{% for flashMessage in app.session.flashbag.get('info') %}
+    <div class="alert alert-info">
+        {% if close %}<button type="button" class="close" data-dismiss="alert">&times;</button>{% endif %}
+        {{ flashMessage|trans({}, translation_domain) }}
+    </div>
+{% endfor %}
+
+{% for flashMessage in app.session.flashbag.get('success') %}
+    <div class="alert alert-success">
+        {% if close %}<button type="button" class="close" data-dismiss="alert">&times;</button>{% endif %}
+        {{ flashMessage|trans({}, translation_domain) }}
+    </div>
+{% endfor %}

+ 4 - 0
vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/views/ie8-support.html.twig

@@ -0,0 +1,4 @@
+<!--[if lt IE 9]>
+    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv-printshiv.min.js"></script>
+    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
+<![endif]-->

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini