[TYPO3-50-general] Willing to help Task #1 Create sniffs for PHP Code Sniffer

Tim Eilers tim.eilers at web.de
Mon Dec 10 22:18:21 CET 2007

Hi Robert,

Robert Lemke schrieb:
> Okay but please don't stress yourself. Promise us to not postpone any
> nice holiday-activity just to sit at your computer and rack your brain
> about our coding guidelines.

Hey, it is f***in cold out there and i already know, that i will get
very bored in that time, so it is a great job :)

> Okay, let's take one step after another - we can split that project into
> smaller tasks and some others might help you with that.
> The idea of PHPUnit (or Unit Testing in general) is to create some
> automatic testing for your (PHP-) code. It mainly serves two goals: 1) make sure
> that your code works according to your assumptions and 2) document your assumptions.

Ok, Sebastian already wrote that. I'll try to do my very best. Perhaps i
should check it out with the Sniffs i already implemented, before i
start with other Sniffs.

> You intuitively did already what is called Test Driven Development: You
> started extracting the rules and then move on to coding.

Wow i am good! Ehem, just a little joke ;)

> I suggest that you do the following:
>  - convert the coding guidelines we've written down so far into rules of
> this kind:
> > [...] 
>    Best is, if you wrote all rules into our wiki - just fill this page:
>    http://5-0.dev.typo3.org/trac/wiki/CodingStandards

Ok, did it. Priorities are just assumed by me, if you see it a other
way, please correct. I am sure you are more experienced and now what is
important by already having coded many parts.
Later i will try to assume the difficulty of implementing a sniff for
the rule, which will surely not be the same than the priority in some
cases ;)
I noticed many Sniffs in the other CodingStandards (PEAR, Zend, ...),
but that are many ones, and i don't know which are important for
TYPO3... Perhaps later i get deeper into it and can suggest you new
rules, which should find their way into the coding guidelines.
For my first experiment i took a PEAR sniff and rewrote it to fit to the
according TYPO3 rule.

>  - Then you might want to categorize these rules

Ok, that will be also a step i do later. I think it will be like the way
the PEAR and other sniffs are structured (Commenting, Files,
NamingConventions, ...)

>  - After that please let us know that you're done, because I'm pretty
> sure that we forgot to document quite some rules ...

Ok, as i wrote above, i already put an initial version into the wiki...

>  - If you really want to learn how to do Unit Testing / work with
> PHPUnit, you could
>    start with reading the PHPUnit Pocket Guide
> (http://www.phpunit.de/pocket_guide/index.en.php).
>    It's not exceptional verbose but it might give you a rough idea.
>    Maybe Sebastian can help you a bit with the first steps.

The very big pocket guide? ;) I already looked into it... i got an idea
how to use it, but not how to connect it with the Sniffs. Sebastian
already wrote something that lighted my mind... :)

>    If you're not up to that, no problem either - we just ask someoneelse
> to work on that part.

I'll give it a try by myself, if i fail i'll shout...

> And you don't have to care about PHING - we just use that to automize
> the execution
> of certain tasks.


> Thanks again for your help!
> robert

No problem

Nice evening,

More information about the TYPO3-project-5_0-general mailing list