ZF-7541: Create Requirements Checker

Issue Type: New Feature Created: 2009-08-09T15:17:57.000+0000 Last Updated: 2012-11-20T20:52:32.000+0000 Status: Closed Fix version(s): Reporter: Martin Hujer (mhujer) Assignee: None Tags: Related issues: Attachments: - Nette Framework Requirements Checker.jpg


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).


Posted by Wil Moore III (wilmoore) (wilmoore) on 2009-12-18T00:21:06.000+0000

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.

Posted by Mickael Perraud (mikaelkael) on 2009-12-18T01:02:28.000+0000

It should be a provider for Zend_Tool.

<pre class="highlight">
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

Posted by Martin Hujer (mhujer) on 2009-12-18T01:19:40.000+0000

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.

Posted by Wil Moore III (wilmoore) (wilmoore) on 2009-12-18T09:04:02.000+0000

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


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.

Posted by Martin Hujer (mhujer) on 2009-12-18T09:11:29.000+0000

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: ...)

Posted by Wil Moore III (wilmoore) (wilmoore) on 2009-12-18T11:01:04.000+0000

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).

Posted by Wil Moore III (wilmoore) (wilmoore) on 2009-12-18T11:03:53.000+0000

Example of software that implements the requested feature.…

Posted by Wil Moore III (wilmoore) (wilmoore) on 2009-12-19T20:56:18.000+0000

Interface Inspiration:

Posted by Rob Allen (rob) on 2012-11-20T20:52:32.000+0000

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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.