Merge pull request #815 from franmomu/remove_silex
Remove silex support
This commit is contained in:
commit
22b71931fd
4 changed files with 10 additions and 27 deletions
26
README.md
26
README.md
|
|
@ -714,32 +714,6 @@ $ffprobe = FFMpeg\FFProbe::create();
|
||||||
$ffprobe->isValid('/path/to/file/to/check'); // returns bool
|
$ffprobe->isValid('/path/to/file/to/check'); // returns bool
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using with Silex Microframework
|
|
||||||
|
|
||||||
The service provider is easy to set up:
|
|
||||||
|
|
||||||
```php
|
|
||||||
$app = new Silex\Application();
|
|
||||||
$app->register(new FFMpeg\FFMpegServiceProvider());
|
|
||||||
|
|
||||||
$video = $app['ffmpeg']->open('video.mpeg');
|
|
||||||
```
|
|
||||||
|
|
||||||
Available options are as follow:
|
|
||||||
|
|
||||||
```php
|
|
||||||
$app->register(new FFMpeg\FFMpegServiceProvider(), array(
|
|
||||||
'ffmpeg.configuration' => array(
|
|
||||||
'ffmpeg.threads' => 4,
|
|
||||||
'ffmpeg.timeout' => 300,
|
|
||||||
'ffmpeg.binaries' => '/opt/local/ffmpeg/bin/ffmpeg',
|
|
||||||
'ffprobe.timeout' => 30,
|
|
||||||
'ffprobe.binaries' => '/opt/local/ffmpeg/bin/ffprobe',
|
|
||||||
),
|
|
||||||
'ffmpeg.logger' => $logger,
|
|
||||||
));
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
This project is licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
"php-ffmpeg/extras": "A compilation of common audio & video drivers for PHP-FFMpeg"
|
"php-ffmpeg/extras": "A compilation of common audio & video drivers for PHP-FFMpeg"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"silex/silex": "~1.0",
|
|
||||||
"symfony/phpunit-bridge": "^5.0.4",
|
"symfony/phpunit-bridge": "^5.0.4",
|
||||||
"symfony/process": "2.8 || 3.3"
|
"symfony/process": "2.8 || 3.3"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@ use Silex\Application;
|
||||||
use Silex\ServiceProviderInterface;
|
use Silex\ServiceProviderInterface;
|
||||||
use Symfony\Component\Cache\Adapter\ArrayAdapter;
|
use Symfony\Component\Cache\Adapter\ArrayAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
class FFMpegServiceProvider implements ServiceProviderInterface
|
class FFMpegServiceProvider implements ServiceProviderInterface
|
||||||
{
|
{
|
||||||
public function register(Application $app)
|
public function register(Application $app)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,13 @@ use Silex\Application;
|
||||||
|
|
||||||
class FFMpegServiceProviderTest extends TestCase
|
class FFMpegServiceProviderTest extends TestCase
|
||||||
{
|
{
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
if (!class_exists('\Application\Silex')) {
|
||||||
|
$this->markTestSkipped('You MUST have silex/silex installed.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function testWithConfig()
|
public function testWithConfig()
|
||||||
{
|
{
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue