On 6 September 2011 10:14, Christian Grobmeier <[email protected]> wrote:
> I agree with Michael.
>
> Even 1&1 and some other hoster does not provide 5.3 support yet. Of
> course, testing is not really necessary for production environment...
> but who knows what people out there are doing?
>
> And really I *wished* it would be different - I think at namespaces.

The adoption of PHP 5.3 is really going slowly, and that is slowly
starting to be a serious issue. PHP 5.2 has reached end of support in
Dec 2010. That's close to a year ago now.

My point is that some 5.3. features allow for much better unit tests.
Frankly, I'm not sure how to test option parsing for the syslog
appender using 5.2 without redesigning it in a way which allows me to
"peek" at some private member variables (for example making the option
parsing methods public). And that is just not very good design...

For some appender params it's easy to test. E.g. file appender's
"filename" parameter - just check if a file was created at the right
place. But syslog appender is specific, I cannot easily read the
syslog entry created by the appender (especially in a way which would
work on all platforms) to see if the options were activated correctly.

I still think it is better to use PHP 5.3 features where no other
approach gives good results. This means that people testing on PHP 5.2
will have some skipped tests. Testing will NOT fail on 5.2. Currently,
they will also have skipped tests if they don't have pdo_sqlite3 or
mongodb extensions loaded (and a mongodb server up and running).

Also, not all syslog tests depend on 5.3 features... just the important ones. :)

If you have a better solution for this particular problem, I'm listening.

Best regards,
Ivan

Reply via email to