This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from symplify/move-source-here
Move symplify/packages/package-builder source here
- Loading branch information
Showing
16 changed files
with
238 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Code Analysis | ||
|
||
on: | ||
pull_request: null | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
# see https://github.com/composer/composer/issues/9368#issuecomment-718112361 | ||
COMPOSER_ROOT_VERSION: "dev-main" | ||
|
||
jobs: | ||
code_analysis: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
actions: | ||
- | ||
name: 'PHPStan' | ||
run: composer phpstan --ansi | ||
|
||
- | ||
name: 'Composer Validate' | ||
run: composer validate --ansi | ||
|
||
- | ||
name: 'Rector' | ||
run: composer rector --ansi | ||
|
||
- | ||
name: 'Coding Standard' | ||
run: composer fix-cs --ansi | ||
|
||
- | ||
name: 'Tests' | ||
run: vendor/bin/phpunit | ||
|
||
- | ||
name: 'PHP Linter' | ||
run: vendor/bin/parallel-lint src tests | ||
|
||
- | ||
name: 'Check Commented Code' | ||
run: vendor/bin/easy-ci check-commented-code src tests --ansi | ||
|
||
- | ||
name: 'Check Active Classes' | ||
run: vendor/bin/easy-ci check-active-class src --ansi | ||
|
||
name: ${{ matrix.actions.name }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# see https://github.com/shivammathur/setup-php | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
# composer install cache - https://github.com/ramsey/composer-install | ||
- uses: "ramsey/composer-install@v2" | ||
|
||
- run: ${{ matrix.actions.run }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symplify\PackageBuilder\DependencyInjection\CompilerPass\AutowireInterfacesCompilerPass; | ||
use Symplify\EasyCI\Config\EasyCIConfig; | ||
|
||
return static function (EasyCIConfig $easyCIConfig): void { | ||
$easyCIConfig->typesToSkip([ | ||
AutowireInterfacesCompilerPass::class, | ||
]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
use Symplify\EasyCodingStandard\ValueObject\Set\SetList; | ||
|
||
return static function (ECSConfig $ecsConfig): void { | ||
$ecsConfig->paths([ | ||
__DIR__ . '/ecs.php', | ||
__DIR__ . '/rector.php', | ||
__DIR__ . '/easy-ci.php', | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]); | ||
|
||
$ecsConfig->sets([ | ||
SetList::COMMON, | ||
SetList::PSR_12, | ||
]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$path of function dirname expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: src/Composer/VendorDirProvider.php | ||
|
||
- | ||
message: "#^Call to an undefined method Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\:\\:getParameterBag\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Parameter/ParameterProvider.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#" | ||
count: 1 | ||
path: src/Reflection/ClassLikeExistenceChecker.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#" | ||
count: 2 | ||
path: src/Reflection/PrivatesCaller.php | ||
|
||
- | ||
message: "#^Call to method setConfigs\\(\\) on an unknown class Symplify\\\\PackageBuilder\\\\Contract\\\\HttpKernel\\\\ExtraConfigAwareKernelInterface\\.$#" | ||
count: 1 | ||
path: src/Testing/AbstractKernelTestCase.php | ||
|
||
- | ||
message: "#^Class Symplify\\\\PackageBuilder\\\\Contract\\\\HttpKernel\\\\ExtraConfigAwareKernelInterface not found\\.$#" | ||
count: 2 | ||
path: src/Testing/AbstractKernelTestCase.php | ||
|
||
- | ||
message: "#^PHPDoc tag @var for variable \\$kernel contains unknown class Symplify\\\\PackageBuilder\\\\Contract\\\\HttpKernel\\\\ExtraConfigAwareKernelInterface\\.$#" | ||
count: 1 | ||
path: src/Testing/AbstractKernelTestCase.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$kernel of method Symplify\\\\PackageBuilder\\\\Testing\\\\AbstractKernelTestCase\\:\\:bootAndReturnKernel\\(\\) expects Symfony\\\\Component\\\\HttpKernel\\\\KernelInterface, Symplify\\\\PackageBuilder\\\\Contract\\\\HttpKernel\\\\ExtraConfigAwareKernelInterface given\\.$#" | ||
count: 1 | ||
path: src/Testing/AbstractKernelTestCase.php | ||
|
||
- | ||
message: "#^Static property Symplify\\\\PackageBuilder\\\\Testing\\\\AbstractKernelTestCase\\:\\:\\$container \\(Symfony\\\\Component\\\\DependencyInjection\\\\ContainerInterface\\|null\\) does not accept Psr\\\\Container\\\\ContainerInterface\\.$#" | ||
count: 2 | ||
path: src/Testing/AbstractKernelTestCase.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
|
||
parameters: | ||
level: 8 | ||
|
||
paths: | ||
- src | ||
- tests | ||
|
||
excludePaths: | ||
- '*/tests/**/Source/*' | ||
- '*/tests/**/Fixture/*' | ||
- '*/tests/**/data/*' | ||
|
||
unused_public: | ||
methods: true | ||
properties: true | ||
constants: true | ||
|
||
ignoreErrors: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
use Rector\PHPUnit\Set\PHPUnitSetList; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
use Rector\Set\ValueObject\SetList; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->sets([ | ||
SetList::CODE_QUALITY, | ||
SetList::DEAD_CODE, | ||
LevelSetList::UP_TO_PHP_81, | ||
SetList::CODING_STYLE, | ||
SetList::TYPE_DECLARATION, | ||
SetList::NAMING, | ||
SetList::PRIVATIZATION, | ||
SetList::EARLY_RETURN, | ||
PHPUnitSetList::PHPUNIT_CODE_QUALITY, | ||
]); | ||
|
||
$rectorConfig->paths([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]); | ||
|
||
$rectorConfig->importNames(); | ||
|
||
$rectorConfig->skip([ | ||
'*/Source/*', | ||
'*/Fixture/*', | ||
]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters