Search code examples
phpsymfonydeploymentpagoda-box

unlink() : No such file or Directory on Pagobox with symfony2 app


I would like push my symfony2 app on Pagodabox but I have an error message :

Warning: unlink(/data/app/cache/prod/annotations/54cb4f93b11de6.12347258nKaIkm): No such file or directory in /data/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php line 214

I thought that Symfony2 doesn't access to cache so I tried define permission (see http://symfony.com/doc/current/book/installation.html 'Setting up Permissions') but same problem.

My folder 'app/cache' is pushed and it's hydrated on Pagoda.

I have a similar problem with Heroku and Platform.sh.

My pagodabox config :

global:
  env:
    - USE_INTL_ICU_DATA_VERSION: true

build:
  type: php
  version: 5.5
  before_exec:
    - "wget https://getcomposer.org/composer.phar"
    - "rm -f web/app_dev.php"
  after_exec:
    - "cp app/config/parameters.pagoda.yml.dist app/config/parameters.yml"
    - "php app/console --env=prod assetic:dump"
  exec:
    - "php composer.phar install --prefer-source --optimize-autoloader"

web1:
  type: php
  version: 5.5
  network_dirs:
    sotage1:
      - app/cache
      - app/logs
      - app/sessions
  httpd_document_root: web
  httpd_index_list:
    - app.php
  php_extensions:
    - apc
    - intl
    - mbstring
    - xsl
    - mysql
    - pdo_mysql
    - zip
    - curl
  php_short_open_tag: "0"
  php_magic_quotes_gpc: "0"
  php_register_globals: "0"
  php_session_autostart: "0"
  php_date_timezone: Europe/Paris

  before_deploy:
    - "rm -rf app/cache/*"
    - "php -d memory_limit=-1 app/console --env=prod --no-debug cache:clear"
    - "php -d memory_limit=-1 app/console --env=prod --no-debug cache:warmup"
    - "php app/console --env=prod --no-debug doctrine:migrations:migrate -n"
    - "php app/console --no-interaction doctrine:fixture:load"

I use symfony 2.6.3 (same problem with symfony 2.7/ symfony3).

Any idea ?

Regards,

Edit : Same probem to local production's env


Solution

  • Right, I've updated "doctrine/annotations" at dev-master's version and it's fix.

    See https://github.com/doctrine/annotations/pull/51