Skip to content
Permalink
Browse files

Make global paths for vendors and plugins based on ROOT.

Using CAKE means that composer installed CakePHP will generate incorrect
'global' paths.

Refs #5838
  • Loading branch information...
markstory committed Feb 26, 2015
1 parent de255ae commit aec0241a4cbad40ff80f4de46aeff679cddac7b5
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Core/App.php
@@ -874,11 +874,11 @@ protected static function _packageFormat() {
),
'Vendor' => array(
'%s' . 'Vendor' . DS,
dirname(dirname(CAKE)) . DS . 'vendors' . DS,
ROOT . DS . 'vendors' . DS,
),
'Plugin' => array(
APP . 'Plugin' . DS,
dirname(dirname(CAKE)) . DS . 'plugins' . DS
ROOT . DS . 'plugins' . DS
)
);
}

5 comments on commit aec0241

@davehensley

This comment has been minimized.

Copy link

davehensley replied Mar 20, 2015

Unfortunately, this breaks apps that use shared plugins/vendors directories. Please see issue #6124.

@dereuromark

This comment has been minimized.

Copy link
Member

dereuromark replied Mar 20, 2015

Webspace is cheap. Why are you not duplicating/copying those files? Or - as you should be doing - using composer and installing them as real vendor dependencies?

@davehensley

This comment has been minimized.

Copy link

davehensley replied Mar 20, 2015

Thank you for your quick response.

While I understand that the purpose of this commit is to make global paths work with composer, I do not wish to use composer for this particular project.

If we were talking about CakePHP 3.0, I would agree with your statement that I "should be" using composer, as the 3.0 book recommends. But composer is not even mentioned in the CakePHP 2.0 installation guide: http://book.cakephp.org/2.0/en/installation.html

However, you'll note that there IS a section in the guide called "Using one CakePHP Checkout for multiple Applications" which describes how to do exactly what I am doing. Clearly, it's a supported solution, and the benefits of maintaining only a single CakePHP core should be obvious.

In any case, bugfix releases aren't supposed to create backwards incompatible changes, so my suggestion/request here would be to revert, or code a backwards compatible workaround.

@markstory

This comment has been minimized.

Copy link
Member Author

markstory replied Mar 20, 2015

@davehensley Creating non-functional installations when installed with composer seems bad too. We could add another fallback path that restored the old value. Would that work for you?

@davehensley

This comment has been minimized.

Copy link

davehensley replied Mar 20, 2015

@markstory That sounds like it would be perfect. Thanks.

Please sign in to comment.
You can’t perform that action at this time.