parent
fd592c5cec
commit
8e32bdbe4c
@ -1 +0,0 @@ |
||||
Subproject commit 98771524bba1ffa58373c4c06d438f5fb5442ff4 |
@ -0,0 +1,12 @@ |
||||
language: php |
||||
|
||||
services: [] |
||||
|
||||
before_script: |
||||
- curl -s http://getcomposer.org/installer | php |
||||
- php composer.phar install --dev |
||||
|
||||
php: |
||||
- 5.3.3 |
||||
- 5.3 |
||||
- 5.4 |
@ -0,0 +1,18 @@ |
||||
This project is released under MIT License |
||||
|
||||
Copyright (c) 2012 Romain Neutron |
||||
|
||||
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: |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
||||
IN THE SOFTWARE. |
@ -0,0 +1,33 @@ |
||||
#Silex Filesystem Service Provider |
||||
|
||||
[![Build Status](https://secure.travis-ci.org/romainneutron/Silex-Filesystem-Service-Provider.png?branch=master)](http://travis-ci.org/romainneutron/Silex-Filesystem-Service-Provider) |
||||
|
||||
This is a [Silex Service Provider](http://silex.sensiolabs.org/doc/providers.html) |
||||
for Symfony [Filesystem Component](http://symfony.com/doc/master/components/filesystem.html). |
||||
|
||||
##Installation |
||||
|
||||
Add it using [composer](http://getcomposer.org/) : |
||||
|
||||
```json |
||||
{ |
||||
"require": { |
||||
"neutron/silex-filesystem-provider": "dev-master" |
||||
} |
||||
} |
||||
``` |
||||
|
||||
##Usage |
||||
|
||||
```php |
||||
use Silex\Application; |
||||
use Neutron\Silex\Provider\FilesystemServiceProvider; |
||||
|
||||
$app = new Application(); |
||||
$app->register(new FilesystemServiceProvider()); |
||||
|
||||
``` |
||||
|
||||
##License |
||||
|
||||
This is released under the MIT license |
@ -0,0 +1,25 @@ |
||||
{ |
||||
"name": "neutron/silex-filesystem-provider", |
||||
"type": "library", |
||||
"description": "A Silex Provider for Symfony Filesystem component", |
||||
"keywords": ["silex", "filesystem", "temporary-filesystem"], |
||||
"license": "MIT", |
||||
"authors": [ |
||||
{ |
||||
"name": "Romain Neutron", |
||||
"email": "imprec@gmail.com", |
||||
"homepage": "http://www.lickmychip.com/" |
||||
} |
||||
], |
||||
"require": { |
||||
"php": ">=5.3.3", |
||||
"silex/silex": ">=1.0", |
||||
"symfony/filesystem": ">=2.0" |
||||
}, |
||||
"minimum-stability": "dev", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Neutron": "src" |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,416 @@ |
||||
{ |
||||
"hash": "19a0137ceea16d348f8193168c542d9f", |
||||
"packages": [ |
||||
{ |
||||
"name": "pimple/pimple", |
||||
"version": "dev-master", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "git://github.com/fabpot/Pimple.git", |
||||
"reference": "b9f27b8dc18c08f00627dec02359b46a24791dc3" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://github.com/fabpot/Pimple/zipball/b9f27b8dc18c08f00627dec02359b46a24791dc3", |
||||
"reference": "b9f27b8dc18c08f00627dec02359b46a24791dc3", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=5.3.0" |
||||
}, |
||||
"time": "1347278988", |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "1.0.x-dev" |
||||
} |
||||
}, |
||||
"installation-source": "source", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Pimple": "lib/" |
||||
} |
||||
}, |
||||
"license": [ |
||||
"MIT" |
||||
], |
||||
"authors": [ |
||||
{ |
||||
"name": "Fabien Potencier", |
||||
"email": "fabien@symfony.com" |
||||
} |
||||
], |
||||
"description": "Pimple is a simple Dependency Injection Container for PHP 5.3", |
||||
"homepage": "http://pimple.sensiolabs.org", |
||||
"keywords": [ |
||||
"dependency injection", |
||||
"container" |
||||
] |
||||
}, |
||||
{ |
||||
"name": "silex/silex", |
||||
"version": "dev-master", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "git://github.com/fabpot/Silex.git", |
||||
"reference": "113095184b4537d9bf57acf914ac8e767827943b" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://github.com/fabpot/Silex/archive/113095184b4537d9bf57acf914ac8e767827943b.zip", |
||||
"reference": "113095184b4537d9bf57acf914ac8e767827943b", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=5.3.3", |
||||
"pimple/pimple": "1.*", |
||||
"symfony/event-dispatcher": ">=2.1,<2.3-dev", |
||||
"symfony/http-foundation": ">=2.1,<2.3-dev", |
||||
"symfony/http-kernel": ">=2.1,<2.3-dev", |
||||
"symfony/routing": ">=2.1,<2.3-dev" |
||||
}, |
||||
"require-dev": { |
||||
"monolog/monolog": ">=1.0.0,<1.2-dev", |
||||
"twig/twig": ">=1.8.0,<2.0-dev", |
||||
"swiftmailer/swiftmailer": "4.2.*", |
||||
"doctrine/dbal": ">=2.2.0,<2.4.0-dev", |
||||
"symfony/security": ">=2.1,<2.3-dev", |
||||
"symfony/config": ">=2.1,<2.3-dev", |
||||
"symfony/locale": ">=2.1,<2.3-dev", |
||||
"symfony/form": ">=2.1,<2.3-dev", |
||||
"symfony/browser-kit": ">=2.1,<2.3-dev", |
||||
"symfony/css-selector": ">=2.1,<2.3-dev", |
||||
"symfony/finder": ">=2.1,<2.3-dev", |
||||
"symfony/monolog-bridge": ">=2.1,<2.3-dev", |
||||
"symfony/process": ">=2.1,<2.3-dev", |
||||
"symfony/translation": ">=2.1,<2.3-dev", |
||||
"symfony/twig-bridge": ">=2.1,<2.3-dev", |
||||
"symfony/validator": ">=2.1,<2.3-dev", |
||||
"symfony/serializer": ">=2.1,<2.3-dev" |
||||
}, |
||||
"suggest": { |
||||
"symfony/browser-kit": ">=2.1,<2.3-dev", |
||||
"symfony/css-selector": ">=2.1,<2.3-dev", |
||||
"symfony/dom-crawler": ">=2.1,<2.3-dev" |
||||
}, |
||||
"time": "1352394290", |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "1.0.x-dev" |
||||
} |
||||
}, |
||||
"installation-source": "source", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Silex": "src/" |
||||
} |
||||
}, |
||||
"license": [ |
||||
"MIT" |
||||
], |
||||
"authors": [ |
||||
{ |
||||
"name": "Fabien Potencier", |
||||
"email": "fabien@symfony.com" |
||||
}, |
||||
{ |
||||
"name": "Igor Wiedler", |
||||
"email": "igor@wiedler.ch", |
||||
"homepage": "http://wiedler.ch/igor/" |
||||
} |
||||
], |
||||
"description": "The PHP micro-framework based on the Symfony2 Components", |
||||
"homepage": "http://silex.sensiolabs.org", |
||||
"keywords": [ |
||||
"microframework" |
||||
] |
||||
}, |
||||
{ |
||||
"name": "symfony/event-dispatcher", |
||||
"version": "dev-master", |
||||
"target-dir": "Symfony/Component/EventDispatcher", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/symfony/EventDispatcher", |
||||
"reference": "24a1039d52b6b9f533cb73dcb96c7748262db686" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://github.com/symfony/EventDispatcher/archive/24a1039d52b6b9f533cb73dcb96c7748262db686.zip", |
||||
"reference": "24a1039d52b6b9f533cb73dcb96c7748262db686", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=5.3.3" |
||||
}, |
||||
"require-dev": { |
||||
"symfony/dependency-injection": "2.2.*" |
||||
}, |
||||
"suggest": { |
||||
"symfony/dependency-injection": "2.2.*", |
||||
"symfony/http-kernel": "2.2.*" |
||||
}, |
||||
"time": "1349553479", |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "2.2-dev" |
||||
} |
||||
}, |
||||
"installation-source": "source", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Symfony\\Component\\EventDispatcher\\": "" |
||||
} |
||||
}, |
||||
"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" |
||||
}, |
||||
{ |
||||
"name": "symfony/filesystem", |
||||
"version": "dev-master", |
||||
"target-dir": "Symfony/Component/Filesystem", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/symfony/Filesystem", |
||||
"reference": "ef5f0ab0c2115494911118f7014be5ebddbf172f" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://github.com/symfony/Filesystem/archive/ef5f0ab0c2115494911118f7014be5ebddbf172f.zip", |
||||
"reference": "ef5f0ab0c2115494911118f7014be5ebddbf172f", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=5.3.3" |
||||
}, |
||||
"time": "1351093287", |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "2.2-dev" |
||||
} |
||||
}, |
||||
"installation-source": "source", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Symfony\\Component\\Filesystem\\": "" |
||||
} |
||||
}, |
||||
"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" |
||||
}, |
||||
{ |
||||
"name": "symfony/http-foundation", |
||||
"version": "dev-master", |
||||
"target-dir": "Symfony/Component/HttpFoundation", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/symfony/HttpFoundation", |
||||
"reference": "61c1551f4e429fda1609ed0c8aa5a194ace599ec" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://github.com/symfony/HttpFoundation/archive/61c1551f4e429fda1609ed0c8aa5a194ace599ec.zip", |
||||
"reference": "61c1551f4e429fda1609ed0c8aa5a194ace599ec", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=5.3.3" |
||||
}, |
||||
"time": "1352231732", |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "2.2-dev" |
||||
} |
||||
}, |
||||
"installation-source": "source", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Symfony\\Component\\HttpFoundation\\": "" |
||||
}, |
||||
"classmap": [ |
||||
"Symfony/Component/HttpFoundation/Resources/stubs" |
||||
] |
||||
}, |
||||
"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" |
||||
}, |
||||
{ |
||||
"name": "symfony/http-kernel", |
||||
"version": "dev-master", |
||||
"target-dir": "Symfony/Component/HttpKernel", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/symfony/HttpKernel", |
||||
"reference": "4dcb0bf602788342fb80c28c6e28be818839d417" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://github.com/symfony/HttpKernel/archive/4dcb0bf602788342fb80c28c6e28be818839d417.zip", |
||||
"reference": "4dcb0bf602788342fb80c28c6e28be818839d417", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=5.3.3", |
||||
"symfony/event-dispatcher": "2.2.*", |
||||
"symfony/http-foundation": "2.2.*" |
||||
}, |
||||
"require-dev": { |
||||
"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.*", |
||||
"symfony/process": "2.2.*", |
||||
"symfony/routing": "2.2.*" |
||||
}, |
||||
"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.*" |
||||
}, |
||||
"time": "1351530455", |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "2.2-dev" |
||||
} |
||||
}, |
||||
"installation-source": "source", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Symfony\\Component\\HttpKernel\\": "" |
||||
} |
||||
}, |
||||
"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" |
||||
}, |
||||
{ |
||||
"name": "symfony/routing", |
||||
"version": "dev-master", |
||||
"target-dir": "Symfony/Component/Routing", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/symfony/Routing", |
||||
"reference": "b4c39ea080cfcce4efbfa90fc6cac4222c36432b" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://github.com/symfony/Routing/zipball/b4c39ea080cfcce4efbfa90fc6cac4222c36432b", |
||||
"reference": "b4c39ea080cfcce4efbfa90fc6cac4222c36432b", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=5.3.3" |
||||
}, |
||||
"require-dev": { |
||||
"doctrine/common": ">=2.2,<2.4-dev", |
||||
"symfony/config": "2.2.*", |
||||
"symfony/yaml": "2.2.*", |
||||
"symfony/http-kernel": "2.2.*" |
||||
}, |
||||
"suggest": { |
||||
"doctrine/common": ">=2.2,<2.4-dev", |
||||
"symfony/config": "2.2.*", |
||||
"symfony/yaml": "2.2.*" |
||||
}, |
||||
"time": "1352017821", |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "2.2-dev" |
||||
} |
||||
}, |
||||
"installation-source": "source", |
||||
"autoload": { |
||||
"psr-0": { |
||||
"Symfony\\Component\\Routing\\": "" |
||||
} |
||||
}, |
||||
"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" |
||||
} |
||||
], |
||||
"packages-dev": [ |
||||
|
||||
], |
||||
"aliases": [ |
||||
|
||||
], |
||||
"minimum-stability": "dev", |
||||
"stability-flags": [ |
||||
|
||||
] |
||||
} |
@ -0,0 +1,36 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<phpunit backupGlobals="false" |
||||
backupStaticAttributes="false" |
||||
colors="true" |
||||
convertErrorsToExceptions="true" |
||||
convertNoticesToExceptions="true" |
||||
convertWarningsToExceptions="true" |
||||
processIsolation="false" |
||||
stopOnFailure="false" |
||||
syntaxCheck="true" |
||||
verbose="false" |
||||
bootstrap="vendor/autoload.php" |
||||
> |
||||
<logging> |
||||
<log type="coverage-html" target="tests/phpunit_report/report" charset="UTF-8" |
||||
yui="true" highlight="false" |
||||
lowUpperBound="35" highLowerBound="70"/> |
||||
</logging> |
||||
<php> |
||||
<ini name="display_errors" value="on"/> |
||||
</php> |
||||
|
||||
<testsuites> |
||||
<testsuite name="Filesystem Service Provider Tests Suite"> |
||||
<directory>tests</directory> |
||||
</testsuite> |
||||
</testsuites> |
||||
<filter> |
||||
<blacklist> |
||||
<directory>vendor</directory> |
||||
<directory>tests</directory> |
||||
</blacklist> |
||||
</filter> |
||||
|
||||
</phpunit> |
||||
|
@ -0,0 +1,31 @@ |
||||
<?php |
||||
|
||||
/* |
||||
* This file is part of Filesystem Service Provider. |
||||
* |
||||
* (c) 2012 Romain Neutron <imprec@gmail.com> |
||||
* |
||||
* For the full copyright and license information, please view the LICENSE |
||||
* file that was distributed with this source code. |
||||
*/ |
||||
|
||||
namespace Neutron\Silex\Provider; |
||||
|
||||
use Silex\Application; |
||||
use Silex\ServiceProviderInterface; |
||||
use Symfony\Component\Filesystem\Filesystem; |
||||
|
||||
class FilesystemServiceProvider implements ServiceProviderInterface |
||||
{ |
||||
|
||||
public function register(Application $app) |
||||
{ |
||||
$app['filesystem'] = $app->share(function(Application $app) { |
||||
return new Filesystem(); |
||||
}); |
||||
} |
||||
|
||||
public function boot(Application $app) |
||||
{ |
||||
} |
||||
} |
@ -0,0 +1,17 @@ |
||||
<?php |
||||
|
||||
namespace Neutron\Silex\Provider\Tests; |
||||
|
||||
use Neutron\Silex\Provider\FilesystemServiceProvider; |
||||
use Silex\Application; |
||||
|
||||
class FilesystemServiceProviderTest extends \PHPUnit_Framework_TestCase |
||||
{ |
||||
public function testRegister() |
||||
{ |
||||
$app = new Application(); |
||||
$app->register(new FilesystemServiceProvider()); |
||||
|
||||
$this->assertInstanceOf('Symfony\\Component\\Filesystem\\Filesystem', $app['filesystem']); |
||||
} |
||||
} |
Loading…
Reference in new issue