junichi11/cakephp3-netbeans

cakephp 3 netbeans wrong folder structure

Closed this issue · 17 comments

Hi I'm trying to run my first project with cakephp, using Netbeans 8.0.2 on MAC, with MAMP 3.4, installed the org-netbeans-modules-php-cake3-0.0.7-dev-201408251540.nbm.
Looking at the nice tutorial available at https://www.youtube.com/watch?v=BFqhOmVoM5M, even if based on 2.x version, the directory structure that my IDE creates is completely different. Files like core.phh and database.php (and much more files and folders) are missing. In project properties Frameworks/CakePhp there's a warning: Not found cake script file(cake.php). Looking for the right files in cakephp-3.1.1 folder just downloaded it seems completely different than cakephp-2.7.5. Some suggestions? Thanks in advance

Looking for the right files in cakephp-3.1.1 folder just downloaded it seems completely different than cakephp-2.7.5.

It's correct. So it is not plugin's problem. There are some differences between CakePHP 2.x and 3.x.

Fine. Are there some useful tutorials for CackePHP 3 and Netbeans 8? I'd like to start with this framework but all the material available online is about version 2.x
What I'd like to know if is it normal that IDE shows following error, see pic
screen shot 2015-10-15 at 10 37 18

Thanks

Are there some useful tutorials for CackePHP 3 and Netbeans 8?

Unfortunately, I don't know at the moment. I think that you should read the README file at first.

What I'd like to know if is it normal that IDE shows following error, see pic

You don't use the plugin for CakePHP3 (cakephp3-netbeans). You are using cakephp-netbeans plugin. It's for CakePHP2.x or 1.x.

The plugin for CakePHP3.x is here: https://github.com/junichi11/cakephp3-netbeans/releases

You said that you are using cakephp3-netbeans pluign and CakePHP3.1.1. But It seems that it is not correct. So, please exactly write your environments (e.g. version of NetBeans, pluign and CakePHP e.t.c.).

Thanks.

It sounds like you're asking for CakePHP 3x documentation?
http://book.cakephp.org/3.0/en/index.html
and the api:
http://api.cakephp.org/3.1/

The plugin for CakePHP3.x is here: https://github.com/junichi11/cakephp3-netbeans/releases

yes this is exactly what I downloaded first

You said that you are using cakephp3-netbeans pluign and CakePHP3.1.1. But It seems that it is not correct. So, please exactly write your environments (e.g. version of NetBeans, pluign and CakePHP e.t.c.).

  • Netbeans 8.0.2
  • org-netbeans-modules-php-cake3-0.0.7-dev-201408251540.nbm
  • cakephp-3.1.1

see pic:

screen shot 2015-10-16 at 09 43 31

It sounds like you're asking for CakePHP 3x documentation?

no I'm looking for some advices to run everything inside Netbeans, with the last version of CakePHP

yes this is exactly what I downloaded first
see pic:

No, It's wrong. It has not been installed yet. I guess that you just download it.
If it was installed, you can find a configuration for CakePHP3 in your project properties. But your project properties dialog does not have it.

nb-cake3-issue39-1

$#!+ ......

such a stupid....
well in anyway now it works but I had to install the following
org-netbeans-modules-php-cake3-0.0.7-dev-201411181905.nbm
as mentioned in [junichi11] #11
Now oddly the IDE suggests me to create a 2.x CakePHP project and not as expected a 3.x.
screen shot 2015-10-16 at 16 56 12

But it works and the initial page appears in browser

well in anyway now it works but I had to install the following
org-netbeans-modules-php-cake3-0.0.7-dev-201411181905.nbm
as mentioned in [junichi11] #11

Well... I'm not sure what you want to do exactly...

You want to use CakePHP 2.x? or 3.x?

You are using cakephp-netbeans plugin(for CakePHP2.x or 1.x).

I wrote how to install and enable in the README.md (https://github.com/junichi11/cakephp3-netbeans/blob/master/README.md). Did you read it?

If you installed cakephp3-netbeans, it is shown in the installed tab. Just check it.

nb-cake3-issue39-2

Did you click the install button?

nb-cake3-issue39-3

Well... I'm not sure what you want to do exactly...

I'd like to start using CakePHP Framework

You want to use CakePHP 2.x? or 3.x?

Up to what I read 3.x is more object oriented, instead 2.x is not completely OO. If I could use 3.x it would be preferable.

If you installed cakephp3-netbeans, it is shown in the installed tab. Just check it.

Yes it's installed
screen shot 2015-10-17 at 10 37 37

I wrote how to install and enable in the README.md (https://github.com/junichi11/cakephp3-netbeans/blob/master/README.md). Did you read it?

yes I did
but when I flag Frameworks > CakePHP3 > Check Enabled another message arises
Dir(src) /src : Existing path must be set.
screen shot 2015-10-17 at 10 48 43

It seems that you were able to install it.

but when I flag Frameworks > CakePHP3 > Check Enabled another message arises

I wrote also that in the README.md (https://github.com/junichi11/cakephp3-netbeans/blob/master/README.md#use-your-custom-directory-structure, https://github.com/junichi11/cakephp3-netbeans/blob/master/README.md#the-others)

Perhaps, your directory structure is not default. Just show your directory tree.

This is the structure (Tree would be too verbose)
screen shot 2015-10-17 at 16 52 59

and this what I get when RUN the project, without flag Frameworks > CakePHP3 > Check Enabled

screen shot 2015-10-17 at 17 22 15

Umm, It's CakePHP2.7.5... NOT CakePHP3

You say one thing but do another... I cannot understand that. Sorry, here is not a place to tell you differences between CakePHP2.x and 3.x. So, you should read the documentation for CakePHP[1] at first. There are how to install CakePHP3.x, tutorials, e.t.c. there.

[1] http://book.cakephp.org/3.0/en/index.html

I know, you're right. But I expected the plugin doing it for me. I simply run Netbeans, create a PHP/PHP Application, and select CakePHP Framework. As you've seen the correct plugin is installed. Once the IDE asks me to select the version of CakePHP that I'd like to use, only 2.x are listed and the most recent is 2.7.5. This is the reason because at he end the output is 2.7.5

But I expected the plugin doing it for me

You should say that at first. e.g. I want to ... I expect ... Can this plugin do ...? e.t.c.

This is the reason because at he end the output is 2.7.5

It is not a feature for cakephp3-netbeans(this plugin) but cakephp-netbeans plugin. If you don't understand differences between cakephp3-netbeans and cakephp-netbeans plugin, perhaps you should uninstall the cakephp-netbeans plugin. It would confuse you.

CakePHP3 should be installed via Composer (just read the documentation).

Actually, we can install CakePHP3.x latest version in NetBeans IDE(this plugin supports it). But I have not written that to the README.md yet. You can find it in the New Project Wizard(New Project > Category:PHP, Project:CakePHP3 Framework Application). Of course, you can install CakePHP 3 manually.

BTW, this plugin is development version yet. So, there would be missing something.
Thanks for your understanding.

It is not a feature for cakephp3-netbeans(this plugin) but cakephp-netbeans plugin. If you don't understand differences between cakephp3-netbeans and cakephp-netbeans plugin, perhaps you should uninstall the cakephp-netbeans plugin. It would confuse you.

First of all really thank you for your help. Extremely appreciated. I discover only now that there are two different plugins, it was not so clear till now, or it wasn't at all.
What is strangest is that installing org-netbeans-modules-php-cake3-0.0.7-dev-201411181905.nbm at the end what you get is the other version, the 2.x one, I thought that 3.0.0.7 was related to the latest version of Cake.
In any case also with 2.x there is something strange. The expected folder structure should be

  • app
  • lib
  • vendors
  • plugins
  • .htaccess
  • index.php
  • README

and what I get is completely different, as you see in above picture

First of all really thank you for your help. Extremely appreciated. I discover only now that there are two different plugins, it was not so clear till now, or it wasn't at all.

Sure :) If you find issues, please feel free to report them to GitHub Issues as a new issue.

What is strangest is that installing org-netbeans-modules-php-cake3-0.0.7-dev-201411181905.nbm at the end what you get is the other version, the 2.x one, I thought that 3.0.0.7 was related to the latest version of Cake.

Simply, This plugin supports only CakePHP3.x. cakephp-netbeans supports only CakePHP2.x and 1.x. I separated them as a new plugin since directory structure (and its names) are changed from CakePHP3.

In any case 2.x works and at this moment this is enough, I'll start with this version.

👍

Thanks.