Log message #4154908

# At Username Text
# Jul 1st 2018, 19:27 kitcat711_ that's silly but sometimes I loose hours on that
# Jul 1st 2018, 19:26 kitcat711_ did u try to rm you tmp directory
# Jul 1st 2018, 19:26 kitcat711_ I am totally usefull I guess
# Jul 1st 2018, 19:26 kitcat711_ ah ok, I am sorry, but I newer used the test class
# Jul 1st 2018, 19:18 birdy247 Ah, they are all in one test class
# Jul 1st 2018, 19:10 birdy247 Im unsure of the best way to debug this
# Jul 1st 2018, 19:08 birdy247 5 tests that pass when I run locally, fail when I push to my repo and the pipeline runs
# Jul 1st 2018, 19:08 birdy247 Hey kitcat711
# Jul 1st 2018, 18:56 kitcat711_ birdy247 : can you give more info?
# Jul 1st 2018, 17:29 birdy247 any ideas?
# Jul 1st 2018, 17:29 birdy247 My tests pass on local, but some fail on prod
# Jul 1st 2018, 16:22 marceltbr Yes, I deleted the line which used 'enum' column type and the addIndex line and migration went fine... thanks for the quick answer, will dig deeper into documentation :slightly_smiling_face:
# Jul 1st 2018, 16:18 chris-andre >>> In addition, the MySQL adapter supports enum, set, blob and json column types. (json in MySQL 5.7 and above)
# Jul 1st 2018, 16:16 chris-andre @marceltbr Hard to tell what triggers the error from what you have told and posted. To use enum column type, I think you will need to use an adapter.
# Jul 1st 2018, 16:11 slackebot4 ->addIndex('username', ['unique' => true]) ->create(); }```
# Jul 1st 2018, 16:11 marceltbr ```public function change() { $table = $this->table('users'); $table-> addColumn('first_name', 'string', ['limit' => 100]) ->addColumn('email', 'string', ['limit' => 100]) ->addColumn('password', 'string') ->addColumn('role', 'enum', ['values' => 'admin', 'user']) ->addColumn('active', 'boolean') ->addColumn('created', 'datetime')
# Jul 1st 2018, 16:11 slackebot4 ->addColumn('created', 'datetime') ->addIndex('username', ['unique' => true]) ->create(); }``
# Jul 1st 2018, 16:11 marceltbr My Migration class change() method is the following: ``public function change() { $table = $this->table('users'); $table-> addColumn('first_name', 'string', ['limit' => 100]) ->addColumn('email', 'string', ['limit' => 100]) ->addColumn('password', 'string') ->addColumn('role', 'enum', ['values' => 'admin', 'user']) ->addColumn('active', 'boolean')
# Jul 1st 2018, 16:09 marceltbr `In Column.php line 622: "0" is not a valid column option`
# Jul 1st 2018, 16:09 marceltbr Hi! I'm new to cakephp and I'm getting the following error while trying to run 'bin/cake migrations migrate'
# Jul 1st 2018, 12:08 michaelze Hi everyone! I have a form that allows to modify certain fields of an entity and I want to validate some of the values against other fields of the entity which are not edited using the form (hence, they are not part of the posted and validated data). How would I best access these other fields? I need the same values from the entity on multiple validation rules...
# Jun 29th 2018, 20:33 saeideng it is possible
# Jun 29th 2018, 20:33 saeideng anyway for receiving deprecations in html (directly ) , you can disable deprecation panel in debug_kit
# Jun 29th 2018, 20:31 saeideng I receive deprecation warning with `bin/cake server`
# Jun 29th 2018, 20:31 saeideng but
# Jun 29th 2018, 20:29 chrisshick just from bin/cake server and postman call
# Jun 29th 2018, 20:28 camdenbassett Hello everyone. Is there a standard way to do a REPLACE INTO query using the query builder? I could just write some custom SQL, but if there's a way using the query builder then I think that might be better.
# Jun 29th 2018, 20:19 saeideng on debug_kit ?
# Jun 29th 2018, 20:19 chrisshick For some reason the deprecation doesn't show on my local machine XD
# Jun 29th 2018, 20:18 chrisshick ahhh gotcha XD
# Jun 29th 2018, 20:14 saeideng if you dont want to change that
# Jun 29th 2018, 20:14 saeideng just do `return $value`
# Jun 29th 2018, 20:14 saeideng exactly
# Jun 29th 2018, 20:13 chrisshick ahh we have to use every method
# Jun 29th 2018, 20:13 saeideng yes you have not `marshal()` method
# Jun 29th 2018, 20:12 slackebot4 @param Driver $driver database driver * @return mixed|string */ public function toDatabase($value, Driver $driver) { return inet_pton($value); } /** * @param string $value statement value * @param Driver $driver database driver * @return int|mixed */ public function toStatement($value, Driver $driver) { return PDO::PARAM_LOB; } } ```
# Jun 29th 2018, 20:12 chrisshick ``` <?php namespace App\Database\Type; use Cake\Database\Driver; use Cake\Database\Type; use PDO; class IpAddressType extends Type { /** * * @param mixed $value database value * @param Driver $driver database driver * @return bool|mixed|null|string */ public function toPHP($value, Driver $driver) { return inet_ntop($value); } /** * * @param string $value php value *
# Jun 29th 2018, 20:11 chrisshick all I did was
# Jun 29th 2018, 20:11 chrisshick yep
# Jun 29th 2018, 20:11 saeideng can you post a text with your use case ?
# Jun 29th 2018, 20:10 saeideng https://github.com/cakephp/cakephp/issues/12257