Bug 170775

Summary: Symfony not detected with existing sources
Product: php Reporter: jmerhar <jmerhar>
Component: SymfonyAssignee: Tomas Mysik <tmysik>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: vsamoletov
Version: 6.x   
Target Milestone: 6.x   
Hardware: All   
OS: All   
Whiteboard:
Issue Type: DEFECT Exception Report:

Description jmerhar 2009-08-23 15:26:39 UTC
After creating a project with existing sources, NetBeans (Build 200908022240) failed to detect it as a Symfony project.
The cause for this is probably the alternative directory structure used in the project. The project uses the following
directory structure:
site/
  apps/
  batch/
  cache/
  config/
  data/
  doc/
  lib/
  log/
  plugins/
  test/
  symfony
web/
  css/
  images/
  js/
  uploads/
  index.php
  site_dev.php

This is a perfectly valid directory structure for Symfony. The reason for using this kind of layout is to reduce clutter
on the production server, where the site directory is located outside the public web directory.
Comment 1 Tomas Mysik 2009-08-24 10:22:53 UTC
Could you please point me to a URL where could I find more information about possible directory structure? This is
needed in order to recognize other possibilities as well.

In any case, I will look at it.

Thanks.
Comment 2 jmerhar 2009-08-24 10:51:02 UTC
With Symfony, you can basically have any kind of directory structure you wish, therefore the IDE should not rely on it
to detect Symfony. A better way for detecting Symfony would be to look for a file named "symfony", anywhere in the
project tree. This file is the CLI executable for running Symfony tasks.

More info on customizing directory structure:
http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files#chapter_19_custom_file_structure

This is what I did in my project to move the web root:
http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files#chapter_19_sub_modifying_the_project_web_root
Comment 3 Tomas Mysik 2009-11-09 05:41:30 UTC
Unfortunately, this scernario is not supported and it is not clear whether it will be done soon or not (sorry, most users use the standard directory structure).
Comment 4 Nenuial 2009-12-05 13:26:51 UTC
Couldn't you simply base the symfony detection on the presence of the file called "symfony" located at the root of the source files (the php file used to run all the commands) ?
Anybody with the capabilities to make major changes to the symfony file structure would certainly be able to adapt it in order to have that file a the root of the project source files.

I say this because I ran into the same problem as jmerhar although I just have a small difference to the "normal" symfony folder structure, namely my web folder is called www (something that is required by my production environement).

It would be really great if you could adapt to that situation, I'm sure we are quite a few people who tried out NetBeans when we heard it had symfony support and then were somewhat dissapointed discovering it didn't work just because we don't have the standard distribution structure...
Comment 5 Tomas Mysik 2009-12-11 09:42:29 UTC
*** Bug 178482 has been marked as a duplicate of this bug. ***
Comment 6 Tomas Mysik 2009-12-11 09:43:02 UTC
I will try to fix as many cases as possible.
Comment 7 Tomas Mysik 2010-02-05 05:23:42 UTC
Should be fixed but I need your verification if possible. If something does not work for you, just reopen this issue, attach a sample project and describe steps to reproduce.

Thanks a lot.
http://hg.netbeans.org/web-main/rev/10acaf3b1072
http://hg.netbeans.org/web-main/rev/881ae7bedb6d
Comment 8 Quality Engineering 2010-02-05 22:51:08 UTC
Integrated into 'main-golden', will be available in build *201002060200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/10acaf3b1072
User: Tomas Mysik <tmysik@netbeans.org>
Log: #170775: Symfony not detected with existing sources
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo