You can view the Pull Request on github:
https://github.com/php/web-php/pull/63

Pull Request Description:
This pull request introduces better handling for functions deprecated in our 
manual. It is a direct implementation for the mockup proposed in 
https://bugs.php.net/bug.php?id=66861

![eh1d9ew](https://cloud.githubusercontent.com/assets/1347533/6520488/b8143240-c3c6-11e4-9218-24b98603531b.png)

It's not the prettiest implementation I can dream on, but I suppose that is 
easier to discuss on something almost ready and improve it, than write it from 
scratch.

In this case, PhD injects `$TOC_DEPRECATED` alongside with `$TOC`, when 
generating files for PHP.net. I decided to store deprecation state in 
`versions.xml`, because it seemed to be easier approach. Example of deprecated 
function entry:

```xml
<function name='session_name' from='PHP 4, PHP 5' deprecated='PHP 7.0'/>
<!-- just an example ;) -->
```

In fact, value of the `function[deprecated]` is currently unused. All about 
script cares is whether attribute exists or not, so we can use simple 
`function[deprecated="true"]`. However, I think that storing a proper version 
number there, makes implementing more advanced features easier.

I would be very glad if at least one person could **test it**. Just set 
deprecated attribute for some functions in manual sources, `configure.php` it, 
render with patched PhD and test if everything behaves well. I did testing, of 
course, but I cannot guarantee that I covered all scenarios.

Changes in `versions.xml` for manual are not ready. I don't have a time to find 
every sigle deprecated function, but I'll try to provide initial changes.

Ah, one implementation detail: I'm worried about chapters like `book.mysql`. If 
`$TOC` suddenly became empty (because all menu items will land in 
`$TOC_DEPRECATED`), then menu won't be displayed at all. What would you propose 
in that case? Simply taking code, rendering deprecated functions list, out of 
the conditional for `$TOC`?

Thanks,
Maciej.

PS: Sorry for my Engrish.


-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to