Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1136

Prevent backup files to be recognized as valid Entity files

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, Git Master
    • Fix Version/s: 2.0.5
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None
    • Environment:
      all

      Description

      The Doctrine2 generator backup Entity files when it adds code into them. The files are named after the original file with a ~ prepended.

      The problem is that these backup files are valid PHP files, and as such, they are loaded by Doctrine2. A PHP fatal error is then fired: "Cannot redeclare class...".

      Instead of prepending , why not appending ~, which is a well supported convention? (foo.php vs ~foo.php)

      Patch is here: https://github.com/doctrine/doctrine2/pull/35

        Activity

        Fabien Potencier created issue -
        Hide
        Benjamin Eberlei added a comment -

        Applied and merged to 2.0.x

        Show
        Benjamin Eberlei added a comment - Applied and merged to 2.0.x
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.5 [ 10133 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 12613 ] jira-feedback [ 14849 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14849 ] jira-feedback2 [ 16713 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16713 ] jira-feedback3 [ 18966 ]

        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=DDC-1136, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Fabien Potencier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: