ZF-7541: Create Requirements Checker

Description

ZF currently has requirements for PHP version and some extensions (manual), but checking, whether your webhost (or your client webhost) offers all which are required, may be boring and error prone.

It would be nice to have some script, which will compare required features and features enabled on current host.

There is a nice example in Czech PHP Framework Nette - Requirements Checker (google translated, but understandable).

Comments

Seems like something that could be resolved using unit tests with a special grouping. Exclude the "requirements" group from "AllTests" and include this group in something like "AllRequirments". Provide user documentation on how to run this set of tests from the command-line.

If this is approved it can be assigned to me.

I'd love to hear other suggestions if the above isn't a viable solution.

It should be a provider for Zend_Tool.


zf check requirements

But the requirements depends on the components really used. Thomas Weidner use something to update our requirements tables in documentation but I can't remember the name of the tool.

Edit: it's PHP_CompatInfo

I primary meant it as a single php file which you can easily run on your hosting to determine if it is suitable for ZF.

If it is going to be a part of Zend_Tool or unit tests, it wouldn't be so easy to run it there.

If it is going to be a part of Zend_Tool or unit tests, it wouldn't be so easy to run it there.

Martin,

This is exactly why I suggested the phpunit approach -- if you have shell access with your host, you should be able to run phpunit; however, after reading Mickael's latest comment regarding PHP_CompatInfo and looking into the component, I think it would be fairly straight-forward to create a PHP script that runs through the requirements.

The toughest part is deciding what to test for since requirements depend on what components you want to use. I suppose the tool could run through everything and report what you can and can't use based on your environment.

Such a tool might end up being pretty cool.

I have updated link to Nette Requirements Checker - that's what I think that this tool should do (+display, which ZF components won't work properly because: ...)

Thanks for the updated link. This could be a really nice component actually. I would suggest a web and command-line interface. I'd be willing to work on this but I would need some guidance as to the correct approach since there doesn't seem to be anything documented as to conventions for something that needs a full blown web interface (or I just don't know where to look).

Example of software that implements the requested feature.

http://translate.google.com/translate/…

Interface Inspiration: http://symfony-check.org/

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.