Re: 3.x: Same Behaviour for Multiple Tables

2014-07-29 Thread Bernhard Minatti
ha, rightthanks :-)

using
namespace App\Model\Behavior;
solved the problem!


Am Dienstag, 29. Juli 2014 04:33:38 UTC+2 schrieb euromark:

 Why are you using

 namespace Cake\Model\Behavior;

 in your behavior?
 The namespace should cleary be App\...

 mark


 Am Montag, 28. Juli 2014 15:43:35 UTC+2 schrieb Bernhard Minatti:

 Hello!

 I'm trying to add the same behaviour to multiple Tables, which are 
 related to each other. Thus i created a class SpecialBehaviour, which is 
 included in both Tables in their initialize() method:
 $this-addBehavior('SpecialBehaviour');

 It works fine, when only one of the tables is queried, but when executing 
 a Query that joins the two tables together, an error is thrown:
 *Cannot redeclare class Cake\Model\Behavior\SpecialBehavior*

 Is there another way to add a global behavior to multiple tables?

 thanks in advance!



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0.0-alpha2 released

2014-07-29 Thread HK
Too sad to hear cache helper is removed. This ESI based replacement is it 
going to be in stable 3.0 version?

On Monday, July 28, 2014 10:13:14 AM UTC+3, José Lorenzo wrote:


 CacheHelper has been removed from CakePHP. The core team feels that the 
 functionality this helper provided is best handled by standalone servers 
 like Varnish http://varnish-cache.org/. While we explored building a 
 ESI based replacement for CacheHelper, there were a number of edge cases 
 that would have complicated the implementation.

 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with COUNT() as query field

2014-07-29 Thread Sam Clauw
That does the trick for me, thx a lot!
BUT, I found out that when you use it in a behavior: it won't work at all. 
The array is shown as when you don't use the virtual fields:

array(
   (int) 0 = array(
 'CmsPage' = array(
   'id' = '2',
   'name' = 'Pagina's',
   'lft' = '2',
   'rgt' = '5',
   'plugin' = 'coaster_cms',
   'controller' = 'pages',
   'action' = 'index',
   'show' = 'Y',
   'deleted' = null
 ),
 (int) 0 = array(
   'CmsPage__depth' = '1'
 )
   ),
 ...


I tried to change the name of my virtual field etc, but it won't work. Any 
idea what could cause this?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with COUNT() as query field

2014-07-29 Thread Sam Clauw
Sorry, my bad! I forgot to change the virtual field declaration to

$model-virtualFields['depth'] = 0;


Thanks anyway ;) 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0.0-alpha2 released

2014-07-29 Thread José Lorenzo
HK why would you miss it? There will be no replacement for the cache 
helper. We recommend using Varnish, which provides the ESI tags. They are 
similar to the cache tags but they involve internally doing another 
request. We think this is a more robust and scalable solution than doing it 
in PHP.

On Tuesday, July 29, 2014 9:06:36 AM UTC+2, HK wrote:

 Too sad to hear cache helper is removed. This ESI based replacement is it 
 going to be in stable 3.0 version?

 On Monday, July 28, 2014 10:13:14 AM UTC+3, José Lorenzo wrote:


 CacheHelper has been removed from CakePHP. The core team feels that the 
 functionality this helper provided is best handled by standalone servers 
 like Varnish http://varnish-cache.org/. While we explored building a 
 ESI based replacement for CacheHelper, there were a number of edge cases 
 that would have complicated the implementation.

  


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0.0-alpha2 released

2014-07-29 Thread HK
For small sites that I develop is very helpful. The need to 
use/configure/monitor extra software like varnish is pain in the ass, 
especially if you don't have big sites to host.

On Tuesday, July 29, 2014 11:28:17 AM UTC+3, José Lorenzo wrote:

 HK why would you miss it? There will be no replacement for the cache 
 helper. We recommend using Varnish, which provides the ESI tags. They are 
 similar to the cache tags but they involve internally doing another 
 request. We think this is a more robust and scalable solution than doing it 
 in PHP.

 On Tuesday, July 29, 2014 9:06:36 AM UTC+2, HK wrote:

 Too sad to hear cache helper is removed. This ESI based replacement is it 
 going to be in stable 3.0 version?

 On Monday, July 28, 2014 10:13:14 AM UTC+3, José Lorenzo wrote:


 CacheHelper has been removed from CakePHP. The core team feels that the 
 functionality this helper provided is best handled by standalone servers 
 like Varnish http://varnish-cache.org/. While we explored building a 
 ESI based replacement for CacheHelper, there were a number of edge cases 
 that would have complicated the implementation.

  



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0.0-alpha2 released

2014-07-29 Thread José Lorenzo
For those small sites, is having full page cache actually needed? I would 
guess that performance wouldn't be a big concern in those cases

On Tuesday, July 29, 2014 11:47:16 AM UTC+2, HK wrote:

 For small sites that I develop is very helpful. The need to 
 use/configure/monitor extra software like varnish is pain in the ass, 
 especially if you don't have big sites to host.

 On Tuesday, July 29, 2014 11:28:17 AM UTC+3, José Lorenzo wrote:

 HK why would you miss it? There will be no replacement for the cache 
 helper. We recommend using Varnish, which provides the ESI tags. They are 
 similar to the cache tags but they involve internally doing another 
 request. We think this is a more robust and scalable solution than doing it 
 in PHP.

 On Tuesday, July 29, 2014 9:06:36 AM UTC+2, HK wrote:

 Too sad to hear cache helper is removed. This ESI based replacement is 
 it going to be in stable 3.0 version?

 On Monday, July 28, 2014 10:13:14 AM UTC+3, José Lorenzo wrote:


 CacheHelper has been removed from CakePHP. The core team feels that the 
 functionality this helper provided is best handled by standalone servers 
 like Varnish http://varnish-cache.org/. While we explored building a 
 ESI based replacement for CacheHelper, there were a number of edge cases 
 that would have complicated the implementation.

  



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0.0-alpha2 released

2014-07-29 Thread HK
Why isn't needed? Why do I have to bother the server with more proccessing? 
I have for example a (medium size) VPS with 40+ domains. Some of them use 
cakePHP, and hopefully more in the future.
While each site is rather small (some with many pageviews though) all of 
them are hosted on the same server. 

Moreover you can achieve less page load times which IS crucial for 
visitors, SEO, etc.

On Tuesday, July 29, 2014 1:07:01 PM UTC+3, José Lorenzo wrote:

 For those small sites, is having full page cache actually needed? I would 
 guess that performance wouldn't be a big concern in those cases

 On Tuesday, July 29, 2014 11:47:16 AM UTC+2, HK wrote:

 For small sites that I develop is very helpful. The need to 
 use/configure/monitor extra software like varnish is pain in the ass, 
 especially if you don't have big sites to host.

 On Tuesday, July 29, 2014 11:28:17 AM UTC+3, José Lorenzo wrote:

 HK why would you miss it? There will be no replacement for the cache 
 helper. We recommend using Varnish, which provides the ESI tags. They are 
 similar to the cache tags but they involve internally doing another 
 request. We think this is a more robust and scalable solution than doing it 
 in PHP.

 On Tuesday, July 29, 2014 9:06:36 AM UTC+2, HK wrote:

 Too sad to hear cache helper is removed. This ESI based replacement is 
 it going to be in stable 3.0 version?

 On Monday, July 28, 2014 10:13:14 AM UTC+3, José Lorenzo wrote:


 CacheHelper has been removed from CakePHP. The core team feels that 
 the functionality this helper provided is best handled by standalone 
 servers like Varnish http://varnish-cache.org/. While we explored 
 building a ESI based replacement for CacheHelper, there were a number of 
 edge cases that would have complicated the implementation.

  



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0.0-alpha2 released

2014-07-29 Thread Thomas von Hassel
If you use good caching of expensive database requests, and offload static 
files to a CDN there is no need to bother with full page caching for most sites.

Our CMS with warm caches can display a somewhat complicated page in about 
100-200 ms ...

/thomas

On 29 Jul 2014, at 12:22, HK hkosm...@gmail.com wrote:

 Why isn't needed? Why do I have to bother the server with more proccessing? I 
 have for example a (medium size) VPS with 40+ domains. Some of them use 
 cakePHP, and hopefully more in the future.
 While each site is rather small (some with many pageviews though) all of them 
 are hosted on the same server. 
 
 Moreover you can achieve less page load times which IS crucial for visitors, 
 SEO, etc.
 
 On Tuesday, July 29, 2014 1:07:01 PM UTC+3, José Lorenzo wrote:
 For those small sites, is having full page cache actually needed? I would 
 guess that performance wouldn't be a big concern in those cases
 
 On Tuesday, July 29, 2014 11:47:16 AM UTC+2, HK wrote:
 For small sites that I develop is very helpful. The need to 
 use/configure/monitor extra software like varnish is pain in the ass, 
 especially if you don't have big sites to host.
 
 On Tuesday, July 29, 2014 11:28:17 AM UTC+3, José Lorenzo wrote:
 HK why would you miss it? There will be no replacement for the cache helper. 
 We recommend using Varnish, which provides the ESI tags. They are similar to 
 the cache tags but they involve internally doing another request. We think 
 this is a more robust and scalable solution than doing it in PHP.
 
 On Tuesday, July 29, 2014 9:06:36 AM UTC+2, HK wrote:
 Too sad to hear cache helper is removed. This ESI based replacement is it 
 going to be in stable 3.0 version?
 
 On Monday, July 28, 2014 10:13:14 AM UTC+3, José Lorenzo wrote:
 
 CacheHelper has been removed from CakePHP. The core team feels that the 
 functionality this helper provided is best handled by standalone servers like 
 Varnish. While we explored building a ESI based replacement for CacheHelper, 
 there were a number of edge cases that would have complicated the 
 implementation.
 
  
 
 -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
 
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/d/optout.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP 3.0.0-alpha2 released

2014-07-29 Thread José Lorenzo
Yeah, that's basically my point. We have no full page cache in our site and 
actually very limited use of caching in general, we can serve pages under 
50ms and most of them under 100.

On Tuesday, July 29, 2014 12:54:09 PM UTC+2, Thomas von Hassel wrote:

 If you use good caching of expensive database requests, and offload static 
 files to a CDN there is no need to bother with full page caching for most 
 sites.

 Our CMS with warm caches can display a somewhat complicated page in about 
 100-200 ms ...

 /thomas

 On 29 Jul 2014, at 12:22, HK hkosm...@gmail.com wrote:

 Why isn't needed? Why do I have to bother the server with more 
 proccessing? I have for example a (medium size) VPS with 40+ domains. Some 
 of them use cakePHP, and hopefully more in the future.
 While each site is rather small (some with many pageviews though) all of 
 them are hosted on the same server. 

 Moreover you can achieve less page load times which IS crucial for 
 visitors, SEO, etc.

 On Tuesday, July 29, 2014 1:07:01 PM UTC+3, José Lorenzo wrote:

 For those small sites, is having full page cache actually needed? I would 
 guess that performance wouldn't be a big concern in those cases

 On Tuesday, July 29, 2014 11:47:16 AM UTC+2, HK wrote:

 For small sites that I develop is very helpful. The need to 
 use/configure/monitor extra software like varnish is pain in the ass, 
 especially if you don't have big sites to host.

 On Tuesday, July 29, 2014 11:28:17 AM UTC+3, José Lorenzo wrote:

 HK why would you miss it? There will be no replacement for the cache 
 helper. We recommend using Varnish, which provides the ESI tags. They are 
 similar to the cache tags but they involve internally doing another 
 request. We think this is a more robust and scalable solution than doing 
 it 
 in PHP.

 On Tuesday, July 29, 2014 9:06:36 AM UTC+2, HK wrote:

 Too sad to hear cache helper is removed. This ESI based replacement is 
 it going to be in stable 3.0 version?

 On Monday, July 28, 2014 10:13:14 AM UTC+3, José Lorenzo wrote:


 CacheHelper has been removed from CakePHP. The core team feels that 
 the functionality this helper provided is best handled by standalone 
 servers like Varnish http://varnish-cache.org/. While we explored 
 building a ESI based replacement for CacheHelper, there were a number of 
 edge cases that would have complicated the implementation.

  


 -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/d/optout.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.