Skip to content

Commit

Permalink
Make global paths for vendors and plugins based on ROOT.
Browse files Browse the repository at this point in the history
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 aec0241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Core/App.php
Expand Up @@ -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
)
);
}
Expand Down

5 comments on commit aec0241

@davehensley
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dereuromark
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.