Skip to content

Update dependency azjezz/psl to v3 #800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2024
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Tool to compare two revisions of a public API to check for BC breaks",
"require": {
"php": "~8.2.0 || ~8.3.0",
"azjezz/psl": "^2.9.1",
"azjezz/psl": "^3.0.2",
"composer/composer": "^2.7.6",
"nikic/php-parser": "^4.19.1",
"nikolaposa/version": "^4.2.0",
Expand Down
37 changes: 19 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions test/unit/Command/AssertBackwardsCompatibleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public function testDefinition(): void

public function testExecuteWhenRevisionsAreProvidedAsOptions(): void
{
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();

$this->input->method('getOption')->willReturnMap([
['from', $fromSha],
Expand Down Expand Up @@ -191,8 +191,8 @@ public function testExecuteWhenRevisionsAreProvidedAsOptions(): void

public function testExecuteWhenDevelopmentDependenciesAreRequested(): void
{
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();

$this->input->method('getOption')->willReturnMap([
['from', $fromSha],
Expand Down Expand Up @@ -256,8 +256,8 @@ public function testExecuteWhenDevelopmentDependenciesAreRequested(): void

public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void
{
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();

$this->input->method('getOption')->willReturnMap([
['from', $fromSha],
Expand Down Expand Up @@ -334,8 +334,8 @@ public function testExecuteReturnsNonZeroExitCodeWhenChangesAreDetected(): void

public function testProvidingMarkdownOptionWritesMarkdownOutput(): void
{
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();

$this->input->method('getOption')->willReturnMap([
['from', $fromSha],
Expand Down Expand Up @@ -449,8 +449,8 @@ public function testExecuteWithDefaultRevisionsNotProvidedAndNoDetectedTags(): v
/** @dataProvider validVersionCollections */
public function testExecuteWithDefaultRevisionsNotProvided(VersionCollection $versions): void
{
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)->update('toRevision')->finalize();
$fromSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('fromRevision')->finalize();
$toSha = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)->update('toRevision')->finalize();
$pickedVersion = $this->makeVersion('1.0.0');

$this->input->method('getOption')->willReturnMap([
Expand Down
4 changes: 2 additions & 2 deletions test/unit/Git/RevisionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class RevisionTest extends TestCase
{
public function testFromSha1WithValidSha1(): void
{
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)
->update(SecureRandom\string(8))
->finalize();

Expand All @@ -25,7 +25,7 @@ public function testFromSha1WithValidSha1(): void

public function testFromSha1WithNewlinesStillProvidesValidSha1(): void
{
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::SHA1)
$sha1 = Hash\Context::forAlgorithm(Hash\Algorithm::Sha1)
->update(SecureRandom\string(8))
->finalize();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function setUp(): void
public function testRejectsEmptyKeys(): void
{
$this->expectException(CoercionException::class);
$this->expectExceptionMessage('Could not coerce "string" to type "non-empty-string".');
$this->expectExceptionMessage('Could not coerce "string" to type "dict<non-empty-string, non-empty-string>" at path "key()".');

new StaticClassMapSourceLocator(
['' => __FILE__],
Expand Down