Composer error with php 5.5

Composer gives error with php 5.5 because constant scalar is pupported on >5.6. Parse error in composer\autoload_static.php at line 10 - syntax error, unexpected ‘.’, expecting ‘)’

and line 10 of that file is:

    '34901568a1e26d13dd475cb2c85e0284' => __DIR__ . '/..' . '/zendframework/zend-form/autoload/formElementManagerPolyfill.php',

in the file below. It works fine with 5.6, so if I use autoload.php on php 5.5, will I get the error? Or it uses its other files like *_files.php, *_classmap.php etc? Or what to do to have autoload.php compatible with 5.5? Please advise

<?php

// autoload_static.php @generated by Composer

namespace Composer\Autoload;

class ComposerStaticInitf5fb4a6513c4bb8e1183f32a6d8a31be
{
public static $files = array (
'34901568a1e26d13dd475cb2c85e0284' => __DIR__ . '/..' . '/zendframework/zend-form/autoload/formElementManagerPolyfill.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'3e2471375464aac821502deb0ac64275' => __DIR__ . '/..' . '/symfony/polyfill-php54/bootstrap.php',
'6a47392539ca2329373e0d33e1dba053' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/bootstrap.php',
'67153d798259e2422f77ee379077b565' => __DIR__ . '/..' . '/minfraud/http/src/HTTPBase.php',
'038a1d49667b1c077e3f164315eba901' => __DIR__ . '/..' . '/minfraud/http/src/CreditCardFraudDetection.php',
);

Why can’t you upgrade to 5.6 or above? At a glance at the autoload code of composer i did not see any code that would that would prevent the autoloader from working on 5.5 but the packages installer does have features that will not work on 5.5 so you will run into problems there. It would be wise to upgrade your 5.5 to 5.6 if composer is a need.

I have 5.6 too but as I give away my source I wanted it to work with 5.5 too.

Then you should downgrade your required libraries inside composer to match those who work with php 5.5

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.