Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318013 - No completion on object into a class.
Summary: No completion on object into a class.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-25 12:38 EDT by Miguel A. Valero CLA
Modified: 2020-05-14 11:18 EDT (History)
1 user (show)

See Also:


Attachments
files that reproduce the bug (8.92 KB, application/force-download)
2010-06-25 23:19 EDT, Miguel A. Valero CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel A. Valero CLA 2010-06-25 12:38:54 EDT
Build Identifier: 20100617-1415

With the follow code, the auto completion not work.

Classes:

class db_layer {
  public $server = "";
  public $username = "";
  public $password = "";
  public $dbname = "";
  public $debug = false;

  public function connect(){
    /* code */
  }
}

class mysite {
  public $db;
  public function __construct(){
    $this->db = new db_layer;
  }
}

Script:

include("mysite.class.php");

$site = new mysite();
$site->db-> //Here show a message "No completion available"

Reproducible: Always
Comment 1 Miguel A. Valero CLA 2010-06-25 12:44:58 EDT
I have installed PDT 2.00 (Eclipse 3.4.2 Build M20090211-1700).

The autocompletion work fine in this installation... the same code show the error message in the new release of PDT.

PD: I'm sorry for my english i speak spanish.
Comment 2 Zhongwei Zhao CLA 2010-06-25 20:29:00 EDT
PHP2.2 works well.
Comment 3 Miguel A. Valero CLA 2010-06-25 21:52:02 EDT
I can't believe that your answer is PDT works well...

I've been trying to find information about this problem and always references to "variables classes" on extended classes... the problem always ocurr with an extended class.

I'm using PDT since ganymede and works fine... but with helios the autocompletion don't work.

if "PHP2.2 works well." then... the only fix to me is: Do not change to the new release or wait to a version more stable or mature.
Comment 4 Zhongwei Zhao CLA 2010-06-25 22:24:38 EDT
Hi Miguel

I will download the release now,and test it,because I tested it using my development environment.If I can reproduce this bug,I will reopen it,if I could not,let us QA to verify it,ok?
Comment 5 Zhongwei Zhao CLA 2010-06-25 22:37:18 EDT
Hi

I download Eclipse for PHP Developers from http://eclipse.org/downloads/ win32,and I could not reproduce this bug.
Comment 6 Zhongwei Zhao CLA 2010-06-25 22:45:35 EDT
Sorry I mean PHP2.2 works well for this issue:)
I'm sorry for my english too,I speak Chinese,haha
Comment 7 Miguel A. Valero CLA 2010-06-25 22:53:17 EDT
ok... I'm sorry too... the bug occurrs with an extended class.

I'll download the release again and test.
Comment 8 Zhongwei Zhao CLA 2010-06-25 22:55:24 EDT
OK,and it is better to attach your php files that can reproduce this bug,so I will not misunderstand you,thanks!
Comment 9 Miguel A. Valero CLA 2010-06-25 23:19:44 EDT
Created attachment 172828 [details]
files that reproduce the bug
Comment 10 Zhongwei Zhao CLA 2010-06-25 23:33:47 EDT
Hi mate

I do not know how to use your php files,sorry...
Comment 11 Zhongwei Zhao CLA 2010-06-28 00:37:56 EDT
Hi
I found a case that can reproduce this bug,reopen it.
Comment 12 Zhongwei Zhao CLA 2010-07-12 03:59:44 EDT
fixed in head

use the following php content to test:
<?php
class layer {
	public $server = "";
	public function connect(){

	}
}
class db_layer extends layer{

}
class site {
	public $db;
	public function __construct(){
		$this->db = new db_layer;
		for ($i = 0; $i < number_variable; $i++) {
			
		}
	
	}
}
class mysite extends site{

}
$site = new mysite();
$site->db->
Comment 13 Gadi Goldbarg CLA 2010-08-26 10:32:35 EDT
[Petyo Tanchev]

Tested on 2.2.1 SR1
Fixed