Skip to content

Command node:list (ls): Fix wrong node counter #188

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 1 commit into from
Sep 2, 2018

Conversation

middlebrain
Copy link
Contributor

The displayed node counter for the 'ls' command is always set to 1.

@dantleech
Copy link
Member

Thanks for the PR, I'm not really in a position to test these changes at the moment as I don't do any development with PHPCR currently and I can't get Jackrabbit working locally for whatever reason. So I would trust you that this change works.

The tests are failing apparently due to unrelated changes in other PHPCR libraries. Would be good to update the test expectations and make the build green before merging this.

@dbu
Copy link
Member

dbu commented Aug 29, 2018

can you rebase this on master please?

is it possible to write a test for this that could make sure the edge cases are now handled correctly? i notice that the counter is not right in the foreach($nodes as $node) line, so i guess there are lines we do not want to count...

@middlebrain middlebrain force-pushed the ls_wrong_node_count_fix branch 3 times, most recently from 6f811d8 to ccc6f16 Compare September 2, 2018 16:06
The displayed node counter for "node:list [path_without_wildcards]" is always 1.
@middlebrain middlebrain force-pushed the ls_wrong_node_count_fix branch from ccc6f16 to 0598a4d Compare September 2, 2018 16:30
@middlebrain
Copy link
Contributor Author

I have reworked the fix a little bit and also added two tests. Node counting works now in the same way as property counting in the PHPCR/Shell/Console/Command/Phpcr/NodeListCommand::renderProperties function.

@dantleech dantleech merged commit bc9b29f into phpcr:master Sep 2, 2018
@dantleech
Copy link
Member

Nice work :)

@middlebrain middlebrain deleted the ls_wrong_node_count_fix branch September 2, 2018 19:10
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