zikula-modules / DizkusModule

Official repository for Dizkus, a fully integrated forum solution for Zikula 1.4+
21 stars 7 forks source link

Dizkus Module Path #200

Closed damon18 closed 11 years ago

damon18 commented 11 years ago

In setting up a local Git based site using Xampp and Windows Git (MINGW32) I've successfully setup the core and then used composer to get the vendor libraries and it installed successfully.

Now trying to add modules by cloning their repos directly to the /modules folder so they can be easily updated.

Using Git Bash from the /modules directory I did a $ git clone https://github.com/zikula-modules/DizkusModule.git

which pulled Dizkus into /modules/DizkusModule so the Dizkus tree looks like

 /modules
    /DizkusModule
      /Zikula
        /Module
          /DizkusModule
            /Api
            /Block
            etc...

Instead of

 /modules
    /zikula-dizkus
      /Zikula
        /Module
          /DizkusModule
            /Api
            /Block
            etc...

Like the Readme states...

Should the Readme be changed or am I doing something wrong? Dizkus installed and runs using this setup.

craigh commented 11 years ago

Dizkus installed and runs using this setup.

interesting. I tested that a while ago and it didn't work.

@drak ???

craigh commented 11 years ago

ping @drak

craigh commented 11 years ago

I can confirm this now. I am able to install without the base directory of zikula-dizkus also. @drak - what do you think about this?

ghost commented 11 years ago

@craigh - yes, this is expected.

craigh commented 11 years ago

So then I am confused - what directory structure is required and how can that requirement be enforced?

ghost commented 11 years ago

@craigh - this is not important for the time being, but I think you also miss, the very point here is that location is being decoupled, and this is a work in progress too. I will get time in October to work more on the core.

craigh commented 11 years ago

@damon18 - there are things that will not work with that module path because somethings are hard-coded to the prescribed pathname - just do a global search in the module for zikula-dizkus and you will see what I mean.

damon18 commented 11 years ago

I have a feeling the reasons that there are these hard-coded items would go over my head. Will all modules be named this way in the future?

craigh commented 11 years ago

refs https://github.com/zikula/core/pull/1212

cmfcmf commented 11 years ago

@craigh There shouldn't be any hard coded occurrences. this is exactly what we have to avoid. If there is no other possibility, I guess you should open an issue in the core describing your problem.

craigh commented 11 years ago

core PR has been merged, so there are no longer hard-coded references to module path in Dizkus.

@damon18 wrote:

Will all modules be named this way in the future?

I'm not sure exactly, but I believe @drak 's intention is to follow symfony's naming style and bundle structure so I assume that, yes, future modules will indeed be named in a similar style and be expected to be in the same type of directory structure.

But as you observed, the top-level zikula-dizkus is ultimately optional I guess. Apparently, @drak envisions a future where the location of the module is not critical to its operation.

damon18 commented 11 years ago

@craigh I'm not really understanding this issue well.

For right now, what should I do? In a new install if I add Dizkus by doing a git clone https://github.com/zikula-modules/DizkusModule.git

can I just leave things as they fall or need to make some change?

craigh commented 11 years ago

cd modules &&

git clone https://github.com/zikula-modules/DizkusModule.git zikula-dizkus

or

git clone https://github.com/zikula-modules/DizkusModule.git

should work. the first will clone the repo in the target directory as specified in the docs. the second into its own directory. both will (now) work but the first is the "official" way.

/cc @drak

ghost commented 11 years ago

@damon18 I reformatted your markdown - I didnt really understand the ticket properly until I did that. What @craigh says is perfect.

ghost commented 11 years ago

Basically, a module is a discrete package that is autoloaded. Currently the package MUST follow PSR-0. If PSR-4 passes, you can do that too. Zikula no longer cares, so long as a supported autoloading standard is followed, and the bare minimum metadata files are present. The rest is really irrelevant. But for now, @craigh explained the git clone process perfectly and that is definitely what you SHOULD do.