File tree Expand file tree Collapse file tree 13 files changed +111
-100
lines changed Expand file tree Collapse file tree 13 files changed +111
-100
lines changed Original file line number Diff line number Diff line change 11language : php
22
33php :
4- - 5.5
5- - 5.6
6- - 7
7- - hhvm
4+ - 7.1
5+ - nightly
6+
7+ matrix :
8+ allow_failures :
9+ - php :
10+ - nightly
811
912before_script : composer install
1013
11- script : vendor/bin/phpunit -c tests - -coverage-clover=coverage.clover
14+ script : vendor/bin/phpunit --coverage-clover=coverage.clover
1215
1316after_script :
14- - sh -c 'if [ $(phpenv version-name) = "5.6 " ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'
17+ - sh -c 'if [ $(phpenv version-name) = "7.1 " ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'
Original file line number Diff line number Diff line change 1919 }
2020 ],
2121 "require" : {
22- "php" : " >=5.4.0 " ,
23- "brainbits/transcoder" : " ^2.0.2 "
22+ "php" : " ^7.1 " ,
23+ "brainbits/transcoder" : " ^3.0 "
2424 },
2525 "require-dev" : {
26- "php" : " >=5.5.0" ,
27- "phpunit/phpunit" : " ~4.5" ,
28- "symfony/config" : " ^2.3" ,
29- "symfony/dependency-injection" : " ^2.3" ,
30- "symfony/http-kernel" : " ^2.3" ,
31- "matthiasnoback/symfony-config-test" : " ^1.4" ,
32- "matthiasnoback/symfony-dependency-injection-test" : " ^0.7.6"
26+ "phpunit/phpunit" : " ^6.0" ,
27+ "symfony/config" : " ^2.8|^3.0" ,
28+ "symfony/dependency-injection" : " ^2.8|^3.0" ,
29+ "symfony/http-kernel" : " ^2.8|^3.0" ,
30+ "matthiasnoback/symfony-config-test" : " ^3.0" ,
31+ "matthiasnoback/symfony-dependency-injection-test" : " ^2.0"
3332 },
3433 "autoload" : {
3534 "psr-4" : { "Brainbits\\ TranscoderBundle\\ " : " src/" }
3635 },
3736 "autoload-dev" : {
3837 "psr-4" : { "Brainbits\\ TranscoderBundle\\ Tests\\ " : " tests/" }
39- }
38+ },
39+ "extra" : {
40+ "branch-alias" : {
41+ "dev-master" : " 3.0-dev"
42+ }
43+ },
44+ "minimum-stability" : " dev" ,
45+ "prefer-stable" : true
4046}
Original file line number Diff line number Diff line change 55 convertNoticesToExceptions =" true"
66 convertWarningsToExceptions =" true"
77 syntaxCheck =" true" >
8- <testsuite name =" brainbits " >
9- <directory >. </directory >
8+ <testsuite name =" transcoder-bundle " >
9+ <directory >tests </directory >
1010 </testsuite >
1111 <filter >
1212 <whitelist >
13- <directory suffix =" .php" >../ src/ </directory >
13+ <directory suffix =" .php" >src</directory >
1414 </whitelist >
1515 </filter >
1616</phpunit >
Original file line number Diff line number Diff line change 11<?php
2+
3+ declare (strict_types = 1 );
4+
25/*
36 * This file is part of the brainbits transcoder bundle package.
47 *
1619use Symfony \Component \HttpKernel \Bundle \Bundle ;
1720
1821/**
19- * brainbits transcoder bundle
20- *
21- * @author Phillip Look <[email protected] > 22+ * brainbits transcoder bundle.
2223 */
2324class BrainbitsTranscoderBundle extends Bundle
2425{
25- public function build (ContainerBuilder $ container )
26+ public function build (ContainerBuilder $ container ): void
2627 {
2728 parent ::build ($ container );
2829
Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types = 1 );
4+
35/*
46 * This file is part of the brainbits transcoder bundle package.
57 *
1113
1214namespace Brainbits \TranscoderBundle \DependencyInjection ;
1315
14- use Symfony \Component \DependencyInjection \ContainerBuilder ;
1516use Symfony \Component \Config \FileLocator ;
16- use Symfony \Component \HttpKernel \DependencyInjection \Extension ;
17- use Symfony \Component \DependencyInjection \Loader ;
17+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
1818use Symfony \Component \DependencyInjection \Loader \XmlFileLoader ;
19+ use Symfony \Component \HttpKernel \DependencyInjection \Extension ;
1920
2021/**
21- * This is the class that loads and manages your bundle configuration
22- *
23- * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
24- *
25- * @author Gregor Welters <[email protected] > 22+ * This is the class that loads and manages your bundle configuration.
2623 */
2724class BrainbitsTranscoderExtension extends Extension
2825{
29- /**
30- * {@inheritDoc}
31- */
32- public function load (array $ configs , ContainerBuilder $ container )
26+ public function load (array $ configs , ContainerBuilder $ container ): void
3327 {
34- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . '/../Resources/config ' ));
28+ $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . '/../Resources/config ' ));
3529
3630 $ loader ->load ('decoders.xml ' );
3731 $ loader ->load ('encoders.xml ' );
Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types = 1 );
4+
35/*
46 * This file is part of the brainbits transcoder bundle package.
57 *
1113
1214namespace Brainbits \TranscoderBundle \DependencyInjection \Compiler ;
1315
14- use Symfony \Component \DependencyInjection \ContainerBuilder ;
1516use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
17+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
1618use Symfony \Component \DependencyInjection \Reference ;
1719
20+ /**
21+ * Add decoder pass.
22+ */
1823class AddDecoderPass implements CompilerPassInterface
1924{
20- public function process (ContainerBuilder $ container )
25+ public function process (ContainerBuilder $ container ): void
2126 {
2227 if (false === $ container ->hasDefinition ('brainbits.transcoder.decoder.resolver ' )) {
2328 return ;
Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types = 1 );
4+
35/*
46 * This file is part of the brainbits transcoder bundle package.
57 *
1517use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
1618use Symfony \Component \DependencyInjection \Reference ;
1719
20+ /**
21+ * Add decoder pass.
22+ */
1823class AddEncoderPass implements CompilerPassInterface
1924{
20- public function process (ContainerBuilder $ container )
25+ public function process (ContainerBuilder $ container ): void
2126 {
2227 if (false === $ container ->hasDefinition ('brainbits.transcoder.encoder.resolver ' )) {
2328 return ;
Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types = 1 );
4+
35/*
46 * This file is part of the brainbits transcoder bundle package.
57 *
1517use Symfony \Component \Config \Definition \ConfigurationInterface ;
1618
1719/**
18- * BrainbitsTranscoderExtension configuration structure.
19- *
20- * @author Stephan Wentz <[email protected] > 20+ * brainbits transcoder configuration.
2121 */
2222class Configuration implements ConfigurationInterface
2323{
24- public function getConfigTreeBuilder ()
24+ public function getConfigTreeBuilder (): TreeBuilder
2525 {
2626 $ treeBuilder = new TreeBuilder ();
2727 $ rootNode = $ treeBuilder ->root ('brainbits_transcoder ' );
Original file line number Diff line number Diff line change 11<?php
2+
23/*
34 * This file is part of the brainbits transcoder bundle package.
45 *
1314use Brainbits \TranscoderBundle \BrainbitsTranscoderBundle ;
1415use Brainbits \TranscoderBundle \DependencyInjection \Compiler \AddDecoderPass ;
1516use Brainbits \TranscoderBundle \DependencyInjection \Compiler \AddEncoderPass ;
17+ use PHPUnit \Framework \TestCase ;
1618use Prophecy \Argument ;
1719use Symfony \Component \DependencyInjection \ContainerBuilder ;
1820
1921/**
20- * Transcoder bundle test
21- *
22- * @author Stephan Wentz <[email protected] > 22+ * Transcoder bundle test.
2323 */
24- class BrainbitsTranscoderBundleTest extends \PHPUnit_Framework_TestCase
24+ class BrainbitsTranscoderBundleTest extends TestCase
2525{
2626 public function testBuild ()
2727 {
2828 $ bundle = new BrainbitsTranscoderBundle ();
2929
3030 $ container = $ this ->prophesize (ContainerBuilder::class);
31- $ container ->addCompilerPass (Argument::type (AddDecoderPass::class))->shouldBeCalled ();
32- $ container ->addCompilerPass (Argument::type (AddEncoderPass::class))->shouldBeCalled ();
31+ $ container ->addCompilerPass (Argument::type (AddDecoderPass::class))
32+ ->shouldBeCalled ();
33+ $ container ->addCompilerPass (Argument::type (AddEncoderPass::class))
34+ ->shouldBeCalled ();
3335
3436 $ bundle ->build ($ container ->reveal ());
3537 }
Original file line number Diff line number Diff line change 1414use Matthias \SymfonyDependencyInjectionTest \PhpUnit \AbstractExtensionTestCase ;
1515
1616/**
17- * Extension test
18- *
19- * @author Stephan Wentz <[email protected] > 17+ * Extension test.
2018 */
2119class BrainbitsTranscoderExtensionTest extends AbstractExtensionTestCase
2220{
2321 protected function getContainerExtensions ()
2422 {
25- return array (
23+ return [
2624 new BrainbitsTranscoderExtension ()
27- ) ;
25+ ] ;
2826 }
2927
3028 public function testContainerHasDefaultParameters ()
@@ -37,10 +35,10 @@ public function testContainerHasDefaultParameters()
3735
3836 public function testContainerHasProvidedParameters ()
3937 {
40- $ this ->load (array (
41- 'encoder ' => array ( '7z ' => 'sevenZ ' ) ,
42- 'decoder ' => array ( '7z ' => 'sevenZ ' ) ,
43- ) );
38+ $ this ->load ([
39+ 'encoder ' => [ '7z ' => 'sevenZ ' ] ,
40+ 'decoder ' => [ '7z ' => 'sevenZ ' ] ,
41+ ] );
4442
4543 $ this ->assertContainerBuilderHasParameter ('brainbits.transcoder.decoder.7z.executable ' , 'sevenZ ' );
4644 $ this ->assertContainerBuilderHasParameter ('brainbits.transcoder.encoder.7z.executable ' , 'sevenZ ' );
You can’t perform that action at this time.
0 commit comments