Re: 3.0 plugin installer path

2015-01-15 Thread Dieter Gribnitz
Never mind.
I fixed the issues I had regarding the paths.
I forgot that I already converted my bash scripts to cake shell scripts.
It was trivially easy to update the paths since I have access to functions 
like Plugin::path() from within the shell.



-- 
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.


3.0 plugin installer path

2015-01-15 Thread Dieter Gribnitz
Hi,
I have been using the composer plugin installer for some of the plugins I 
am working on.
I see that the plugins now install to the vendor/namespace/PluginName dir 
instead of src/Plugins/PluginName.
Is there any way for me to configure the installer to install to the 
Plugins dir instead of vendor?
I have some cli scripts that rely on these plugins being in the Plugins dir.
If I have to I can update the cli scripts but I would like to avoid doing 
this if possible.

-- 
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: Cake 3 RC1 aura intl problem

2015-01-15 Thread HVan
Nope - sorry the locale changed because I tried changing it to see if it 
will fix anything. But it didn't. It sounds like the problem is during 
generation of the translations cache.

On Thursday, January 15, 2015 at 7:27:49 AM UTC-8, José Lorenzo wrote:
>
> But I guess the problem is not the cache, just that a random locale is 
> being selected, no?
>
> On Thursday, January 15, 2015 at 3:36:48 PM UTC+1, HVan wrote:
>>
>> Yeah I've tried keeping it at en_US, and putting it blank. Neither 
>> worked. Putting it blank would give me the en_US_POSIX  locale (which is by 
>> default).
>>
>> I've checked /tmp/cache/persistent and these files are generated and 
>> exist when the error comes up.
>>
>> myapp_cake_core_translations_cake_en__u_us
>> myapp_cake_core_translations_debug_kit_en__u_us
>> myapp_cake_core_translations_default_en__u_us
>>
>> Though, at debug=true, those files are generated everytime.
>>
>> I went to bootstrap and set the default cache 
>> (Configure::write(Cache._cake_model_.duration) and 
>> Configure::write(Cache._cake_core_.duration) to +99 years even when in 
>> debug mode but can't get those core translation files to cache; they are 
>> still regenerated each time. I'm trying ot narrow down whether it's an 
>> error when those 3 files are beign generated. Anyone know how to turn off 
>> the cache for them?
>>
>> On Thursday, January 15, 2015 at 4:38:53 AM UTC-8, José Lorenzo wrote:
>>>
>>> Are you changing the default locale anywhere?
>>>
>>> If not I'd suggest setting ini_set('intl.default_locale', 'en_US'); in 
>>> your bootstrap.php file
>>>
>>> On Wednesday, January 14, 2015 at 11:59:35 PM UTC+1, HVan wrote:

 Can't figure why I'm having this problem: 

 Aura\Intl\Exception: Package 'cake' with locale 'en_US' is not 
 registered. in /vendor/aura/intl/src/Aura/Intl/PackageLocator.php on line 
 *96*

 I'm having that problem with debug_kit as well. I've just literally 
 created a project from scratch with composer. I also couldn't get plugin 
 routes working but that's a different story.

 Any clue what this could be? I've looked at everything and couldn't 
 figure it out.

 Thanks

>>>

-- 
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.


CakePHP 2.6.1 Released

2015-01-15 Thread mark_story
The CakePHP core team is proud to announce the immediate availability of 
CakePHP 2.6.1. 2.6.1 is a bugfix release for the 2.6 release branch. A 
short list of the changes you can expect is:

* I18nShell now correctly extracts messages with context.
* Improved web test runner. All URL options now have links in the interface.
* Session directories are now created when debug is enabled.
* Text columns in SQLServer no longer contain length when reflected. The 
length value was not useful and was causing FormHelper to misbehave.
* AssetDispatcher no longer sets the Content-Length header as it was 
incorrect when assets included PHP code.
* URL autolinking has been improved.
* Criterion is now correctly inflected.
* Time strings are now correct when mbstring is not installed.
* The exception emitted when headers were sent has been removed. This 
exception was causing more problems than it was solving, including infinite 
loops on fatal error pages.
* Radio buttons that are only partially disabled are now added to the list 
of secured fields.
* MySQL now correctly quotes SET column values.

You can view the full [changelog on 
cakephp.org](http://cakephp.org/changelogs/2.6.1). We'd like to thank the 
people who have contributed to this release. Your bug tickets, 
documentation edits, and patches/pull requests are a big part of what keeps 
CakePHP alive and ticking. Download a [packaged release on 
github](https://github.com/cakephp/cakephp/releases/2.6.1).

-- 
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: 3.0 e mysql fields ENUM

2015-01-15 Thread Leandro Machado Pereira
I gave up using enum.
Thanks.
Em Thu Jan 15 2015 at 17:31:51, Leandro Machado Pereira <
llperei...@gmail.com> escreveu:

> Hey guy, I tried to do work my fields with mysql ENUM.
>
> In cake 2.0 i used this helper.
>
>
> http://www.drawbackz.com/stack/251186/cakephp-2-0-use-mysql-enum-field-with-form-helper-to-create-select-input.html
>
> But in cake 3.0 i'm have dificults for work fine.
>
> I received errors in this line.
>
> $modelKey = $this->model();
>
> and in this line:
>
> $this->fieldset[$modelKey]['fields'][$fieldName]['type'],
>
> So, does somebody have any suggestions ?
>
> Thanks.
>
> --
> 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.


3.0 e mysql fields ENUM

2015-01-15 Thread Leandro Machado Pereira
Hey guy, I tried to do work my fields with mysql ENUM.

In cake 2.0 i used this helper.

http://www.drawbackz.com/stack/251186/cakephp-2-0-use-mysql-enum-field-with-form-helper-to-create-select-input.html

But in cake 3.0 i'm have dificults for work fine.

I received errors in this line.

$modelKey = $this->model();

and in this line:

$this->fieldset[$modelKey]['fields'][$fieldName]['type'],

So, does somebody have any suggestions ?

Thanks.

-- 
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 Get and Modify Query conditions in beforeFind function

2015-01-15 Thread José Lorenzo
Even though that is possible you are tying to do it the hard way. The 
easiest way you can implement the same is by using the query as a "command" 
object,
thus instructing the custom finders to do stuff based on the passed 
options. An example

$table->find('forUser', ['user' => $user])->find('withStatus', ['status' => 
'active']);

Then in your table you would create your finders this way:

public function finWithStatus($query, $options) {
if (!empty($options['user'])) {
 // The user is available from the previous finder, I can add more 
conditions here based on that
}
}


I guess the best way I can help you find the best strategy is if you 
mention what exactly you are trying to do :D
On Thursday, January 15, 2015 at 3:26:09 PM UTC+1, Cake Developer wrote:
>
> Hello,
>
> I am trying to get and modify query conditions in beforeFind function of 
> Behaviour.
>
> function beforeFind(Event $event, Query $query, $options, $primary) {
>// here is what I tried so far.
> $conditions = $query->clause('where');
> // this gives me Object of Expression Interface and I am not able to 
> convert it in condition array like we have in cakephp 2.x
>
> //what I want to achieve... 
> //I want to modify existing conditions in query.
> //I want to add new condition in query
>
> }
>
> I spent last 2 days but could not figure out any solution.
> Thanks for any help you may be able to provide regarding 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: CakePHP 2.0 authentication(login) without ctp files but other types

2015-01-15 Thread John Andersen
You have a users table with two records, where the one with id = 1001 has 
the password = 123. The password needs to be changed to the hashed value 
that Auth/password hasher can provide to you.

Make sure that your password column in the table has a definition that can 
contain a hashed password - think it should be 32 character (please correct 
me if I am wrong).

As a temporary solution (other may provide a better one :)

In you controller, at the beginning of the login method, add this:
// Make user 1001 the current in the User model
$this->User->id = 1001;

// Activate the simple password hasher and hash the password '123'.

$passwordHasher = new SimplePasswordHasher();
$pw1001 = $passwordHasher->hash('123');


// Save the password to the hashed value of 123 for the current user 1001
$this->User->saveField('password', $pw1001);

Then try to login only once and check your database to see whether or not 
the password has changed value to something

If the password in the table has changed, then comment out the above code 
and try to login again using password 123.

Enjoy, John


On Thursday, 15 January 2015 16:37:37 UTC+2, tech_me wrote:
>
> Hi John,
>
> > Use the password hasher to hash your password, then save it instead of 
> "123" and it should work.
> So could I put hasshed password to table without create new user record?
> I have read your link, but there is just creating user...
>
> Besides users, lots of tests are able to be tested just by searching but 
> not creating new record for those purposes.
>
> Thanks, tech_me 
>
>
> On Thursday, January 15, 2015 at 5:15:16 AM UTC+9, John Andersen wrote:
>>
>> Use the password hasher to hash your password, then save it instead of 
>> "123" and it should work.
>>
>> See the CakePHP book at this location for the password hasher:
>>
>> http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#hashing-passwords
>>
>> Enjoy, John
>>
>> On Sunday, 11 January 2015 13:52:07 UTC+2, tech_me wrote:
>>>
>>> > If '123' is the actual data in your password field in the data record, 
>>> it's very likely this is the problem you're having with logging in.
>>> Maybe this is the problem;)
>>>
>>> [snip]
>>>
>>

-- 
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.


Cakephp 3.0 Get and Modify Query conditions in beforeFind function

2015-01-15 Thread Cake Developer
Hello,

I am trying to get and modify query conditions in beforeFind function of 
Behaviour.

function beforeFind(Event $event, Query $query, $options, $primary) {
   // here is what I tried so far.
$conditions = $query->clause('where');
// this gives me Object of Expression Interface and I am not able to 
convert it in condition array like we have in cakephp 2.x

//what I want to achieve... 
//I want to modify existing conditions in query.
//I want to add new condition in query

}

I spent last 2 days but could not figure out any solution.
Thanks for any help you may be able to provide regarding 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: Cake 3 RC1 aura intl problem

2015-01-15 Thread José Lorenzo
But I guess the problem is not the cache, just that a random locale is 
being selected, no?

On Thursday, January 15, 2015 at 3:36:48 PM UTC+1, HVan wrote:
>
> Yeah I've tried keeping it at en_US, and putting it blank. Neither worked. 
> Putting it blank would give me the en_US_POSIX  locale (which is by 
> default).
>
> I've checked /tmp/cache/persistent and these files are generated and exist 
> when the error comes up.
>
> myapp_cake_core_translations_cake_en__u_us
> myapp_cake_core_translations_debug_kit_en__u_us
> myapp_cake_core_translations_default_en__u_us
>
> Though, at debug=true, those files are generated everytime.
>
> I went to bootstrap and set the default cache 
> (Configure::write(Cache._cake_model_.duration) and 
> Configure::write(Cache._cake_core_.duration) to +99 years even when in 
> debug mode but can't get those core translation files to cache; they are 
> still regenerated each time. I'm trying ot narrow down whether it's an 
> error when those 3 files are beign generated. Anyone know how to turn off 
> the cache for them?
>
> On Thursday, January 15, 2015 at 4:38:53 AM UTC-8, José Lorenzo wrote:
>>
>> Are you changing the default locale anywhere?
>>
>> If not I'd suggest setting ini_set('intl.default_locale', 'en_US'); in 
>> your bootstrap.php file
>>
>> On Wednesday, January 14, 2015 at 11:59:35 PM UTC+1, HVan wrote:
>>>
>>> Can't figure why I'm having this problem: 
>>>
>>> Aura\Intl\Exception: Package 'cake' with locale 'en_US' is not 
>>> registered. in /vendor/aura/intl/src/Aura/Intl/PackageLocator.php on line 
>>> *96*
>>>
>>> I'm having that problem with debug_kit as well. I've just literally 
>>> created a project from scratch with composer. I also couldn't get plugin 
>>> routes working but that's a different story.
>>>
>>> Any clue what this could be? I've looked at everything and couldn't 
>>> figure it out.
>>>
>>> Thanks
>>>
>>

-- 
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 2.0 authentication(login) without ctp files but other types

2015-01-15 Thread tech_me
Hi John,

> Use the password hasher to hash your password, then save it instead of 
"123" and it should work.
So could I put hasshed password to table without create new user record?
I have read your link, but there is just creating user...

Besides users, lots of tests are able to be tested just by searching but 
not creating new record for those purposes.

Thanks, tech_me 


On Thursday, January 15, 2015 at 5:15:16 AM UTC+9, John Andersen wrote:
>
> Use the password hasher to hash your password, then save it instead of 
> "123" and it should work.
>
> See the CakePHP book at this location for the password hasher:
>
> http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#hashing-passwords
>
> Enjoy, John
>
> On Sunday, 11 January 2015 13:52:07 UTC+2, tech_me wrote:
>>
>> > If '123' is the actual data in your password field in the data record, 
>> it's very likely this is the problem you're having with logging in.
>> Maybe this is the problem;)
>>
>> [snip]
>>
>

-- 
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: Cake 3 RC1 aura intl problem

2015-01-15 Thread HVan
Yeah I've tried keeping it at en_US, and putting it blank. Neither worked. 
Putting it blank would give me the en_US_POSIX  locale (which is by 
default).

I've checked /tmp/cache/persistent and these files are generated and exist 
when the error comes up.

myapp_cake_core_translations_cake_en__u_us
myapp_cake_core_translations_debug_kit_en__u_us
myapp_cake_core_translations_default_en__u_us

Though, at debug=true, those files are generated everytime.

I went to bootstrap and set the default cache 
(Configure::write(Cache._cake_model_.duration) and 
Configure::write(Cache._cake_core_.duration) to +99 years even when in 
debug mode but can't get those core translation files to cache; they are 
still regenerated each time. I'm trying ot narrow down whether it's an 
error when those 3 files are beign generated. Anyone know how to turn off 
the cache for them?

On Thursday, January 15, 2015 at 4:38:53 AM UTC-8, José Lorenzo wrote:
>
> Are you changing the default locale anywhere?
>
> If not I'd suggest setting ini_set('intl.default_locale', 'en_US'); in 
> your bootstrap.php file
>
> On Wednesday, January 14, 2015 at 11:59:35 PM UTC+1, HVan wrote:
>>
>> Can't figure why I'm having this problem: 
>>
>> Aura\Intl\Exception: Package 'cake' with locale 'en_US' is not 
>> registered. in /vendor/aura/intl/src/Aura/Intl/PackageLocator.php on line 
>> *96*
>>
>> I'm having that problem with debug_kit as well. I've just literally 
>> created a project from scratch with composer. I also couldn't get plugin 
>> routes working but that's a different story.
>>
>> Any clue what this could be? I've looked at everything and couldn't 
>> figure it out.
>>
>> Thanks
>>
>

-- 
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: Cake 3 RC1 aura intl problem

2015-01-15 Thread José Lorenzo
Are you changing the default locale anywhere?

If not I'd suggest setting ini_set('intl.default_locale', 'en_US'); in your 
bootstrap.php file

On Wednesday, January 14, 2015 at 11:59:35 PM UTC+1, HVan wrote:
>
> Can't figure why I'm having this problem: 
>
> Aura\Intl\Exception: Package 'cake' with locale 'en_US' is not registered. 
> in /vendor/aura/intl/src/Aura/Intl/PackageLocator.php on line *96*
>
> I'm having that problem with debug_kit as well. I've just literally 
> created a project from scratch with composer. I also couldn't get plugin 
> routes working but that's a different story.
>
> Any clue what this could be? I've looked at everything and couldn't figure 
> it out.
>
> Thanks
>

-- 
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: deploying CakePHP app

2015-01-15 Thread Rafael Queiroz
Using git hooks (http://git-scm.com/book/be/v2/Customizing-Git-Git-Hooks)
or capistrano (http://capistranorb.com/).

On Thu, Jan 15, 2015 at 8:49 AM, Radharadhya Dasa  wrote:

> Hi,
>
> I have a CakePHP app hosted at github. What is the best way to deploy it
> to the production server?
>
> rrd
>
> --
> 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.
>



-- 
Atenciosamente,

Rafael F. Queiroz

-- 
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.


deploying CakePHP app

2015-01-15 Thread Radharadhya Dasa
Hi,

I have a CakePHP app hosted at github. What is the best way to deploy it to 
the production server?

rrd

-- 
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.