Skip to content

Commit

Permalink
Merge pull request #815 from franmomu/remove_silex
Browse files Browse the repository at this point in the history
Remove silex support
  • Loading branch information
pascalbaljet committed Dec 20, 2021
2 parents c69632a + 40d9afd commit 22b7193
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
3 changes: 3 additions & 0 deletions src/FFMpeg/FFMpegServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
use Silex\ServiceProviderInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;

/**
* @deprecated
*/
class FFMpegServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
Expand Down
7 changes: 7 additions & 0 deletions tests/Unit/FFMpegServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

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();
Expand Down

0 comments on commit 22b7193

Please sign in to comment.