1

When running CiviCRM test suites, I see

PHP Warning: declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in /path/to/sites/all/modules/civicrm/vendor/zetacomponents/mail/src/transports/variable/var_set.php on line 2

Line 2 of civicrm/vendor/zetacomponents/mail/src/transports/variable/var_set.php is,

declare(encoding='latin1');

Since this generates warning output from the test run, I wonder what the expected configuration is.

  • Is it accepted that we see these warnings from test output?
  • Should we set zend.multibyte=1 locally, which feels like it might introduce internal conversions that don't happen in most hosting environments per default?
  • Should we remove the declare statements from CiviCRM, reflecting what happened upstream in zetacomponents/Mail?
  • Or is it just me that sees it?

Environment: Debian 8, PHP 5.6, Buildkit, CiviCRM drupal-demo/master, running ./scripts/phpunit api_v3_AllTests.

PHP Warning:  declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/vendor/zetacomponents/mail/src/transports/variable/var_set.php on line 2
PHP Stack trace:
PHP   1. {main}() /opt/buildkit/bin/phpunit4:0
PHP   2. PHPUnit_TextUI_Command::main() /opt/buildkit/bin/phpunit4:545
PHP   3. PHPUnit_TextUI_Command->run() phar:///opt/buildkit/bin/phpunit4/phpunit/TextUI/Command.php:100
PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///opt/buildkit/bin/phpunit4/phpunit/TextUI/Command.php:149
PHP   5. PHPUnit_Framework_TestSuite->run() phar:///opt/buildkit/bin/phpunit4/phpunit/TextUI/TestRunner.php:440
PHP   6. PHPUnit_Framework_TestCase->run() phar:///opt/buildkit/bin/phpunit4/phpunit/Framework/TestSuite.php:747
PHP   7. PHPUnit_Framework_TestResult->run() phar:///opt/buildkit/bin/phpunit4/phpunit/Framework/TestCase.php:724
PHP   8. PHPUnit_Framework_TestCase->runBare() phar:///opt/buildkit/bin/phpunit4/phpunit/Framework/TestResult.php:612
PHP   9. CiviUnitTestCase->runTest() phar:///opt/buildkit/bin/phpunit4/phpunit/Framework/TestCase.php:768
PHP  10. PHPUnit_Framework_TestCase->runTest() /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:184
PHP  11. ReflectionMethod->invokeArgs() phar:///opt/buildkit/bin/phpunit4/phpunit/Framework/TestCase.php:909
PHP  12. api_v3_JobProcessMailingTest->testBasic() phar:///opt/buildkit/bin/phpunit4/phpunit/Framework/TestCase.php:909
PHP  13. CiviMailUtils->assertRecipients() /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/tests/phpunit/api/v3/JobProcessMailingTest.php:107
PHP  14. CiviMailUtils->getAllMessages() /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviMailUtils.php:291
PHP  15. CiviMailUtils->convertToEzc() /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviMailUtils.php:211
PHP  16. spl_autoload_call() /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviMailUtils.php:352
PHP  17. Composer\Autoload\ClassLoader->loadClass() /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviMailUtils.php:352
PHP  18. Composer\Autoload\includeFile() /opt/buildkit/build/crm19757.fudev.co.nz/sites/all/modules/civicrm/vendor/composer/ClassLoader.php:301
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.