Remove silex support

Silex was abandoned 3 years ago, removing its support will allow
to bump some dependencies.
This commit is contained in:
Fran Moreno 2021-05-17 03:07:36 +02:00
commit 2bed29ffbc
No known key found for this signature in database
GPG key ID: 52DAC484FEA02B0C
4 changed files with 10 additions and 27 deletions

View file

@ -714,32 +714,6 @@ $ffprobe = FFMpeg\FFProbe::create();
$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
This project is licensed under the [MIT license](http://opensource.org/licenses/MIT).

View file

@ -42,7 +42,6 @@
"php-ffmpeg/extras": "A compilation of common audio & video drivers for PHP-FFMpeg"
},
"require-dev": {
"silex/silex": "~1.0",
"symfony/phpunit-bridge": "^5.0.4",
"symfony/process": "2.8 || 3.3"
},

View file

@ -15,6 +15,9 @@ use Doctrine\Common\Cache\ArrayCache;
use Silex\Application;
use Silex\ServiceProviderInterface;
/**
* @deprecated
*/
class FFMpegServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)

View file

@ -7,6 +7,13 @@ use Silex\Application;
class FFMpegServiceProviderTest extends TestCase
{
protected function setUp()
{
if (!class_exists('\Application\Silex')) {
$this->markTestSkipped('You must have silex/silex installed.');
}
}
public function testWithConfig()
{
$app = new Application();