Re: [fw-general] Build Zend Framework, parse errors.
Hi, Am Dienstag, den 12.12.2006, 18:38 +0200 schrieb Joe Kramer: [...] It's not only about obfuscating. Zend Guard optimizes performance of scripts. Compiles php files into bytecode. And it caches them. Makes perfect sense for high-volume projects. I do not want to be beaten by the Zend-guys, but if you just want to have bytecode, then try Xcache[1]. It works pretty well, provides a sensible admin interface and is open source software, btw. I'm currently one of the developers of germany's biggest dating platform, and we are using there the Zend Framework combined with Xcache which works flawlessly. http://trac.lighttpd.net/xcache/wiki/ Greetings, Lars -- Kriterium des Wahren ist nicht seine unmittelbare Kommunizierbarkeit an jedermann -- Theodor Wiesengrund Adorno, aus: »Negative Dialektik« name: Lars H. Strojny web: http://strojny.net street: Engelsstraße 23blog: http://usrportage.de city: D-51103 Köln mail/jabber: [EMAIL PROTECTED] f-print: 1FD5 D8EE D996 8E3E 1417 328A 240F 17EB 0263 AC07 signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: [fw-general] Build Zend Framework, parse errors.
Why are you encoding Zend Framework at all? It's an open source project, not like you need to conceal any intellectual property... Regards, Eric On Dec 12, 2006, at 11:02 AM, Joe Kramer wrote: Nico, My point is incompatibility between Zend products. If you build serious, enterprise-level project, you probably will use Zend Guard. I am not being elitist, but it seems like Zend framework is not used for projects that are encoded with Zend Guard? Because nobody raised the issue before. Regards. On 12/12/06, Nico Edtinger [EMAIL PROTECTED] wrote: [12.12.2006 16:26] Joe Kramer wrote: There is no compile php, you can only do php -f to parse single file. There is a syntax checker (lint) built into php with php -l. -f does also execute the file. Probably can be automated using some script to parse every file in whole project tree. find . -name *.php -exec php -l {} \; | grep -v ^No syntax errors detected ZF has 10 or so parse errors. With the above line in trunk/ I only got: Strict standards: Assigning the return value of new by reference is deprecated in ./incubator/library/Zend/Db/Adapter/Mysqli.php on line 273 What other errors do you get? nico PS: I used 5.2.0 for the syntax check.
Re: Re: Re: [fw-general] Build Zend Framework, parse errors.
I suggest you put your money where your mouth is and show some exampes of the parse errors you say are being generated when you run Zend Guard's syntax-checking abilities against the latest version of ZF. That's the only way to be sure. Here you go, Zend Guard 4.0.1 is the latest version, php 5 compatible: /usr/local/Zend/ZendGuard-4.0.1/bin/zendenc5 Zend Guard (PHP 5) v4.0.1 (c) Zend Technologies, 1999-2006 /Zend/Request/Interface.php: Interface.php(line 111): parse error, expecting `''' or `T_VARIABLE' Encoding of '/Zend/Request/Interface.php' failed. /Controller/Action.php: Action.php(line 92): parse error, expecting `''' or `T_VARIABLE' /Zend/Controller/Action.php' failed. Zend/Controller/Action.php: Action.php(line 161): parse error, expecting `''' or `T_VARIABLE' /Zend/Controller/Action.php' failed. /Zend/Controller/Router/Interface.php: Interface.php(line 61): parse error, expecting `''' or `T_VARIABLE' /Zend/Controller/Router/Interface.php' failed. Zend/Controller/Router.php: Router.php(line 61): parse error, expecting `''' or `T_VARIABLE' Encoding of '/Zend/Controller/Router.php' failed. /Zend/Controller/Router.php: Router.php(line 86): parse error, expecting `''' or `T_VARIABLE' Encoding of '/Zend/Controller/Router.php' failed. Zend/Controller/Request/Abstract.php: Abstract.php(line 188): parse error, expecting `''' or `T_VARIABLE' Zend/Controller/Request/Http.php: Http.php(line 613): parse error, expecting `''' or `T_VARIABLE' Zend/Controller/Dispatcher.php: Dispatcher.php(line 88): parse error, expecting `''' or `T_VARIABLE' /Zend/Controller/Dispatcher/Interface.php: Interface.php(line 84): parse error, expecting `''' or `T_VARIABLE' /Zend/Controller/RewriteRouter.php: RewriteRouter.php(line 63): parse error, expecting `''' or `T_VARIABLE'
Re: Re: [fw-general] Build Zend Framework, parse errors.
Joe, My point is incompatibility between Zend products. If you build serious, enterprise-level project, you probably will use Zend Guard. I am not being elitist, but it seems like Zend framework is not used for projects that are encoded with Zend Guard? Because nobody raised the issue before. There are more than a few serious, enterprise-level PHP projects that don't use Zend Guard. ;-) Also, Zend Framework may be coordinated by Zend but it is a community-driven project, and many contributors simply don't have access to Zend Guard. As Matthew outlined, there are other methods of testing validity. Among them, php -l and the testing suite designed for PhpUnit 3. Please send the errors you encountered in Zend Guard to the list so we can attempt to identify whether they are truly bugs in Zend Framework or in Zend Guard itself. Thanks, -Matt
Re: [fw-general] Build Zend Framework, parse errors.
Matthew Weier O'Phinney wrote: -- 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. Right. The purpose of the nightly snapshots was to make available the exact same set of files that someone would get if they checked out the code from the subversion repository. It's just a convenient way to get the files, if one does not want to set up a subversion client. The snapshot is not a product release. If the code failed some of the tests mentioned, what would that mean? Are you suggesting that the nightly snapshot would not be posted? That is not the intention of a nightly snapshot. I'm not saying we shouldn't resolve the parse errors you mention -- of course we should. We want all the code to give no errors or notices to any code analysis or error_reporting levels. But also understand that Zend Framework is still pre-beta at this time, and it is undergoing heavy development. Despite the fact that we work at Zend, I don't think any of the ZF team has Zend Guard installed currently. It's just that other tasks have been higher priority so far. So if you could submit bug reports for the 10 parse errors you mention, that would be very much appreciated. Be specific about the line that contains the error, and include a description of how the syntax should change to pass the check. I would suggest a separate bug for each of the components in which parse errors are found (so at most 10 bugs, but perhaps fewer if some components contain more than one of these 10 errors). I don't see your name in our issue tracking system (http://framework.zend.com/issues/). You can create an account for yourself and then email [EMAIL PROTECTED] to request to be granted posting privileges. FWIW, there is a build process for releases of Zend Framework. It involves running the unit tests, and then rendering the docbook manual as HTML. This is done with a Makefile currently, and I'm in progress of adapting this to a phing build script. See zf-home/build-tools/. Regards, Bill Karwin
Re: [fw-general] Build Zend Framework, parse errors.
Based on these, in each case, the issue is with perfectly valid PHP using the 'array' type hint. As an example: protected function _setInvokeArgs(array $args = array()) It looks like Zend Guard is not currently compatible with valid PHP 5.1 syntax, or you're not using PHP = 5.1.0. If you *are*, please file a support ticket against Zend Guard so it can be corrected. Unfortunately, this is true - support for 5.1 features is lagging in Zend Guard. If you submit support request with the code sample it would help ensure that once 5.1 support is there, the code will be working. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/
Re: [fw-general] Build Zend Framework, parse errors.
On 12/12/06, Nico Edtinger [EMAIL PROTECTED] wrote: [12.12.2006 16:26] Joe Kramer wrote: There is no compile php, you can only do php -f to parse single file. There is a syntax checker (lint) built into php with php -l. -f does also execute the file. Probably can be automated using some script to parse every file in whole project tree. find . -name *.php -exec php -l {} \; | grep -v ^No syntax errors detected Personnaly i use phing to check syntax of my project: target name=lint phplint fileset dir=. exclude name=${docdir}/** / exclude name=${report_test_dir}/** / include name=**/*.php/ /fileset /phplint /target And in my project we use a subversion hook to disallow commit of php file with syntax error.