Closed mikebronner closed 8 years ago
Are you still seeing this @mikebronner?
Yes, here are the outputs:
command-line
ci:PHPCI localadmin$ sudo /usr/bin/php /Library/Server/Web/Data/Sites/PHPCI/console phpci:run-builds
string(113) "export GIT_SSH="/Library/Server/Web/Data/Sites/PHPCI/PHPCI/build/project2-build205.sh" && git clone -b %s %s "%s""
Cloning into '/Library/Server/Web/Data/Sites/PHPCI/PHPCI/build/project2-build205'...
remote: Counting objects: 9383, done.
remote: Compressing objects: 100% (4828/4828), done.
remote: Total 9383 (delta 4396), reused 8702 (delta 3908)
Receiving objects: 100% (9383/9383), 6.73 MiB | 1.81 MiB/s, done.
Resolving deltas: 100% (4396/4396), done.
Checking connectivity... done.
Checking out files: 100% (4728/4728), done.
Note: checking out '7cf8ee851bd5ebc97ab88b0a00e23fb378b0b0c0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 7cf8ee8... Added PHPSpec back into config file.
phpcpd 2.0.0 by Sebastian Bergmann.
0.00% duplicated lines out of 6278 total lines of code.
Time: 657 ms, Memory: 7.25MbPHP Fatal error: Cannot redeclare class Swift in /Library/Server/Web/Data/Sites/PHPCI/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php on line 19
PHP Stack trace:
PHP 1. {main}() /Library/Server/Web/Data/Sites/PHPCI/vendor/phpspec/phpspec/bin/phpspec:0
PHP 2. require() /Library/Server/Web/Data/Sites/PHPCI/vendor/phpspec/phpspec/bin/phpspec:13
PHP 3. ComposerAutoloaderInit39cdebe88d99fbeeac4d387d4e4dbbc9::getLoader() /Library/Server/Web/Data/Sites/PHPCI/vendor/autoload.php:7
PHP 4. composerRequire39cdebe88d99fbeeac4d387d4e4dbbc9() /Library/Server/Web/Data/Sites/PHPCI/vendor/composer/autoload_real.php:52
PHP 5. require() /Library/Server/Web/Data/Sites/PHPCI/vendor/composer/autoload_real.php:61
PHP 6. require() /Library/Server/Web/Data/Sites/PHPCI/vendor/swiftmailer/swiftmailer/lib/swift_required.php:22
You have new mail in /var/mail/localadmin
errors.log
[2014-04-30 07:38:48] RunCommand.ERROR: ^[[0;31mPLUGIN STATUS: FAILED^[[0m {"buildID":"204"} []
[2014-04-30 07:38:50] RunCommand.ERROR: ^[[0;31mPLUGIN STATUS: FAILED^[[0m {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.ERROR: ^[[0;31mPLUGIN STATUS: FAILED^[[0m {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.ERROR: ^[[0;31mBUILD FAILURE^[[0m {"buildID":"204"} []
[2014-04-30 08:10:16] _.ERROR: ErrorException: 1: Class 'PHPCI\\Controller' not found in /Library/Server/Web/Data/Sites/PHPCI/vendor/block8/b8framework/b8/Application.php line 93 at /Library/Server/Web/Data/Sites/PHPCI/vendor/block8/b8framework/b8/Application.php:93)"} []
[2014-04-30 08:10:16] _.ERROR: ErrorException: 1: Class 'PHPCI\\Controller' not found in /Library/Server/Web/Data/Sites/PHPCI/vendor/block8/b8framework/b8/Application.php line 93 at /Library/Server/Web/Data/Sites/PHPCI/vendor/block8/b8framework/b8/Application.php:93)"} []
everything
[2014-04-30 07:38:10] RunCommand.INFO: ^[[0;32mWorking copy created: /Library/Server/Web/Data/Sites/PHPCI/PHPCI/build/project2-build204/^[[0m {"buildID":"204"} []
[2014-04-30 07:38:10] RunCommand.INFO: RUNNING PLUGIN: mysql {"buildID":"204"} []
[2014-04-30 07:38:10] RunCommand.INFO: ^[[0;32mPLUGIN STATUS: SUCCESS!^[[0m {"buildID":"204"} []
[2014-04-30 07:38:10] RunCommand.INFO: RUNNING PLUGIN: composer {"buildID":"204"} []
[2014-04-30 07:38:10] RunCommand.DEBUG: Looking for binary: composer {"buildID":"204"} []
[2014-04-30 07:38:10] RunCommand.DEBUG: Found in root: composer {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/Library/Server/Web/Data/Sites/PHPCI/composer self-update" to get the latest version. {"$
[2014-04-30 07:38:12] RunCommand.INFO: Loading composer repositories with package information {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: Installing dependencies (including require-dev) from lock file {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: Nothing to install or update {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: Generating autoload files {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: No entry for terminal type "unknown"; {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: using dumb terminal settings. {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: No entry for terminal type "unknown"; {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: using dumb terminal settings. {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: Generating optimized class loader {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: ^[[0;32mPLUGIN STATUS: SUCCESS!^[[0m {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.INFO: RUNNING PLUGIN: php_parallel_lint {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.DEBUG: Looking for binary: parallel-lint {"buildID":"204"} []
[2014-04-30 07:38:12] RunCommand.DEBUG: Found in vendor/bin: parallel-lint {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: ............................................................ 60/136 (44 %) {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: ............................................................ 120/136 (88 %) {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: ................ {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: Checked 136 files in 10 second, no syntax error found {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: Checked 136 files in 10 second, no syntax error found {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: ^[[0;32mPLUGIN STATUS: SUCCESS!^[[0m {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.INFO: RUNNING PLUGIN: php_mess_detector {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.DEBUG: Looking for binary: phpmd {"buildID":"204"} []
[2014-04-30 07:38:22] RunCommand.DEBUG: Found in vendor/bin: phpmd {"buildID":"204"} []
[2014-04-30 07:38:48] RunCommand.ERROR: ^[[0;31mPLUGIN STATUS: FAILED^[[0m {"buildID":"204"} []
[2014-04-30 07:38:48] RunCommand.INFO: RUNNING PLUGIN: php_code_sniffer {"buildID":"204"} []
[2014-04-30 07:38:48] RunCommand.DEBUG: Looking for binary: phpcs {"buildID":"204"} []
[2014-04-30 07:38:48] RunCommand.DEBUG: Found in vendor/bin: phpcs {"buildID":"204"} []
[2014-04-30 07:38:50] RunCommand.ERROR: ^[[0;31mPLUGIN STATUS: FAILED^[[0m {"buildID":"204"} []
[2014-04-30 07:38:50] RunCommand.INFO: RUNNING PLUGIN: php_cpd {"buildID":"204"} []
[2014-04-30 07:38:50] RunCommand.DEBUG: Looking for binary: phpcpd {"buildID":"204"} []
[2014-04-30 07:38:50] RunCommand.DEBUG: Found in vendor/bin: phpcpd {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.INFO: phpcpd 2.0.0 by Sebastian Bergmann. {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.INFO: 0.00% duplicated lines out of 6278 total lines of code. {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.INFO: Time: 611 ms, Memory: 7.25Mb {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.INFO: ^[[0;32mPLUGIN STATUS: SUCCESS!^[[0m {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.INFO: RUNNING PLUGIN: php_loc {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.DEBUG: Looking for binary: phploc {"buildID":"204"} []
[2014-04-30 07:38:51] RunCommand.DEBUG: Found in vendor/bin: phploc {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: phploc 2.0.4 by Sebastian Bergmann. {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Directories 38 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Files 135 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Size {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Lines of Code (LOC) 6278 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Comment Lines of Code (CLOC) 915 (14.57%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Non-Comment Lines of Code (NCLOC) 5363 (85.43%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Logical Lines of Code (LLOC) 885 (14.10%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Classes 627 (70.85%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Average Class Length 9 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Average Method Length 3 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Functions 26 (2.94%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Average Function Length 1 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Not in classes or functions 232 (26.21%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Complexity {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Cyclomatic Complexity / LLOC 0.14 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Cyclomatic Complexity / Number of Methods 1.57 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Dependencies {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Global Accesses 1 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Global Constants 0 (0.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Global Variables 0 (0.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Super-Global Variables 1 (100.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Attribute Accesses 164 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Non-Static 156 (95.12%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Static 8 (4.88%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Method Calls 579 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Static 8 (4.88%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Method Calls 579 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Non-Static 321 (55.44%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Static 258 (44.56%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Structure {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Namespaces 16 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Interfaces 2 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Traits 0 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Classes 65 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Abstract Classes 1 (1.54%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Concrete Classes 64 (98.46%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Methods 200 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Scope {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Non-Static Methods 166 (83.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Static Methods 34 (17.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Visibility {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Public Method 191 (95.50%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Non-Public Methods 9 (4.50%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Functions 22 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Named Functions 0 (0.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Anonymous Functions 22 (100.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Constants 1 {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Global Constants 1 (100.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Class Constants 0 (0.00%) {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: ^[[0;32mPLUGIN STATUS: SUCCESS!^[[0m {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: RUNNING PLUGIN: php_spec {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.DEBUG: Looking for binary: phpspec {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.DEBUG: Found in vendor/bin: phpspec {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.ERROR: ^[[0;31mPLUGIN STATUS: FAILED^[[0m {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: RUNNING PLUGIN: mysql {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: ^[[0;32mPLUGIN STATUS: SUCCESS!^[[0m {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.ERROR: ^[[0;31mBUILD FAILURE^[[0m {"buildID":"204"} []
[2014-04-30 07:38:52] RunCommand.INFO: Removing build. {"buildID":"204"} []
I'm also seeing some errors with lasts commits:
[2014-05-06 09:48:33] RunCommand.INFO: RUNNING PLUGIN: email {"buildID":"2304"} []
[2014-05-06 09:48:33] RunCommand.ERROR: EXCEPTION: Class Swift_Mailer does not exist {"exception":"[object] (ReflectionException: Class Swift_Mailer does not exist at /home/behappy2/phpci/PHPCI/Plugin/Util/Factory.php:161)","buildID":"2304"} []
[2014-05-06 09:48:33] RunCommand.ERROR: PLUGIN STATUS: FAILED {"buildID":"2304"} []
and this other
[2014-05-06 09:48:06] RunCommand.DEBUG: Looking for binary: phpcs {"buildID":"2304"} []
[2014-05-06 09:48:06] RunCommand.DEBUG: Found in vendor/bin: phpcs {"buildID":"2304"} []
[2014-05-06 09:48:25] RunCommand.ERROR: EXCEPTION: Could not process PHPCS report JSON. {"exception":"[object] (Exception: Could not process PHPCS report JSON. at /home/behappy2/phpci/PHPCI/Plugin/PhpCodeSniffer.php:217)","buildID":"2304"} []
[2014-05-06 09:48:25] RunCommand.ERROR: PLUGIN STATUS: FAILED {"buildID":"2304"} []
First error is quite important, because mails are not sent.
All was working fine about a month ago.
I haven't the slightest clue what could be causing this - unless you've not run composer install since updating? (Or you're running a modified composer.json that hasn't been kept in sync with PHPCI's built in one?)
@meadsteve - Any ideas?
Worth noting that both of these things are working without issue on our two copies of PHPCI. We use PHPCS against PHPCI, and we were getting failed build emails as recently as Friday.
composer show
In the installed packages:
installed:
behat/mink v1.5.0 Web acceptance testing framework for PHP 5.3
behat/mink-browserkit-driver v1.1.0 Symfony2 BrowserKit driver for Mink framework
behat/mink-goutte-driver v1.0.9 Goutte driver for Mink framework
behat/mink-selenium2-driver v1.1.1 Selenium2 (WebDriver) driver for Mink framework
block8/b8framework 1.1.2 Simple, lightweight framework for high-throughput applications
codeception/codeception 1.8.1 BDD-style testing framework
composer/composer dev-master 3677c1e Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have...
fabpot/goutte v1.0.5 A simple PHP Web Scraper
facebook/webdriver v0.4 A php client for WebDriver
guzzle/common v3.9.0 Common libraries used by Guzzle
guzzle/http v3.9.0 HTTP libraries used by Guzzle
guzzle/parser v3.9.0 Interchangeable parsers used by Guzzle
guzzle/stream v3.9.0 Guzzle stream wrapper component
instaclick/php-webdriver 1.0.17 PHP WebDriver for Selenium 2
ircmaxell/password-compat 1.0.3 A compatibility library for the proposed simplified password hashing algorithm: https://wiki.p...
jakub-onderka/php-parallel-lint 0.4 This tool check syntax of PHP files about 20x faster than serial check.
justinrainbow/json-schema 1.3.6 A library to validate a json schema.
monolog/monolog 1.9.1 Sends your logs to files, sockets, inboxes, databases and various web services
pdepend/pdepend 1.1.3 Official version of pdepend to be handled with Composer
phploc/phploc 2.0.5 A tool for quickly measuring the size of a PHP project.
phpmd/phpmd 1.5.0 Official version of PHPMD handled with Composer.
phpspec/prophecy 1.1.2 Highly opinionated mocking framework for PHP 5.3+
phpspec/prophecy-phpunit v1.0.1 PhpUnit test case integrating the Prophecy mocking library
phpunit/php-code-coverage 1.2.17 Library that provides collection, processing, and rendering functionality for PHP code coverag...
phpunit/php-file-iterator 1.3.4 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template 1.2.0 Simple template engine.
phpunit/php-timer 1.0.5 Utility class for timing
phpunit/php-token-stream 1.2.2 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 3.7.37 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 1.2.3 Mock Object library for PHPUnit
pimple/pimple v1.1.1 Pimple is a simple Dependency Injection Container for PHP 5.3
psr/log 1.0.0 Common interface for logging libraries
sebastian/finder-facade 1.1.0 FinderFacade is a convenience wrapper for Symfony's Finder component.
sebastian/git 1.2.0 Simple wrapper for Git
sebastian/phpcpd 2.0.1 Copy/Paste Detector (CPD) for PHP code.
sebastian/version 1.0.3 Library that helps with managing the version number of Git-hosted PHP projects
seld/jsonlint 1.1.2 JSON Linter
squizlabs/php_codesniffer 1.5.1 PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined se...
swiftmailer/swiftmailer v5.1.0 Swiftmailer, free feature-rich PHP mailer
symfony/browser-kit v2.4.4 Symfony BrowserKit Component
symfony/console v2.4.4 Symfony Console Component
symfony/css-selector v2.4.4 Symfony CssSelector Component
symfony/dom-crawler v2.4.4 Symfony DomCrawler Component
symfony/event-dispatcher v2.4.4 Symfony EventDispatcher Component
symfony/finder v2.4.4 Symfony Finder Component
symfony/process v2.4.4 Symfony Process Component
symfony/yaml v2.4.4 Symfony Yaml Component
theseer/fdomdocument 1.5.0 The classes contained within this repository extend the standard DOM to use exceptions at all ...
My composer.json
{
"name" : "block8/phpci",
"description" : "Simple continuous integration for PHP projects.",
"minimum-stability": "stable",
"type" : "library",
"keywords" : ["php", "phpci", "ci", "continuous", "integration", "testing", "phpunit", "continuous integration", "jenkins", "travis"],
"homepage" : "http://www.phptesting.org/",
"license" : "BSD-2-Clause",
"authors": [
{
"name" : "Dan Cryer",
"email" : "dan.cryer@block8.co.uk",
"homepage": "http://www.block8.co.uk",
"role" : "Developer"
}
],
"support": {
"email" : "hello+phpci@block8.co.uk",
"issues": "https://github.com/Block8/PHPCI/issues",
"source": "https://github.com/Block8/PHPCI"
},
"require": {
"php": ">=5.3.3",
"ext-mcrypt": "*",
"ext-pdo": "*",
"ext-pdo_mysql": "*",
"block8/b8framework" : "~1.1",
"ircmaxell/password-compat": "~1.0",
"swiftmailer/swiftmailer" : "~5.0",
"symfony/yaml" : "~2.1",
"symfony/console" : "~2.1",
"psr/log": "~1.0",
"monolog/monolog": "~1.6",
"pimple/pimple": "~1.1",
"codeception/codeception":"@stable",
"phploc/phploc":"*",
"phpmd/phpmd":"*",
"sebastian\/phpcpd":"*",
"squizlabs/php_codesniffer":"@stable",
"jakub-onderka/php-parallel-lint":"@stable",
"composer/composer":"dev-master"
},
"require-dev": {
"phpunit/phpunit": "~3.7",
"phpspec/prophecy-phpunit": "~1.0"
},
"suggest": {
"phpmd/phpmd": "PHP Mess Detector",
"sebastian/phpcpd": "PHP Copy/Paste Detector",
"squizlabs/php_codesniffer": "PHP Code Sniffer",
"phpspec/phpspec": "PHP Spec",
"fabpot/php-cs-fixer": "PHP Code Sniffer Fixer",
"phploc/phploc": "PHP Lines of Code",
"atoum/atoum": "Atoum",
"jakub-onderka/php-parallel-lint": "Parallel Linting Tool",
"behat/behat": "Behat BDD Testing"
}
}
I think there's a few different errors confused together here.
@raistlin 's error looks like it might be a reflection not triggering autoload problem. It would be interesting to see what value class_exists("swift_mailer") returns before the error is triggered.
@mikebronner 's error is a bit more confusing as I'm not sure why the class would ever be redeclared as I believe we are relying on composer's autoloader to handle this. I'd need to spend a bit more time looking at this to figure out what's going on.
I haven't been receiving that error anymore after the update last week.
ah well that's some good news. Thanks @mikebronner. It's just the error raised by @raistlin remaining then.
I'm sorry but I will not be able to help fixing this bug.
I had removed my PHPCI installation in favour of other CI, but I think this bug was related about having mixed 1.x and 2.x/trunk versions without notice or something like.
You can close this issue.
sorry for reopening, but i've got the same error as @mikebronner
[2014-07-03 12:49:23] RunCommand.INFO: RUNNING PLUGIN: php_unit {"buildID":"11"} []
PHP Fatal error: Cannot redeclare class Swift in /usr/share/nginx/www/xfragger.de/phpci/PHPCI/build/project1-build11/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php on line 19
PHP Stack trace:
PHP 1. {main}() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/composer/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/composer/bin/phpunit:63
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129
PHP 4. PHPUnit_TextUI_Command->handleArguments() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:138
PHP 5. PHPUnit_TextUI_Command->handleBootstrap() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:606
PHP 6. PHPUnit_Util_Fileloader::checkAndLoad() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:778
PHP 7. PHPUnit_Util_Fileloader::load() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/PHPUnit/Util/Fileloader.php:76
PHP 8. include_once() /usr/share/nginx/www/xfragger.de/phpci/vendor/phpunit/phpunit/PHPUnit/Util/Fileloader.php:92
PHP 9. require_once() /usr/share/nginx/www/xfragger.de/phpci/PHPCI/build/project1-build11/test/bootstrap.php:2
PHP 10. ComposerAutoloaderInitaac973e31bf3a9f8dab2f23799316d2d::getLoader() /usr/share/nginx/www/xfragger.de/phpci/PHPCI/build/project1-build11/vendor/autoload.php:7
PHP 11. composerRequireaac973e31bf3a9f8dab2f23799316d2d() /usr/share/nginx/www/xfragger.de/phpci/PHPCI/build/project1-build11/vendor/composer/autoload_real.php:49
PHP 12. require() /usr/share/nginx/www/xfragger.de/phpci/PHPCI/build/project1-build11/vendor/composer/autoload_real.php:58
PHP 13. require() /usr/share/nginx/www/xfragger.de/phpci/PHPCI/build/project1-build11/vendor/swiftmailer/swiftmailer/lib/swift_required.php:22
installed phpci via composer this morning, my project uses composer for a silex project and uses swiftmailer too....
"require": {
"silex/silex": "1.1.2",
"swiftmailer/swiftmailer": "4.*"
}
I am running into the same issue too with a project using swiftmailer. The build fails with a TAP error and I see the following in the php error log.
[11-Oct-2014 05:00:29 UTC] PHP Fatal error: Cannot redeclare class Swift in /var/www/phpci/PHPCI/build/project1-build19/library/swiftmailer/lib/classes/Swift.php on line 19
[11-Oct-2014 05:00:29 UTC] PHP Stack trace:
[11-Oct-2014 05:00:29 UTC] PHP 1. {main}() /var/www/phpci/vendor/phpunit/phpunit/composer/bin/phpunit:0
[11-Oct-2014 05:00:29 UTC] PHP 2. PHPUnit_TextUI_Command::main() /var/www/phpci/vendor/phpunit/phpunit/composer/bin/phpunit:63
[11-Oct-2014 05:00:29 UTC] PHP 3. PHPUnit_TextUI_Command->run() /var/www/phpci/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:129
[11-Oct-2014 05:00:29 UTC] PHP 4. PHPUnit_TextUI_TestRunner->doRun() /var/www/phpci/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:176
[11-Oct-2014 05:00:29 UTC] PHP 5. PHPUnit_Framework_TestSuite->run() /var/www/phpci/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:350
[11-Oct-2014 05:00:29 UTC] PHP 6. PHPUnit_Framework_TestSuite->run() /var/www/phpci/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:709
[11-Oct-2014 05:00:29 UTC] PHP 7. PHPUnit_Framework_TestSuite->run() /var/www/phpci/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:709
[11-Oct-2014 05:00:29 UTC] PHP 8. call_user_func() /var/www/phpci/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:655
[11-Oct-2014 05:00:29 UTC] PHP 9. CoreTest::setUpBeforeClass() /var/www/phpci/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:655
[11-Oct-2014 05:00:29 UTC] PHP 10. require_once() /var/www/phpci/PHPCI/build/project1-build19/test/CoreTest.php:14
[11-Oct-2014 05:00:29 UTC] PHP 11. require_once() /var/www/phpci/PHPCI/build/project1-build19/signup/admin/index.php:5
[11-Oct-2014 05:00:29 UTC] PHP 12. require_once() /var/www/phpci/PHPCI/build/project1-build19/signup/index.php:135
[11-Oct-2014 05:00:29 UTC] PHP 13. require() /var/www/phpci/PHPCI/build/project1-build19/library/swiftmailer/lib/swift_required.php:21
Did anyone solve it?
I had a similar problem and did a bit investigation on it. In my symfony project the autoload.php file has the line require_once DIR.'/../vendor/swiftmailer/lib/classes/Swift.php'; and that fails because Swift-class has already been loaded at that point. What is loading that file is the composer generated autoloader phpci/vendor/autoload.php (end eventually defined in phpci/vendor/composer/autoload_files.php and in phpci/vendor/swiftmailer/swiftmailer/lib/swift_required.php). Adding a class_exists() -check around that require Swift line on the projects autoload.php could help, but only if the Swift version included by phpci is compatible with the version needed by the project under testing.
To me that may sound even a bigger problem which has nothing to do with Swift. Should my project, that I want to test with phpci, be compatible with all the same versions of the libraries that it shares with phpci? Phpci uses many symfony components and I've already noticed problems with for example the console componets Command-class for which my project uses different version than phpci requires.
I will investigate next if sing an external phpunit, and not the one under phpci/verdir dir, would help.
Closing this on the assumption it is fixed and/or no longer relevant by now. Feel free to reopen if this assumption is incorrect.
Getting the following errors after pulling this morning's changes: