Re: Introduction + Missing static modifiers
| From: | Jeff Welch | Date: | Sun, 16 Jun 2013 22:51:12 +0000 |
| Subject: | Re: Introduction + Missing static modifiers | ||
| References: | 1 2 3 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969384417@lists.php.net to get a copy of this message | ||
On Sun, Jun 16, 2013 at 10:57 AM, Jeff Welch <whatthejeff@gmail.com> wrote:
> On Sun, Jun 16, 2013 at 4:36 AM, Sherif Ramadan <theanomaly.is@gmail.com>wrote:
>
>>
>> On Sun, Jun 16, 2013 at 3:40 AM, Jeff Welch <whatthejeff@gmail.com>wrote:
>>
>>> Hi, all :)
>>>
>>> My name is Jeff Welch and I'm one of the maintainers of the PHPUnit
>>> project. While investigating a PHPUnit issue (
>>>
>>> https://github.com/sebastianbergmann/phpunit-mock-objects/issues/130)
>>> this past friday, I noticed that the PHP documentation is missing the
>>> static modifier for a number of methods. I've created a patch (
>>> https://gist.github.com/whatthejeff/5790970) that adds
>>> the missing
>>> modifier for the following methods:
>>>
>>> *
MessageFormatter::create
>>> * MessageFormatter::formatMessage
>>> * MessageFormatter::parseMessage
>>> * mysqli::poll
>>> * Phar::apiVersion
>>> * Phar::canCompress
>>> * Phar::canWrite
>>> * Phar::createDefaultStub
>>> * Phar::getSupportedCompression
>>> * Phar::getSupportedSignatures
>>> * Phar::interceptFileFuncs
>>> * Phar::isValidPharFilename
>>> * Phar::loadPhar
>>> * Phar::mapPhar
>>> * Phar::running
>>> * Phar::mount
>>> * Phar::mungServer
>>> * Phar::unlinkArchive
>>> * Phar::webPhar
>>> * SQLite3::version
>>> * SQLite3::escapeString
>>>
>>> Anyway, it would be nice to get VCS access so I don't have to jump
>>> through too many hoops for future contributions.
>>>
>>> PS: I've heard a love for cats will get you far with this list, so I
>>> submit to you my cat-related open source contributions:
>>>
>>> *
>>> https://github.com/whatthejeff/nyancat-phpunit-resultprinter
>>> * https://github.com/phpspec/phpspec/pull/133
>>> * https://github.com/whatthejeff/nyancat-scoreboard
>>>
>>>
>>
>> Hey you cheated. There was a dinosaur in there!
>>
>> Looks OK, but I suspect that it would be even better to add the
>> visibility modifiers as long as you're adding the access modifiers.
>>
>
> I can agree to this.
>
>
>> The documentation is currently wishy-washy about having those for all of
>> the classes. Some have just the access and others have both visibility and
>> access. If you'd be willing to help fix the rest that would be awesome
>>
>
> I don't mind adding the missing visibility modifiers.
>
Alright, I've updated the patch (https://gist.github.com/whatthejeff/5790970)
to include visibility modifiers. For the most part I only worked on core
classes as I don't have time to go through all the available PECL classes.
I can't guarantee that I caught them all, but I did my best :)
>
>
>> and I'm sure the cats will give you bonus points for your VCS account.
>>
>> You also might want to take a look at https://edit.php.net
>>
>
> Yeah, I looked into that, but it's also nice to use shell tools for making
> mass changes. For instance, I found all the missing static modifiers and
> patched the documentation using grep/awk/sed.
>
>
>> If no one has any objections I'll go ahead and apply your patch later
>> tonight. I admit I didn't look it over that thoroughly.
>>
>
> I can tell you that I compiled all the sources and manually verified that
> the changed pages look as expected. We use DocBook for PHPUnit's
> documentation, so I have a decent amount of experience with this toolchain.
>
>
>>
>>
>>> Thanks,
>>>
>>> - Jeff
>>>
>>
>>
>