Skip to content

Conversation

@scollovati
Copy link
Contributor

Creates fixture for #36

@samsonasik
Copy link
Member

test seems green, are you sure it is not different rule or you're using latest version?

@scollovati
Copy link
Contributor Author

test seems green, are you sure it is not different rule or you're using latest version?

Let me check. I tried to replicate the example provided here #36 (comment), but probably I misunderstood how to properly create the fixture.

final class SkipDefault
{
public function dontSetParamValue(
string $Id = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type should be union per issue example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I am not undestanding how to create the fixture. The bug reported is here: #36 (comment) and in that case the parameter has only one type (int in that case).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probaly the second one #36 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to give you a fixture for the issue that I reported, i.e. the fact that a method called without setting the default value is reported as an error.

@TomasVotruba
Copy link
Member

TomasVotruba commented May 1, 2025

Just merging this PR, so we have this fixture in our test suite and to avoid conflicts.

In case the problem is there in your codebase, please create a test fixture that fails on current test suite.

You can verify this by running test locally first:

vendor/bin/phpunit

Thanks for understanding

@TomasVotruba TomasVotruba merged commit 72ef5ca into rectorphp:main May 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants