Skip to content
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

3.0.0: Q: what is the logic for the class and namespace sorting ? (template: default) #2449

Open
jrfnl opened this issue Jun 17, 2020 · 7 comments
Assignees
Projects

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Jun 17, 2020

Template issue/request

I'm wondering what the logic is behind the sorting of the classes/namespaces on the index.html, Global namespace and individual namespace pages.
With files all being in the same directory - src - and all following the same naming convention, I'm seeing some, well, interesting sorting.... (screenshot from the demo issue repo)

image

@jaapio jaapio added this to Needs triage in phpDoc issue triage board Jun 17, 2020
@mvriel
Copy link
Member

mvriel commented Jun 17, 2020

I'm probably missing the obvious but can you specify what you find interesting specifically? That helps me to answer the question :)

@jrfnl
Copy link
Contributor Author

jrfnl commented Jun 17, 2020

@mvriel Sorry, my bad. I'd expect an alphabetically ordered list (natural sort order). That's currently not the case.

This should hopefully make it clearer:
phpdoc-class-list-ordering-2

jrfnl added a commit to jrfnl/phpDocumentor-issue-demo that referenced this issue Jun 17, 2020
@jaapio jaapio removed this from Needs triage in phpDoc issue triage board Nov 6, 2020
@jaapio jaapio added this to Backlog in v3.2 via automation Nov 6, 2020
@ghost
Copy link

ghost commented Feb 17, 2021

I am having the same problem, sorting is broken and the results look wrong. For example, in my case names starting with a "c" are at the top and those starting with a "b" are at the bottom.

I took a quick look at the template source and found this example:

            {% if package.children is not empty %}
            <ul class="phpdocumentor-list">
                {% for child in package.children %}
                    <li>{{ child|route('class:short') }}</li>
                {% endfor %}
            </ul>
            {% endif %}

It appears that the for loop is not using "|sort" as is typical in twig templates? I tried to add it but got a php error that nesting is level is too deep.

@ghost
Copy link

ghost commented Jul 5, 2021

It would be nice if this was fixed in the up coming 3.1 version.

@jaapio
Copy link
Member

jaapio commented Jul 7, 2021

Thanks for reminding me of this issue.

Unfortunately, we didn't have time to fix this in the upcoming release.

@ghost
Copy link

ghost commented Jul 28, 2021

I understand that you only release a new version twice a year, but this issue makes phpDocumentor quite hard to use properly with my users trying text search because sorting is broken. Could you please consider releasing a minor point version with some issues fixed? Waiting for version 3.2 to be released in 6 months... is not ideal.

Thank you.

@jaapio
Copy link
Member

jaapio commented Jul 30, 2021

Hi,

Thanks for your response. It is correct that we try to release 2 versions each year. This is already more often than we did before. phpDocumentor is maintained by a small number of people. It is mostly me, who is doing the major part of the work. And I have to make choices. phpDocumentor is quite a complex project. Users expect us to go with the newest php-versions. Each php version upgrade takes me already so much time that I nearly have time to fix minor issues like this bug. Since I have to do this next to my full-time job and day-to-day life.

I'm deeply sorry that phpDocumentor doesn't work for you right now. And if I had the time to fix this issue myself, it could have been fixed already. But this is not the case. I would be happy to review and accept a PR for this bug. If you need any help to provide a fix I'm here to help you and give you some guidance on what needs to be done.

If we have fixed this issue, the nightly builds should provide you a proper working version to work with. There is from my point of view no specific reason to wait for a release.

Thanks in advance for your help.

@jaapio jaapio added this to To do in v3.4 Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v3.2
Backlog
v3.4
Backlog
Development

No branches or pull requests

3 participants