I downloaded and installed Symfony 2.8 from my own PC. I copied my project and entered it on the PC of our companies. I have not created and connected to the database yet. I tried to make php app/console server:run on c:\xampp\htdocs\ninjaz\ , but after that I got this error message.
Parse error: syntax error, unexpected ':', expecting ';' or '{' in C:\xampp\htdo cs\Ninjaz\vendor\doctrine\annotations\lib\Doctrine\Common\Annotations\Annotation Registry.php on line 50
Edit: My own PC has XAMPP since PHP 7.1. Our company PC has XAMPP PHP 5.5.19
This is the content of AnnotationRegistry.php:
<?php namespace Doctrine\Common\Annotations; final class AnnotationRegistry { static private $autoloadNamespaces = []; static private $loaders = []; static private $failedToAutoload = []; public static function reset() : void { self::$autoloadNamespaces = []; self::$loaders = []; self::$failedToAutoload = []; } public static function registerFile(string $file) : void { require_once $file; } public static function registerAutoloadNamespace(string $namespace, $dirs = null) : void { self::$autoloadNamespaces[$namespace] = $dirs; } public static function registerAutoloadNamespaces(array $namespaces) : void { self::$autoloadNamespaces = \array_merge(self::$autoloadNamespaces, $namespaces); } public static function registerLoader(callable $callable) : void {
I managed to start the server by deleting those : void and : bool , but when I look at my project, it returns another error and the same with the first, but when I try to delete it again, it creates another error for other libraries. This is like an endless error after an error scenario. I do not know what to do now. I am new to symfony. Help is urgently needed.
source share