Ubuntu-jenkins Automatic Build Laravel 4 o'clock, phpunit vendor/autoload.php report syntax error at execution time

Source: Internet
Author: User
Tags autoload parse error
In the same environment, PHP does not have a problem using the Ant build project in the terminal to perform the PHPUnit test, but it will error when Jenkins builds automatically:

PHPUnit
[EXEC] PHP Parse error:syntax error, unexpected ' << ' (T_SL) in/var/lib/jenkins/jobs/hwawoontest/workspace/vendor/ Autoload.php on line 7
[EXEC] PHP Stack Trace:
[EXEC] PHP 1. {main} ()/usr/local/bin/phpunit:0
[EXEC] PHP 2. Phpunit_textui_command::main ()/usr/local/bin/phpunit:612
[EXEC] PHP 3. Phpunit_textui_command->run () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:138
[EXEC] PHP 4. Phpunit_textui_command->handlearguments () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:148
[EXEC] PHP 5. Phpunit_textui_command->handlebootstrap () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:651
[EXEC] PHP 6. Phpunit_util_fileloader::checkandload () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:817
[EXEC] PHP 7. Phpunit_util_fileloader::load () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:77
[EXEC] PHP 8. Include_once () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:93

BUILD FAILED
/var/lib/jenkins/jobs/hwawoontest/workspace/build.xml:168:exec returned:255

Autoload.php's Code:

// autoload.php @generated by Composer
require_once DIR . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit34c7d9c593778809996626035f6ae5ee::getLoader();

The following paragraph is the code snippet for Build.xml:


  
       
   
                                        
   
    
  
   

Why is this, where is the problem?

Reply content:

In the same environment, PHP does not have a problem using the Ant build project in the terminal to perform the PHPUnit test, but it will error when Jenkins builds automatically:

PHPUnit
[EXEC] PHP Parse error:syntax error, unexpected ' << ' (T_SL) in/var/lib/jenkins/jobs/hwawoontest/workspace/vendor/ Autoload.php on line 7
[EXEC] PHP Stack Trace:
[EXEC] PHP 1. {main} ()/usr/local/bin/phpunit:0
[EXEC] PHP 2. Phpunit_textui_command::main ()/usr/local/bin/phpunit:612
[EXEC] PHP 3. Phpunit_textui_command->run () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:138
[EXEC] PHP 4. Phpunit_textui_command->handlearguments () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:148
[EXEC] PHP 5. Phpunit_textui_command->handlebootstrap () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:651
[EXEC] PHP 6. Phpunit_util_fileloader::checkandload () phar:///usr/local/bin/phpunit/phpunit/textui/command.php:817
[EXEC] PHP 7. Phpunit_util_fileloader::load () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:77
[EXEC] PHP 8. Include_once () phar:///usr/local/bin/phpunit/phpunit/util/fileloader.php:93

BUILD FAILED
/var/lib/jenkins/jobs/hwawoontest/workspace/build.xml:168:exec returned:255

Autoload.php's Code:

// autoload.php @generated by Composer
require_once DIR . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit34c7d9c593778809996626035f6ae5ee::getLoader();

The following paragraph is the code snippet for Build.xml:


  
       
   
                                        
   
    
  
   

Why is this, where is the problem?

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.