Skip to content

Commit

Permalink
Merge pull request #19 from lightSAML/tmilos-patch-1
Browse files Browse the repository at this point in the history
Update .php_cs to newer version
  • Loading branch information
tmilos committed Feb 23, 2018
2 parents 401720d + f1e2f36 commit 9b64b2e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
19 changes: 11 additions & 8 deletions .php_cs
@@ -1,6 +1,6 @@
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
$finder = PhpCsFixer\Finder::create()
->in('src')
;

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

Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);

return Symfony\CS\Config\Config::create()
->setUsingCache(true)
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers(array('-empty_return', '-phpdoc_no_empty_return', 'header_comment'))
->finder($finder)
return PhpCsFixer\Config::create()
->setRules(array(
'@Symfony' => true,
'simplified_null_return' => false,
'phpdoc_no_empty_return' => false,
'no_mixed_echo_print' => ['use' => 'print'],
'header_comment' => ['header' => $header],
))
->setUsingCache(false)
->setFinder($finder)
;
15 changes: 8 additions & 7 deletions .travis.yml
@@ -1,27 +1,28 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- hhvm
- 7.1

matrix:
include:
- php: 5.5
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"

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

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

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

after_script:
- php bin/coveralls -v
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then php bin/coveralls -v; fi
Expand Up @@ -41,4 +41,9 @@ public function getNameIdProvider()
{
return $this->container->get('lightsaml.provider.name_id');
}

public function getAttributeNameProvider()
{
return $this->container->get('lightsaml.provider.attribute_name');
}
}
Expand Up @@ -157,7 +157,7 @@ private function configureParty(ContainerBuilder $container, array $config)
foreach ($config['party']['idp']['files'] as $id => $file) {
$id = sprintf('lightsaml.party.idp_entity_descriptor_store.file.%s', $id);

if(class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) {
if (class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) {
// Symfony >= 3.3
$container
->setDefinition($id, new ChildDefinition('lightsaml.party.idp_entity_descriptor_store.file'))
Expand Down
Expand Up @@ -21,7 +21,7 @@ public function test_process_does_nothing_if_container_does_not_have_the_service

$pass->process($containerBuilder);

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

public function test_process_adds_calls_to_service_with_argument_reference_to_all_tagged_services()
Expand Down

0 comments on commit 9b64b2e

Please sign in to comment.