Doctrine 1
  1. Doctrine 1
  2. DC-974

generateFile = true - problematic implementation, see symfony ticket #4522

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Behaviors
    • Labels:
      None
    • Environment:
      symfony

      Description

      see http://trac.symfony-project.org/ticket/4522

      When using a behaviour with generateFile=true, som eproblematic issues occur:

      Let's take for example i18n:

      schema.yml
      ...
      actAs:
      fields: [text]
      generateFiles: true
      generatePath: <?php echo sfConfig::get('sf_lib_dir') ?>/model/doctrine/translations

      1) The translation model class and it's base class are not created with generate.php (aka symfony doctrine:build --model), but every time a translation model is used. This is not the expected behaviour, because
      a) this makes autoloading these classes impossible.
      b) the APC cache always sees a new change time, and recaches the fiels. This results in a quick fragmentation of the cache with segmentation faults in the long run.
      2) The permissions for the created files are wrong. Normal executable php scripts should not be writable by the web server (admitting that with the current implementation, this is not problem, because the files are created again for each request)
      3) The path is hard coded. This brakes deployment by svn update, and I would prefer not to build models on a production server.

      Proposal:

      • generate the files at build model time
      • hopefully find a solution with the path

      I realize that most development resources are now in the new doctrine, but this issue (especially the apc fragmentation) is a huge problem for me. If you won't fix it, let me know, then I would try to propose a patch. I checked the code, and the building and behaviour internal part of doctrine are not too well documented, and my patch would be far from perfect.

        Activity

        Georg created issue -

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DC-974, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Georg
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: