]> git.pld-linux.org Git - packages/ZendFramework.git/commitdiff
- use runkit pecl ext for syntax lint (faster)
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 2 Jun 2009 10:28:36 +0000 (10:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ZendFramework.spec -> 1.62

ZendFramework.spec

index 01b2e0dcb792dfc3b6f24040d52895bf8ccb844c..371320ccf9f557934858ce9e03cd14cf954d985c 100644 (file)
@@ -15,6 +15,7 @@ Patch0:               %{name}-additional-locales.patch
 Patch1:                %{name}-deps.patch
 Patch2:                %{name}-bug6499.patch
 URL:           http://framework.zend.com/
+BuildRequires: php-pecl-runkit
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
 BuildRequires: sed >= 4.0
 Requires:      php-common >= 4:5.1.4
@@ -1272,9 +1273,20 @@ find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 %build
 # check *.php files syntax using runkit extension
 lint_php() {
-       for a in $(find library -name '*.php'); do
-               php -l "$a"
-       done
+       php -r '
+               $errors = 0;
+               array_shift($argv);
+               echo "Checking syntax of ", count($argv), " PHP files";
+               foreach ($argv as $file) {
+                       echo ".";
+                       if (!runkit_lint_file($file)) {
+                               echo "PHP Lint: $file\n";
+                               $errors++;
+                       }
+               }
+               echo "\nDONE!\n";
+               exit($errors ? 1 : 0);
+       ' $(find library -name '*.php')
 }
 lint_php
 
This page took 0.071685 seconds and 4 git commands to generate.