1 | <?php |
||||
2 | |||||
3 | declare(strict_types=1); |
||||
4 | |||||
5 | use MonorepoBuilder\MostRecentTagResolver; |
||||
6 | use MonorepoBuilder\ProcessParser; |
||||
7 | use MonorepoBuilder\TagParserInterface; |
||||
8 | use MonorepoBuilder\ValidateVersionReleaseWorker; |
||||
9 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
||||
10 | use Symplify\MonorepoBuilder\Contract\Git\TagResolverInterface; |
||||
11 | use Symplify\MonorepoBuilder\ValueObject\Option; |
||||
12 | use Symplify\MonorepoBuilder\Release\ReleaseWorker\AddTagToChangelogReleaseWorker; |
||||
13 | use Symplify\MonorepoBuilder\Release\ReleaseWorker\PushNextDevReleaseWorker; |
||||
14 | use Symplify\MonorepoBuilder\Release\ReleaseWorker\PushTagReleaseWorker; |
||||
15 | use Symplify\MonorepoBuilder\Release\ReleaseWorker\SetCurrentMutualDependenciesReleaseWorker; |
||||
16 | use Symplify\MonorepoBuilder\Release\ReleaseWorker\SetNextMutualDependenciesReleaseWorker; |
||||
17 | use Symplify\MonorepoBuilder\Release\ReleaseWorker\TagVersionReleaseWorker; |
||||
18 | use Symplify\MonorepoBuilder\Release\ReleaseWorker\UpdateBranchAliasReleaseWorker; |
||||
19 | |||||
20 | /** |
||||
21 | * Monorepo Builder additional fields |
||||
22 | * |
||||
23 | * @see https://github.com/symplify/symplify/issues/2061 |
||||
24 | */ |
||||
25 | \register_shutdown_function(static function () { |
||||
26 | $dest = \json_decode(\file_get_contents(__DIR__ . '/composer.json'), true); |
||||
27 | |||||
28 | $result = [ |
||||
29 | 'name' => 'spiral/framework', |
||||
30 | 'type' => 'library', |
||||
31 | 'description' => $dest['description'] ?? '', |
||||
32 | 'homepage' => 'https://spiral.dev', |
||||
33 | 'license' => 'MIT', |
||||
34 | 'funding' => [ |
||||
35 | [ |
||||
36 | 'type' => 'github', |
||||
37 | 'url' => 'https://github.com/sponsors/spiral', |
||||
38 | ], |
||||
39 | ], |
||||
40 | 'support' => [ |
||||
41 | 'issues' => 'https://github.com/spiral/framework/issues', |
||||
42 | 'source' => 'https://github.com/spiral/framework', |
||||
43 | ], |
||||
44 | 'authors' => [ |
||||
45 | [ |
||||
46 | 'name' => 'Anton Titov (wolfy-j)', |
||||
47 | 'email' => '[email protected]', |
||||
48 | ], |
||||
49 | [ |
||||
50 | 'name' => 'Pavel Butchnev (butschster)', |
||||
51 | 'email' => '[email protected]', |
||||
52 | ], |
||||
53 | [ |
||||
54 | 'name' => 'Aleksei Gagarin (roxblnfk)', |
||||
55 | 'email' => '[email protected]', |
||||
56 | ], |
||||
57 | [ |
||||
58 | 'name' => 'Maksim Smakouz (msmakouz)', |
||||
59 | 'email' => '[email protected]', |
||||
60 | ], |
||||
61 | ], |
||||
62 | 'require' => $dest['require'] ?? [], |
||||
63 | 'autoload' => $dest['autoload'] ?? [], |
||||
64 | 'require-dev' => $dest['require-dev'] ?? [], |
||||
65 | 'autoload-dev' => $dest['autoload-dev'] ?? [], |
||||
66 | 'replace' => $dest['replace'] ?? [], |
||||
67 | 'scripts' => $dest['scripts'] ?? [], |
||||
68 | 'extra' => $dest['extra'] ?? [], |
||||
69 | 'config' => $dest['config'] ?? [], |
||||
70 | 'minimum-stability' => $dest['minimum-stability'] ?? 'dev', |
||||
71 | 'prefer-stable' => $dest['prefer-stable'] ?? true, |
||||
72 | ]; |
||||
73 | |||||
74 | $json = \json_encode($result, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES); |
||||
75 | |||||
76 | \file_put_contents(__DIR__ . '/composer.json', $json . "\n"); |
||||
77 | }); |
||||
78 | |||||
79 | |||||
80 | return static function (ContainerConfigurator $containerConfigurator): void { |
||||
81 | $parameters = $containerConfigurator->parameters(); |
||||
82 | |||||
83 | $parameters->set(Option::PACKAGE_ALIAS_FORMAT, '<major>.<minor>.x-dev'); |
||||
0 ignored issues
–
show
|
|||||
84 | $parameters->set(Option::PACKAGE_DIRECTORIES, ['src']); |
||||
0 ignored issues
–
show
The constant
Symplify\MonorepoBuilder...on::PACKAGE_DIRECTORIES has been deprecated: Use MBConfig instead
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This class constant has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the constant will be removed from the class and what other constant to use instead. ![]() |
|||||
85 | |||||
86 | $parameters->set(Option::DATA_TO_APPEND, [ |
||||
0 ignored issues
–
show
The constant
Symplify\MonorepoBuilder...\Option::DATA_TO_APPEND has been deprecated: Use MBConfig instead
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This class constant has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the constant will be removed from the class and what other constant to use instead. ![]() |
|||||
87 | 'type' => 'library', |
||||
88 | 'autoload' => [ |
||||
89 | 'files' => [ |
||||
90 | 'src/Framework/helpers.php', |
||||
91 | ], |
||||
92 | 'psr-4' => [ |
||||
93 | 'Spiral\\' => 'src/Framework', |
||||
94 | ], |
||||
95 | ], |
||||
96 | 'require' => [ |
||||
97 | 'spiral/composer-publish-plugin' => '^1.0', |
||||
98 | ], |
||||
99 | 'autoload-dev' => [ |
||||
100 | 'psr-4' => [ |
||||
101 | 'MonorepoBuilder\\' => 'builder', |
||||
102 | 'Spiral\\Tests\\Framework\\' => 'tests/Framework', |
||||
103 | 'Spiral\\App\\' => 'tests/app/src', |
||||
104 | ], |
||||
105 | ], |
||||
106 | 'require-dev' => [ |
||||
107 | 'phpunit/phpunit' => '^10.5.41', |
||||
108 | 'mockery/mockery' => '^1.6.12', |
||||
109 | 'spiral/code-style' => '^2.2.2', |
||||
110 | 'symplify/monorepo-builder' => '^10.3.3', |
||||
111 | 'vimeo/psalm' => '^6.0', |
||||
112 | ], |
||||
113 | 'conflict' => [ |
||||
114 | "spiral/roadrunner-bridge" => "<3.7", |
||||
115 | "spiral/sapi-bridge" => "<1.1" |
||||
116 | ], |
||||
117 | ]); |
||||
118 | |||||
119 | $services = $containerConfigurator->services(); |
||||
120 | |||||
121 | $services->set(TagResolverInterface::class, MostRecentTagResolver::class); |
||||
122 | $services->set(TagParserInterface::class, ProcessParser::class)->autowire(); |
||||
123 | |||||
124 | # release workers - in order to execute |
||||
125 | $services->set(ValidateVersionReleaseWorker::class); |
||||
126 | $services->set(SetCurrentMutualDependenciesReleaseWorker::class); |
||||
127 | $services->set(AddTagToChangelogReleaseWorker::class); |
||||
128 | $services->set(TagVersionReleaseWorker::class); |
||||
129 | $services->set(PushTagReleaseWorker::class); |
||||
130 | $services->set(SetNextMutualDependenciesReleaseWorker::class); |
||||
131 | $services->set(UpdateBranchAliasReleaseWorker::class); |
||||
132 | $services->set(PushNextDevReleaseWorker::class); |
||||
133 | }; |
||||
134 |
This class constant has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the constant will be removed from the class and what other constant to use instead.