Skip to content

Commit

Permalink
Merge pull request #10 from fruitwasp/develop
Browse files Browse the repository at this point in the history
Bumps minimal Symfony version to 4.4 + minors
  • Loading branch information
bart-van-amelsvoort authored Jul 8, 2020
2 parents d0b3b90 + 36fc72d commit 8ba5391
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cache:

env:
global:
- PHPUNIT_FLAGS="-v -c ."
- PHPUNIT_FLAGS="--colors=always --testdox -v -c ."
- SYMFONY_DEPRECATIONS_HELPER="max[self]=0"

matrix:
Expand Down Expand Up @@ -40,7 +40,7 @@ install:

script:
- composer validate --strict --no-check-lock
- ./vendor/bin/phpunit $PHPUNIT_FLAGS
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS

notifications:
email: travis-ci@freshheads.com
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ CHANGELOG

This changelog references the relevant changes (bug and security fixes).

1.4.0
---

* Drops support for Symfony versions below 4.4
* Allows php version 7.2 and higher
* Runs tests against Symfony's phpunit bridge
* Updates namespace of test classes to match psr-4 standards
* Marks bundle config classes as final in docblocks; will be final in next major

1.3.0
-----

Expand Down
15 changes: 3 additions & 12 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,16 @@
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

use function method_exists;

/**
* @author Joris van de Sande <joris.van.de.sande@freshheads.com>
* @final
*/
class Configuration implements ConfigurationInterface
{
private const ROOT_NAME = 'fh_webpack';

public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder(self::ROOT_NAME);

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root(self::ROOT_NAME);
}
$treeBuilder = new TreeBuilder('fh_webpack');
$rootNode = $treeBuilder->getRootNode();

$rootNode
->children()
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/FHWebpackExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/**
* @author Joris van de Sande <joris.van.de.sande@freshheads.com>
* @final
*/
class FHWebpackExtension extends Extension
{
Expand Down
1 change: 1 addition & 0 deletions FHWebpackBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

/**
* @author Joris van de Sande <joris.van.de.sande@freshheads.com>
* @final
*/
class FHWebpackBundle extends Bundle
{
Expand Down
9 changes: 3 additions & 6 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ services:
# aliases to keep up BC
fh_webpack.twig_extension:
alias: FH\Bundle\WebpackBundle\Twig\WebpackExtension
# next line can be enabled when Symfony 4.3 becomes the minimal supported version
#deprecated: 'The "%alias_id%" service alias is deprecated, make use of autowiring or FQN.'
deprecated: 'The "%alias_id%" service alias is deprecated, make use of autowiring or FQN.'

fh_webpack.webpack_helper:
alias: FH\Bundle\WebpackBundle\Templating\WebpackHelper
# next line can be enabled when Symfony 4.3 becomes the minimal supported version
#deprecated: 'The "%alias_id%" service alias is deprecated, make use of autowiring or FQN.'
deprecated: 'The "%alias_id%" service alias is deprecated, make use of autowiring or FQN.'

fh_webpack.stats_parser:
alias: FH\WebpackStats\Parser\StandardParser
# next line can be enabled when Symfony 4.3 becomes the minimal supported version
#deprecated: 'The "%alias_id%" service alias is deprecated, make use of autowiring or FQN.'
deprecated: 'The "%alias_id%" service alias is deprecated, make use of autowiring or FQN.'
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* file that was distributed with this source code.
*/

namespace Tests\DependencyInjection;
namespace FH\Bundle\WebpackBundle\Tests\DependencyInjection;

use FH\Bundle\WebpackBundle\DependencyInjection\Configuration;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Templating/WebpackHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* file that was distributed with this source code.
*/

namespace Tests\Templating;
namespace FH\Bundle\WebpackBundle\Tests\Templating;

use FH\Bundle\WebpackBundle\Templating\WebpackHelper;
use FH\WebpackStats\Parser\StandardParser;
Expand Down
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
"email": "info@freshheads.com",
"issues": "https://github.com/freshheads/FHWebpackBundle/issues"
},
"require-dev": {
"phpunit/phpunit": "^8.4"
},
"require": {
"php": "^7.2",
"symfony/asset": "^3.4 || ^4.0 || ^5.0",
"symfony/config": "^3.4 || ^4.0 || ^5.0",
"symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0",
"symfony/event-dispatcher": "^3.4 || ^4.0 || ^5.0",
"symfony/http-kernel": "^3.4 || ^4.0 || ^5.0",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0",
"symfony/twig-bundle": "^3.4 || ^4.0 || ^5.0",
"symfony/templating": "^3.4 || ^4.0 || ^5.0",
"twig/twig" : "^2.0 || ^3.0",
"symfony/asset": "^4.4 | ^5.0",
"symfony/config": "^4.4 | ^5.0",
"symfony/dependency-injection": "^4.4 | ^5.0",
"symfony/event-dispatcher": "^4.4 | ^5.0",
"symfony/http-kernel": "^4.4 | ^5.0",
"symfony/yaml": "^4.4 | ^5.0",
"symfony/twig-bundle": "^4.4 | ^5.0",
"symfony/templating": "^4.4 | ^5.0",
"twig/twig" : "^2.0 | ^3.0",
"freshheads/webpack-stats": "^1.1"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.4 | ^5.0"
},
"scripts": {
"test": "vendor/bin/phpunit --color=always"
"test": "vendor/bin/simple-phpunit --color=always --testdox"
},
"autoload": {
"psr-4": { "FH\\Bundle\\WebpackBundle\\": "" }
Expand Down

0 comments on commit 8ba5391

Please sign in to comment.