-
Notifications
You must be signed in to change notification settings - Fork 50
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
Rendering issues for Interfaces that extend another one #76
Comments
Would be fixed by php/doc-en#2560 Happening because they aren't using the same docbook markup. |
🤔 Otherwise if the desire is to implement that in PHD instead - then I think that would require introducing something like |
So, I had a look at the DTD and at how we are currently marking up our classes/interfaces. And it doesn't make any sense, I think how we should be doing the markup for an interfaces is as follows: <classsynopsis class="interface">
<oointerface>
<interfacename>Throwable</interfacename>
</oointerface>
<oointerface>
<modifier>extends</modifier>
<interfacename>Stringable</interfacename>
</oointerface>
<oointerface>
<modifier>extends</modifier>
<interfacename>InterfaceTwo</interfacename>
</oointerface>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.throwable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Throwable'])">
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.stringable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Stringable'])">
<xi:fallback/>
</xi:include>
</classsynopsis> And for a class it should be: <classsynopsis class="class">
<ooclass>
<classname>SomeClass</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>ExtendingParentClass</classname>
</ooclass>
<oointerface>
<modifier>implements</modifier>
<interfacename>InterfaceOne</interfacename>
</oointerface>
<oointerface>
<modifier>implements</modifier>
<interfacename>InterfaceTwo</interfacename>
</oointerface>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.throwable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Throwable'])">
<xi:fallback/>
</xi:include>
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.stringable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='Stringable'])">
<xi:fallback/>
</xi:include>
</classsynopsis> As it doesn't really make any sense to wrap the "definition" of it in a The Or if that's too hard for PhD (considering I really don't like touching it as I don't understand it) one can just shove the modifier in the first |
Re: using the That doesn't really work because of the |
@Girgias actually I think your desire to remove The way I see this, it would require both significant changes to PHD and to every subsequent language of PHP docs. Either that, or we make the changes in a fully backwards compatible way and eventually can remove the old deprecated methods? Because by removing that seemingly "extra" |
I see where you are comming from, @Girgias: But the But implementing that in PHD in a BC way is a tad more and will probably consiberably delay the immediate benefit of just getting on. So I'd leave it as it is right now. And then think about how we can implement a backwards-compatible solution in PHD. And possibly find a way of converting the different languages in an automated way into the new structure. And then replace the DTD with an XSD 😇? |
The previous interface changes already required changes to translations, if the translation is up to date they are extremely easy to apply in that one can just play back the doc-en commit and update the EN-Revcheck tag. I've made a PR to handle this in a BC way in #77 which should fix most issues and in the long run simplify the logic of the renderer. (and also make my life easier for my own docbooks render project I'm working on because PhD is such an ungodly mess). |
I was just thinking about ... XSLT ... 🙈 |
Wasn't the whole purpose of PhD to stop using XSLT because of how slow it is? Moreover, I don't think XSLT would solve some of the larger issue the current renderer faces. |
I scrolled back until 2008 in the history of PhD. So while it might have been true at the time that rendering using XSLT was slow, did anyone check that? An using XSLT might indeed solve some things as we are using DocBook and there are default renderers for DocBook. So we might actually profit from what other people did. Yes! I agree! Our Layout looks different! But I would wonder if that is not something that CSS can solve. Which is why that was a thought! But perhaps one that we should at least think through after 15 years of PhD.
That might be! I only thought about it as I'm sure that we aren't the only ones with the issue of |
@Girgias - I think we sorted this issue out with all of our changes to interface rendering. Right? |
Yeah, issues are fixed via #77 and php/doc-en#2620! There is also a followup (php/doc-en#2611) which still needs to be merged, but this doesn't strictly relate to the issue. |
There is a missing space between the name of the interface and the
extend
keyword.See https://www.php.net/manual/en/class.throwable.php for an example.
@mallardduck could you have a look considering you made the rendering changes.
The text was updated successfully, but these errors were encountered: