cloudControl / buildpack-php

cloudControl PHP buildpack
Apache License 2.0
13 stars 18 forks source link

Symfony 3.0 support #57

Closed dialogik closed 8 years ago

dialogik commented 8 years ago

When will Symfony 3.0 be supported? It currently won't push/deploy:

  1. $ composer create-project symfony/framework-standard-edition symfony3-test
  2. Change composer.json according to cloudControl blog

    "php": ">=5.5.9", ===> "php-64bit": ">=5.5.9",
  3. Push

    $ git init and commit..
    $ cctrlapp mysymfony3testapp push

Result

...
       [Symfony\Component\Debug\Exception\ContextErrorException]                                                                                                                                                                                                                                                                                                                                                
       Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

     cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception

  [RuntimeException]                                                                                                                                                                                                                                                                                                                                                                                            
  An error occurred when executing the "'cache:clear --no-warmup'" command:                                                                                                                                                                                                                                                                                                                                     

    [Symfony\Component\Debug\Exception\ContextErrorException]                                                                                                                                                                                                                                                                                                                                                   
    Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

  cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>                                                                                                                                                                                                         

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

 !     cloudControl push rejected, failed to compile php app
 !
remote: error: hook declined to update refs/heads/master
To ssh://mysymfony3testapp@cloudcontrolled.com/repository.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://mysymfony3testapp@cloudcontrolled.com/repository.git'
dialogik commented 8 years ago

After further research I believe that this is not a bug related to this repository. A workaround can be found on StackOverflow:

If you can't set it correctly in your php.ini for some reason then you can set it as the first thing in your AppKernel, like so..

class AppKernel extends Kernel
{
    public function __construct($environment, $debug)
    {
        date_default_timezone_set('Europe/London');
        parent::__construct($environment, $debug);
    }

    public function registerBundles()
    {
        $bundles = array(
            ....
        );
    }
    ....
}