Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error in php 5.5.9 ( unexpected '.', expecting '&' or variable ) #10035

Closed
GaneshKandu opened this issue Jan 14, 2017 · 11 comments
Closed
Milestone

Comments

@GaneshKandu
Copy link

Getting Syntax Error on PHP 5.5.9

Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in vendor/cakephp/cakephp/src/I18n/functions.php on line 26

  • CakePHP Version: 3.3.12 9e41f11
  • Platform and Target: Apache/2.2.31, PHP 5.5.9

What happened

Getting Syntax Error on PHP 5.5.9
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in vendor/cakephp/cakephp/src/I18n/functions.php on line 26

Cakephp using Variadic functions Which is introduced in PHP 5.6 and Not Supported in PHP 5.5
http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list

@dakota
Copy link
Member

dakota commented Jan 14, 2017

That file in 3.3.12 (https://github.com/cakephp/cakephp/blob/3.3.12/src/I18n/functions.php#L26) does not use varidacs. In the 3.4 beta it does, check that you have not installed 3.4 be accident.

@GaneshKandu
Copy link
Author

i have Downloaded from Github https://github.com/cakephp/cakephp/releases/download/3.3.12/cakephp-3-3-12.zip

332

I have Confirmed its 3.3.12

@GaneshKandu
Copy link
Author

Tested on 5.6 also but Getting Warnings

error-5.6.txt

@josegonzalez
Copy link
Member

@markstory it looks like the 3.3.12 release is actually 3.4.0-beta4. I'm going to delete the zip for now and let you fix it in the morning (I would but am not sure what the process is).

@GaneshKandu
Copy link
Author

GaneshKandu commented Jan 14, 2017

What is the PHP Required version of next Stable version? 👍

@ADmad
Copy link
Member

ADmad commented Jan 14, 2017

CakePHP 3.4 requires PHP 5.6+

@ADmad ADmad reopened this Jan 14, 2017
@ADmad
Copy link
Member

ADmad commented Jan 14, 2017

I reopened the issue since the incorrect version being packaged is a valid problem.

@ADmad ADmad added this to the 3.3.13 milestone Jan 14, 2017
@josegonzalez
Copy link
Member

I have updated the cakephp-3-3-12.zip attached to our release here and verified it contains the correct code. Sorry about that!

@GaneshKandu
Copy link
Author

Thanks a Lot Working Fine now

@markstory
Copy link
Member

@josegonzalez Not sure how that happened. The release script is a single make command. Perhaps the constraints in cakephp/app are off?

@markstory
Copy link
Member

Installing app dependencies with composer
# Install deps with composer
cd build/app && php ../../composer.phar install
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "../../composer.phar self-update" to get the latest version.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
> Cake\Composer\Installer\PluginInstaller::postAutoloadDump
> App\Console\Installer::postInstall
Set Folder Permissions ? (Default to Y) [Y,n]? y
No Security.salt placeholder to replace.
# Copy the current cakephp libs up so we don't have to wait
# for packagist to refresh.
rm -rf build/app/vendor/cakephp/cakephp
cp -r build/cakephp build/app/vendor/cakephp/cakephp
# Make a zipball of all the files that are not in .git dirs
# Including .git will make zip balls huge, and the zipball is
# intended for quick start non-git, non-cli users
Building zipball for 3.3.12
cd build/app && find . -not -path '*.git*' | zip ../../dist/cakephp-3-3-12.zip -@

is the build output from the 3.3.12 release I did last night.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants