Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **A guard now keeps literal credentials out of the tests**, and every generated credential's
purpose a single word. `NoLiteralCredentialsTest` runs package-tools' `AssertsNoLiteralCredentials`
over `tests/`, so secret scanning has nothing to report. Requires
`laranail/package-tools ^0.1.10`.
- `laranail::pdf.install` now extends laranail/package-tools' `InstallCommand` and takes
laranail/console's display API and run lifecycle from its `InteractsWithConsoleServices` and
`InteractsWithConsoleWriter` traits instead of its `Command` base. Name, option, description,
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"illuminate/http": "^13.0",
"illuminate/support": "^13.0",
"laranail/console": "^0.1",
"laranail/package-tools": "^0.1",
"laranail/package-tools": "^0.1.10",
"psr/http-message": "^1.1 || ^2.0",
"psr/log": "^3.0"
},
Expand Down
24 changes: 24 additions & 0 deletions tests/Arch/NoLiteralCredentialsTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

use Simtabi\Laranail\Package\Tools\Testing\AssertsNoLiteralCredentials;

/*
* Secret scanning cannot tell a test password from a leaked one, and reports both. Tests take
* their credentials from TestCredentials at run time; this fails on any literal left behind, and
* on any generated credential whose purpose is not a single plain word.
*
* Measured 2026-10-19: 11 PHP files under tests/.
*/
uses(AssertsNoLiteralCredentials::class);

it('keeps literal credentials out of the tests', function (): void {
$this->assertNoLiteralCredentialsIn([dirname(__DIR__)], minFiles: 10);
expect(true)->toBeTrue();
});

it('names every generated credential with a single word', function (): void {
$this->assertCredentialPurposesAreWordsIn([dirname(__DIR__)], minFiles: 10);
expect(true)->toBeTrue();
});
Loading