You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
{
"fqcn": "App\Application\Foo",
"line": 1,
"error": "depends on App\\Ui\\Bar, but should not depend on these namespaces: App\\Ui\\*, App\\Tests\\* because of component architecture"
},
{
"fqcn": "App\Application\Foo",
"line": 3,
"error": "depends on App\\Ui\\Baz, but should not depend on these namespaces: App\\Ui\\*, App\\Tests\\* because of component architecture"
},
{
"fqcn": "App\Application\Foo",
"line": 2,
"error": "depends on App\\Ui\\Bar, but should not depend on these namespaces: App\\Ui\\*, App\\Tests\\* because of component architecture"
},
}
What happens is that when doing the phparkitect check --ignore-baseline-linenumbers, the function used to remove in the udiff is check for the error and fqn first and then spaceship the sort -- and that messes up the cursor in one of the arrays and not fully cleaning up post doing it. In the case above we could be NOT removing the line 3 (BAZ) because it moved the cursor past that error when looking for BAR
How to reproduce
This is a little tricky, you basically need to create a baseline where the initial sorting using lines differ from the sort when ignoring lines. I can't share the current baseline where this happens because is from my company and I'm not allowed to do that.
Expected behavior
Everything that is on my baseline should be removed. Doing phparkitect generate-baseline and post phparkictect check --ignore-baseline-numbers should ALWAYS be successful. Because the initial sorting is taking in consideration lines, and later during comparing is not fully trusting that sort, it's breaking this removal.
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
Current behavior
Let's assume we have the following
What happens is that when doing the
phparkitect check --ignore-baseline-linenumbers
, the function used to remove in theudiff
is check for the error and fqn first and then spaceship the sort -- and that messes up the cursor in one of the arrays and not fully cleaning up post doing it. In the case above we could be NOT removing the line 3 (BAZ) because it moved the cursor past that error when looking for BARHow to reproduce
This is a little tricky, you basically need to create a baseline where the initial sorting using lines differ from the sort when ignoring lines. I can't share the current baseline where this happens because is from my company and I'm not allowed to do that.
Expected behavior
Everything that is on my baseline should be removed. Doing
phparkitect generate-baseline
and postphparkictect check --ignore-baseline-numbers
should ALWAYS be successful. Because the initial sorting is taking in consideration lines, and later during comparing is not fully trusting that sort, it's breaking this removal.The text was updated successfully, but these errors were encountered: