Skip to content

Commit 93049a5

Browse files
init refacto
1 parent 0366320 commit 93049a5

25 files changed

+382
-565
lines changed

CleverAgeDoctrineProcessBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* This file is part of the CleverAge/DoctrineProcessBundle package.
44
*
5-
* Copyright (C) 2017-2019 Clever-Age
5+
* Copyright (C) 2017-2023 Clever-Age
66
*
77
* For the full copyright and license information, please view the LICENSE
88
* file that was distributed with this source code.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ See process bundle documentation
66
- Reference
77
- Tasks
88
- Entities
9-
- [DoctrineReaderTask](Documentation/reference/task/doctrine_reader_task.md)
10-
- [DoctrineWriterTask](Documentation/reference/task/doctrine_writer_task.md)
9+
- [DoctrineReaderTask](src/Documentation/reference/task/doctrine_reader_task.md)
10+
- [DoctrineWriterTask](src/Documentation/reference/task/doctrine_writer_task.md)

Task/EntityManager/AbstractDoctrineTask.php

Lines changed: 0 additions & 65 deletions
This file was deleted.

Task/EntityManager/DoctrineWriterTask.php

Lines changed: 0 additions & 94 deletions
This file was deleted.

composer.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,39 @@
3030
"email": "[email protected]",
3131
"homepage": "https://github.com/mveyrenc",
3232
"role": "Developer"
33+
},
34+
{
35+
"name": "Xavier Marchegay",
36+
"email": "[email protected]",
37+
"homepage": "https://github.com/xaviermarchegay",
38+
"role": "Lead Developer"
3339
}
3440
],
3541
"autoload": {
3642
"psr-4": {
37-
"CleverAge\\DoctrineProcessBundle\\": ""
43+
"CleverAge\\DoctrineProcessBundle\\": "src/"
3844
}
3945
},
4046
"require": {
41-
"cleverage/process-bundle": "3.*|dev-v3.0-dev",
42-
"doctrine/orm": "~2.5",
43-
"doctrine/doctrine-bundle": "~1.6|~2.0"
47+
"cleverage/process-bundle": "dev-v4-dev",
48+
"doctrine/orm": "^2",
49+
"doctrine/doctrine-bundle": "^2"
4450
},
4551
"require-dev": {
46-
"phpunit/phpunit": "~6.4"
52+
"roave/security-advisories": "dev-latest",
53+
"phpunit/phpunit": "*",
54+
"phpstan/phpstan": "*",
55+
"phpstan/phpstan-symfony": "*",
56+
"phpstan/extension-installer": "*",
57+
"rector/rector": "*",
58+
"symplify/easy-coding-standard": "*",
59+
"symplify/phpstan-rules": "*",
60+
"symfony/test-pack": "^1.1"
61+
},
62+
"config": {
63+
"allow-plugins": {
64+
"phpstan/extension-installer": true,
65+
"symfony/flex": true
66+
}
4767
}
4868
}

ecs.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff;
6+
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
7+
use Symplify\EasyCodingStandard\Config\ECSConfig;
8+
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
9+
10+
return static function (ECSConfig $ecsConfig): void {
11+
$ecsConfig->rule(LineLengthFixer::class);
12+
13+
$ecsConfig->sets([
14+
SetList::CLEAN_CODE,
15+
SetList::SYMPLIFY,
16+
SetList::COMMON,
17+
SetList::PSR_12,
18+
SetList::DOCTRINE_ANNOTATIONS,
19+
]);
20+
21+
$ecsConfig->paths([__DIR__ . '/src']);
22+
23+
$ecsConfig->skip([AssignmentInConditionSniff::class]);
24+
};

phpstan.neon

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
parameters:
2+
level: 6
3+
paths:
4+
- src
5+
excludePaths:
6+
- ecs.php
7+
- vendor/*
8+
- tests/*
9+
- rector.php
10+
- var/*
11+
- src/Resources/tests/*
12+
ignoreErrors:
13+
- '#type has no value type specified in iterable type#'
14+
- '#has parameter .* with no value type specified in iterable type#'
15+
- '#has no value type specified in iterable type array#'
16+
- '#configureOptions\(\) has no return type specified.#'
17+
- '#configure\(\) has no return type specified#'
18+
- '#process\(\) has no return type specified#'
19+
- '#should return Iterator but returns Traversable#'
20+
- '#Negated boolean expression is always false#'
21+
checkGenericClassInNonGenericObjectType: false
22+
reportUnmatchedIgnoredErrors: false
23+
inferPrivatePropertyTypeFromConstructor: true
24+
treatPhpDocTypesAsCertain: false

rector.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
use Rector\Core\ValueObject\PhpVersion;
7+
use Rector\Set\ValueObject\LevelSetList;
8+
use Rector\Set\ValueObject\SetList;
9+
use Rector\Symfony\Set\SymfonyLevelSetList;
10+
11+
return static function (RectorConfig $rectorConfig): void {
12+
$rectorConfig->parallel();
13+
$rectorConfig->importNames();
14+
$rectorConfig->importShortClasses();
15+
16+
$rectorConfig->paths([__DIR__ . '/src']);
17+
18+
$rectorConfig->sets([
19+
SetList::TYPE_DECLARATION,
20+
LevelSetList::UP_TO_PHP_81,
21+
SymfonyLevelSetList::UP_TO_SYMFONY_62,
22+
]);
23+
24+
$rectorConfig->phpVersion(PhpVersion::PHP_81);
25+
};

DependencyInjection/CleverAgeDoctrineProcessExtension.php renamed to src/DependencyInjection/CleverAgeDoctrineProcessExtension.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
4+
25
/**
36
* This file is part of the CleverAge/DoctrineProcessBundle package.
47
*
5-
* Copyright (C) 2017-2019 Clever-Age
8+
* Copyright (C) 2017-2023 Clever-Age
69
*
710
* For the full copyright and license information, please view the LICENSE
811
* file that was distributed with this source code.
@@ -19,21 +22,12 @@
1922
* This is the class that loads and manages your bundle configuration.
2023
*
2124
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
22-
*
23-
* @author Valentin Clavreul <[email protected]>
24-
* @author Vincent Chalnot <[email protected]>
25-
* @author Madeline Veyrenc <[email protected]>
2625
*/
2726
class CleverAgeDoctrineProcessExtension extends Extension
2827
{
29-
/**
30-
* {@inheritdoc}
31-
*
32-
* @throws \Exception
33-
*/
34-
public function load(array $configs, ContainerBuilder $container)
28+
public function load(array $configs, ContainerBuilder $container): void
3529
{
36-
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30+
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
3731
$loader->load('services.yaml');
3832
}
3933
}

Documentation/reference/task/doctrine_reader_task.md renamed to src/Documentation/reference/task/doctrine_reader_task.md

File renamed without changes.

0 commit comments

Comments
 (0)