CakePHP 3.0.0-alpha2 released

2014-07-28 Thread José Lorenzo
The CakePHP core team is proud to announce the immediate availability of CakePHP 3.0.0-alpha2 https://github.com/cakephp/cakephp/releases/3.0.0-alpha2. CakePHP 3.0.0-alpha2 is the second alpha release for CakePHP 3.0.0. In the month since 3.0.0-alpha1 a few new features have been merged, and

Re: Behavior method won't work

2014-07-28 Thread Sam Clauw
Okay, I think I got it. I've made a single function as you suggested. *Controller* public function delete($id) { if ($this-request-is('get')) { throw new MethodNotAllowedException(); } $this-Attraction-id = $id; if

Re: CakePHP 3.0.0-alpha2 released

2014-07-28 Thread Dr. Tarique Sani
Hey Mark, I know it will be done when it is done but can't resist asking none the less - any ETA on the Debug Toolkit for v3 ? TIA Tarique On Mon, Jul 28, 2014 at 12:43 PM, José Lorenzo jose@gmail.com wrote: The CakePHP core team is proud to announce the immediate availability of

Re: CakePHP 3.0.0-alpha2 released

2014-07-28 Thread José Lorenzo
Once we release the beta we are going to focus more in plugins, such as debug kit. Beta is hopefully the next release :) On Monday, July 28, 2014 1:50:16 PM UTC+2, Dr. Tarique Sani wrote: Hey Mark, I know it will be done when it is done but can't resist asking none the less - any ETA on

CakePHP 3.0.0-alpha2 released

2014-07-28 Thread mark_story
The CakePHP core team is proud to announce the immediate availability of [CakePHP 3.0.0-alpha2](https://github.com/cakephp/cakephp/releases/3.0.0-alpha2). CakePHP 3.0.0-alpha2 is the second alpha release for CakePHP 3.0.0. In the month since 3.0.0-alpha1 a few new features have been merged,

3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread 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,

Re: 3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread José Lorenzo
Can you show where you created that behavior class?. It would be nice if you can gist your Tables as well On Monday, July 28, 2014 3:43:35 PM UTC+2, Bernhard Minatti wrote: Hello! I'm trying to add the same behaviour to multiple Tables, which are related to each other. Thus i created a

Re: CakePHP 3.0.0-alpha2 released

2014-07-28 Thread mark_story
I'll probably start on it very soon as most of the 'big' work items I wanted to get done for 3.0 are now complete. -Mark On Monday, 28 July 2014 07:50:16 UTC-4, Dr. Tarique Sani wrote: Hey Mark, I know it will be done when it is done but can't resist asking none the less - any ETA on the

Re: 3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread Bernhard Minatti
my files are as follows: src/Model/Behavior/SpecialBehavior.php namespace Cake\Model\Behavior; use Cake\Event\Event; use Cake\ORM\Behavior; use Cake\ORM\Query; use Cake\Network\Request; use Cake\Network\Session; use Cake\ORM\Table; use Cake\ORM\TableRegistry; use

Re: 3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread José Lorenzo
Can you also paste the full error you are getting? -- 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

Re: 3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread Bernhard Minatti
the error is as follows: [28-Jul-2014 16:14:06 UTC] PHP Fatal error: Cannot redeclare class Cake\Model\Behavior\SpecialBehavior in /Applications/MAMP/htdocs/hometeam/src/Model/Behavior/SpecialBehavior.php on line 38 this comes directy from the php error log, cakephp itself does not log

Re: 3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread José Lorenzo
Hmm, that's very odd. Can you add a die(stackTrace()); at the top of that file after the namespace declaration? Also try looking for the string 'SpecialBehavior' in your project, there must be another class with that same name that you are loading somehow. On Monday, July 28, 2014 8:16:08 PM

Re: 3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread José Lorenzo
Just a crazy idea, can you verify that in all places you have used the same casing? For example in some places you may have used 'sites' whereas in others 'Sites', there migh be a bug around using different casing there. On Monday, July 28, 2014 9:13:15 PM UTC+2, Bernhard Minatti wrote:

CakePHP 3.0 Validation ?

2014-07-28 Thread Mikaël Capelle
Hi everyone, I'm trying to build a new CakePHP 3 application but I didn't manage to get the data validation working... I followed the CakePHP 3.0 book, and particulary this page http://book.cakephp.org/3.0/en/tutorials-and-examples/blog/part-two.html but it didn't help. Currently, my Table

Re: CakePHP 3.0 Validation ?

2014-07-28 Thread José Lorenzo
A few questions: - Where did you put DevoirsTable ? - How did you name the DevoirsTable file? - What namespace did you use in that file? - Can you verify that file is being included? And a small correction, This is not needed in a DevoirsController: $this-Devoirs =

Re: CakePHP 3.0 Validation ?

2014-07-28 Thread Mikaël Capelle
I'm not in DevoirsController. Thanks to your questions, I found my mistake, I named the file DevoirsTable.ctp instead of DevoirsTable.php... Stupid copy/paste mistake, thanks you for pointing me to this! On Monday, July 28, 2014 10:54:33 PM UTC+2, José Lorenzo wrote: A few questions: -

Re: CakePHP 3.0 Validation ?

2014-07-28 Thread José Lorenzo
You can also use $this-loadModel('Devoirs'); in the controller Glad you found the problem On Monday, July 28, 2014 11:10:09 PM UTC+2, Mikaël Capelle wrote: I'm not in DevoirsController. Thanks to your questions, I found my mistake, I named the file DevoirsTable.ctp instead of

Re: 3.x: Same Behaviour for Multiple Tables

2014-07-28 Thread 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

Re: CakePHP 3.0.0-alpha2 released

2014-07-28 Thread Dr. Tarique Sani
I'll probably start on it very soon as most of the 'big' work items I wanted to get done for 3.0 are now complete. Awesome! -- = The Conference Schedule Creator : http://shdlr.com PHP for E-Biz : http://sanisoft.com