Symfony2 Syntax Errors (in vendor files)

Posted by user1665246 on Stack Overflow See other posts from Stack Overflow or by user1665246
Published on 2012-09-12T09:19:17Z Indexed on 2012/09/12 9:38 UTC
Read the original article Hit count: 241

Filed under:
|
|
|

To maintain code integrity across our servers we'd like to keep the /vendor/* directory under source control, rather than use composer to download files each time we roll out onto another server - i.e. we can be certain that the /vendor/* files are identical.

We run a syntax checker against all files committed to source control and run across the following error:

File '/vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Resources/skeleton/bundle/Bundle.php' failed the PHP syntax check with the following error:
PHP Parse error:  syntax error, unexpected '}', expecting T_NS_SEPARATOR in /vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Resources/skeleton/bundle/Bundle.php on line 3

Is the "error" in this file intentional ? Any help appreciated. File contents below:

<?php
namespace {{ namespace }};

use Symfony\Component\HttpKernel\Bundle\Bundle;

class {{ bundle }} extends Bundle
{
}

© Stack Overflow or respective owner

Related posts about php

Related posts about syntax