-- Joe Kramer <[EMAIL PROTECTED]> wrote
(on Tuesday, 12 December 2006, 05:26 PM +0200):
> How is snapshot/release of Zend Framework is being built? Just export
> form SVN and that's it?

Snapshots and releases are two different things. The snapshots are done
nightly from whatever revision is current; there are not guarantees that
tests run or even that code parses correctly. 

Releases are done after a code freeze, tests are run, etc.

> The logical way to do the build of snapshot or release is to export
> and check/compile the source code.
> There is no "compile php", you can only do "php -f" to parse single file.

'php -l' will run a script through a linter, which will check to make
sure that the file contains no syntax errors; 'php -f' will parse a file
to make sure there are no runtime errors. I run code through php -l as a
sanity check anytime I make changes, and then run the test suite.

Which brings me to the next point: the best way to check code is to run
the unit tests. If code is untested, write tests and contribute them, so
we can exercise all the code as well as possible.

> Probably can be automated using some script to parse every file in
> whole project tree.
> Fortunately we have Zend Guard (formerly Zend Encoder), that can be
> set to run on whole project tree and check project for parse errors.
> You may say, Zend Guard is "javac" in PHP world.
> 
> But build compile/automation seem absent from Zend Framework. 

If you look through the commits, Bill Karwin has been creating a Phing
build script that will be building API and end-user docs, running unit
tests, and doing an export of the tree. Please remember that ZF is still
in pre-alpha stage; infrastructure like this is in development still.

> ZF periodically contain bugs that are not compatible with Zend Guard
> encoding process.

This is a separate issue. If you find that ZF has incompatabilities with
Zend Guard, file an issue against Zend Guard so that it will work with
ZF.

> Take current snapshot and try to run it with Zend Guard. ZF has 10 or
> so parse errors.

As noted above, snapshots have no guarantees as to usability. They are
provided as a convenience for those who do not wish to use subversion or
who want a clean tarball for installation purposes. They should really
only be used for development and testing.

> They may not be a real parse errors according to PHP spec. but those
> are parse errors in the eyes of Zend Guard. And Zend Guard is our only
> tool that exists to check for such inconsistencies. The only thing
> between us and total chaos :)

I disagree. The test suite is the correct tool for this. If Zend Guard
cannot parse files, please do the following:

    a) Check to see if the file parses in PHP without Zend Guard. If so,
       submit a support request for Zend Guard detailing the issue.
    b) If the file does not parse in PHP, either create an issue on the
       ZF bug tracker, or send an email to one of the ZF mailing lists.

> Enterprise-level projects are mostly encoded with Zend Guard, 

Where do you get this information?

> we cannot be sure that if we drop-in latest release of Zend Framework,
> it will actually compile with our build process.  Even if the release
> is declared as stable, it still may have parse errors with Zend Guard.

Again, these are separate issues.

> My points are:
> 
> - It's not possible to use Zend Framework in projects encoded with
> Zend Guard because ZF is not checked against Zend Guard when
> built/released.

If there are bugs in Zend Guard, this may not be possible. I don't think
this should be a requirement. Passing the unit tests should be the
minimum requirement.

> - It's called ZEND Framework. Why it doesn't work with ZEND Encoder?

Yes, it should work with Zend Encoder. But such integration will likely
happen when ZF gets closer to a stable, 1.0 release.

> - Parse errors may not be parse errors according to php spec. But Zend
> Guard is the only thing we have.

As noted above, Zend Guard is not the only thing we have. Unit test
coverage is a larger goal, and if tests pass and coverage is good, this
is a much better indication of usability and releasability.

> - What is the build process for Zend framework? Just svn extract and
> pack it? What if there are parse errors?

Noted above.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to