Skip to content

Commit a1f761e

Browse files
committed
ci(composer): add new scripts for blade-formatter, mago, php-cs-fixer, todo-lint, and zizmor
- Introduce blade-formatter scripts to format and check Blade template files - Add multiple mago scripts for formatting, linting, initialization, and rule listing - Add php-cs-fixer script for code style fixing with progress and diff output - Include todo-lint script to detect TODO and FIXME comments in PHP files excluding Blade templates and resources - Add zizmor script for verbose linting of the .github directory - Update style-fix and style-lint scripts to use php-cs-fixer alias without extra options - Fix vhs script to use correct input file "vhs.tape" instead of "music-dl.tape" Signed-off-by: guanguans <ityaozm@gmail.com>
1 parent 3177d6e commit a1f761e

File tree

7 files changed

+272
-226
lines changed

7 files changed

+272
-226
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --ansi -v
3939

4040
- name: Execute tests
41-
run: composer test-coverage
41+
run: composer test:coverage
4242

4343
- name: Upload coverage to Codecov
4444
uses: codecov/codecov-action@v5

.gitleaksignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# https://github.com/gitleaks/gitleaks/blob/master/.gitleaksignore
2+
tests/__snapshots__/HasOptionsTest__it_can_normalize_options__1.json:generic-api-key:24
3+
tests/__snapshots__/HasOptionsTest__it_can_normalize_options__1.json:generic-api-key:26
4+
tests/__snapshots__/HasOptionsTest__it_can_normalize_options__1.json:generic-api-key:75

composer-bump

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ $status = (new SingleCommandApplication)
3535
->addOption('composer-json-path', null, InputOption::VALUE_OPTIONAL)
3636
->addOption('highest-php-binary', null, InputOption::VALUE_REQUIRED)
3737
->addOption('composer-binary', null, InputOption::VALUE_OPTIONAL)
38-
->addOption('except-packages', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL)
39-
->addOption('except-dependency-versions', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL)
38+
->addOption('except-package', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL)
39+
->addOption('except-dependency-version', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL)
4040
->setCode(function (InputInterface $input, OutputInterface $output): void {
4141
assert_options(\ASSERT_BAIL, 1);
4242
\assert($this instanceof SingleCommandApplication);
@@ -46,8 +46,8 @@ $status = (new SingleCommandApplication)
4646
$input->getOption('composer-json-path') ?: __DIR__.'/composer.json',
4747
$input->getOption('highest-php-binary'),
4848
$input->getOption('composer-binary'),
49-
$input->getOption('except-packages'),
50-
$input->getOption('except-dependency-versions'),
49+
$input->getOption('except-package'),
50+
$input->getOption('except-dependency-version'),
5151
new SymfonyStyle($input, $output),
5252
) {
5353
private readonly string $composerJsonPath;

composer.json

Lines changed: 259 additions & 208 deletions
Large diffs are not rendered by default.

gitleaks-baseline.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

src/Concerns/ConcreteMagic.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@
1818
*/
1919
trait ConcreteMagic
2020
{
21-
// public function __sleep(): array
22-
// {
23-
// return ['options', 'soarBinary'];
24-
// }
25-
//
26-
// public function __wakeup(): void
27-
// {
28-
// $this->setOptions($this->options);
29-
// $this->setSoarBinary($this->soarBinary);
30-
// }
3121
/**
3222
* @since PHP 7.4.0
3323
*

src/Support/OS.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
*/
2525
class OS
2626
{
27-
public const ARM = 'arm';
28-
public const PPC = 'ppc';
29-
public const X86 = 'x86';
27+
private const ARM = 'arm';
28+
private const PPC = 'ppc';
29+
private const X86 = 'x86';
3030
private const RegExARM = '/(aarch*|arm*)/';
3131
private const RegExPPC = '/(ppc*)/';
3232
private const RegExX86 = '/(x86*|i386|i686)/';

0 commit comments

Comments
 (0)