Skip to content

Commit 9b64b2e

Browse files
authored
Merge pull request #19 from lightSAML/tmilos-patch-1
Update .php_cs to newer version
2 parents 401720d + f1e2f36 commit 9b64b2e

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

.php_cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
$finder = Symfony\CS\Finder\DefaultFinder::create()
3+
$finder = PhpCsFixer\Finder::create()
44
->in('src')
55
;
66

@@ -13,11 +13,14 @@ This source file is subject to the MIT license that is bundled
1313
with this source code in the file LICENSE.
1414
EOT;
1515

16-
Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
17-
18-
return Symfony\CS\Config\Config::create()
19-
->setUsingCache(true)
20-
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
21-
->fixers(array('-empty_return', '-phpdoc_no_empty_return', 'header_comment'))
22-
->finder($finder)
16+
return PhpCsFixer\Config::create()
17+
->setRules(array(
18+
'@Symfony' => true,
19+
'simplified_null_return' => false,
20+
'phpdoc_no_empty_return' => false,
21+
'no_mixed_echo_print' => ['use' => 'print'],
22+
'header_comment' => ['header' => $header],
23+
))
24+
->setUsingCache(false)
25+
->setFinder($finder)
2326
;

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
language: php
22

33
php:
4-
- 5.5
54
- 5.6
65
- 7.0
7-
- hhvm
6+
- 7.1
87

98
matrix:
109
include:
11-
- php: 5.5
10+
- php: 5.6
1211
env: COMPOSER_FLAGS="--prefer-lowest"
1312

1413
before_install:
1514
- composer self-update
1615
- composer --version
17-
- wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer.phar
16+
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer.phar; fi
17+
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then php php-cs-fixer.phar --version; fi
1818

1919
install:
2020
- COMPOSER_ROOT_VERSION=dev-master composer update --prefer-source $COMPOSER_FLAGS
2121

2222
script:
23-
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php php-cs-fixer.phar fix --dry-run -v; fi
24-
- bin/phpunit --coverage-clover build/logs/clover.xml
23+
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then php php-cs-fixer.phar fix --dry-run -v; fi
24+
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then bin/phpunit --coverage-clover build/logs/clover.xml; fi
25+
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ]; then bin/phpunit; fi
2526

2627
after_script:
27-
- php bin/coveralls -v
28+
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then php bin/coveralls -v; fi

src/LightSaml/SymfonyBridgeBundle/Bridge/Container/ProviderContainer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ public function getNameIdProvider()
4141
{
4242
return $this->container->get('lightsaml.provider.name_id');
4343
}
44+
45+
public function getAttributeNameProvider()
46+
{
47+
return $this->container->get('lightsaml.provider.attribute_name');
48+
}
4449
}

src/LightSaml/SymfonyBridgeBundle/DependencyInjection/LightSamlSymfonyBridgeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private function configureParty(ContainerBuilder $container, array $config)
157157
foreach ($config['party']['idp']['files'] as $id => $file) {
158158
$id = sprintf('lightsaml.party.idp_entity_descriptor_store.file.%s', $id);
159159

160-
if(class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) {
160+
if (class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) {
161161
// Symfony >= 3.3
162162
$container
163163
->setDefinition($id, new ChildDefinition('lightsaml.party.idp_entity_descriptor_store.file'))

tests/LightSaml/SymfonyBridgeBundle/Tests/DependencyInjection/Compiler/AddMethodCallCompilerPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function test_process_does_nothing_if_container_does_not_have_the_service
2121

2222
$pass->process($containerBuilder);
2323

24-
$this->assertCount(0, $containerBuilder->getDefinitions());
24+
$this->assertFalse($containerBuilder->hasDefinition($serviceId));
2525
}
2626

2727
public function test_process_adds_calls_to_service_with_argument_reference_to_all_tagged_services()

0 commit comments

Comments
 (0)