Skip to content

Commit 039bb24

Browse files
committed
minor #117 Updating license headers & automating (weaverryan)
This PR was merged into the 1.0-dev branch. Discussion ---------- Updating license headers & automating Just a chore :). Now `php-cs-fixer` can add these headers. Also fixed the name of the package. Commits ------- 91e6ce0 updating license headers
2 parents 30d2a0c + 91e6ce0 commit 039bb24

35 files changed

+82
-34
lines changed

.php_cs.dist

+12-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@ return PhpCsFixer\Config::create()
77
->setRules(array(
88
'@Symfony' => true,
99
'@Symfony:risky' => true,
10-
'array_syntax' => array('syntax' => 'short'),
10+
'array_syntax' => ['syntax' => 'short'],
1111
'protected_to_private' => false,
1212
'semicolon_after_instruction' => false,
13+
'header_comment' => [
14+
'header' => <<<EOF
15+
This file is part of the Symfony MakerBundle package.
16+
17+
(c) Fabien Potencier <[email protected]>
18+
19+
For the full copyright and license information, please view the LICENSE
20+
file that was distributed with this source code.
21+
EOF
22+
]
1323
))
1424
->setRiskyAllowed(true)
1525
->setFinder(
1626
PhpCsFixer\Finder::create()
1727
->in(__DIR__.'/src')
1828
)
19-
;
29+
;

src/ApplicationAwareMakerInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Command/MakerCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/ConsoleStyle.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/DependencyBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/DependencyInjection/CompilerPass/MakeCommandRegistrationPass.php

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\DependencyInjection\CompilerPass;
413

514
use Symfony\Bundle\MakerBundle\Command\MakerCommand;

src/DependencyInjection/MakerExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Event/ConsoleErrorSubscriber.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/EventRegistry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Exception/RuntimeCommandException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/ExtraGenerationMakerInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/FileManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Generator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/InputConfiguration.php

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle;
413

514
final class InputConfiguration

src/Maker/AbstractMaker.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeAuthenticator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeEntity.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeFunctionalTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeMigration.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeSerializerEncoder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeSubscriber.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeTwigExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeUnitTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Maker/MakeVoter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/MakerBundle.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/MakerInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Resources/test/.php_cs.test

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/*
3+
* php-cs-fixer configuration file used to validate
4+
* generated code in our tests.
5+
*/
6+
return PhpCsFixer\Config::create()
7+
->setRules(array(
8+
'@Symfony' => true,
9+
'@Symfony:risky' => true,
10+
'array_syntax' => ['syntax' => 'short'],
11+
))
12+
->setRiskyAllowed(true)
13+
;

src/Str.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Test/MakerTestCase.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*
@@ -88,7 +88,14 @@ protected function executeMakerCommand(MakerTestDetails $testDetails)
8888

8989
$files = $this->getGeneratedPhpFilesFromOutputText($makerProcess->getOutput());
9090
foreach ($files as $file) {
91-
$process = $this->createProcess(sprintf('php vendor/bin/php-cs-fixer fix --dry-run --diff %s', self::$currentRootDir.'/'.$file), __DIR__.'/../../');
91+
$process = $this->createProcess(
92+
sprintf(
93+
'php vendor/bin/php-cs-fixer --config=%s fix --dry-run --diff %s',
94+
__DIR__.'/../Resources/test/.php_cs.test',
95+
self::$currentRootDir.'/'.$file
96+
),
97+
__DIR__.'/../../'
98+
);
9299
$process->run();
93100
$this->assertTrue($process->isSuccessful(), sprintf('File "%s" has a php-cs problem: %s', $file, $process->getOutput()));
94101
}

src/Test/MakerTestDetails.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

src/Validator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Symfony package.
4+
* This file is part of the Symfony MakerBundle package.
55
*
66
* (c) Fabien Potencier <[email protected]>
77
*

0 commit comments

Comments
 (0)