Log message #4105378

# At Username Text
# Dec 21st 2017, 14:54 neon1024 I don’t understand that one ` 132 Call to an undefined method App\Model\Table\AcquiresTable|Cake\ORM\Association\HasMany::newEntity().`
# Dec 21st 2017, 14:52 neon1024 Liberal use of ?string etc I bet ;)
# Dec 21st 2017, 14:51 neon1024 It’ll be pretty interesting to see how all this shakes down in the 4.x release with all the return type and param scalar hints
# Dec 21st 2017, 14:51 neon1024 Similar stuff like `$this->Flash->success(__('Hello'));` gives an error because the localisation function can return `string|null` but the success method doesn’t take null
# Dec 21st 2017, 14:49 neon1024 Its’ quite interesting how much stuff php stan finds
# Dec 21st 2017, 14:47 neon1024 Hm, might have to just ignore those then
# Dec 21st 2017, 14:47 neon1024 Oh yes, I suppose it can
# Dec 21st 2017, 14:47 neon1024 `44 Cannot call method where() on array|Cake\ORM\Query.`
# Dec 21st 2017, 14:46 dereuromark find() can return array with hydrate false
# Dec 21st 2017, 14:44 neon1024 Unless perhaps the core framework return types don’t match
# Dec 21st 2017, 14:44 neon1024 I’m curious why it thinks it can be an array when it’s a $query = $this->Examples->find()
# Dec 21st 2017, 14:43 neon1024 ` 59 Parameter #1 $object of method Cake\Controller\Controller::paginate() expects Cake\ORM\Query|Cake\ORM\Table|string|null, array|Cake\ORM\Query given.`
# Dec 21st 2017, 14:43 neon1024 This is an odd one from phpstan
# Dec 21st 2017, 14:40 neon1024 So I need to loop my query and assign each one?!
# Dec 21st 2017, 14:39 neon1024 As `withData($name, $value)`
# Dec 21st 2017, 14:39 neon1024 How do I update this to match 3.4+? `$this->request->data = $this->request->query;`
# Dec 21st 2017, 14:39 dosjota someone has used environment variables ??
# Dec 21st 2017, 14:25 dosjota someone has used environment variables
# Dec 21st 2017, 14:24 dosjota Hi!!
# Dec 21st 2017, 13:16 Leonardo_0112 products -> returns 'Product 02' products?page=2 -> returns 'Product 02' products?page=3 -> returns 'Product 03'
# Dec 21st 2017, 13:16 Leonardo_0112 $this->Paginator->settings['limit'] = 1; $this->Paginator->settings['offset'] = 1;
# Dec 21st 2017, 13:12 Leonardo_0112 Hi! In my CakePHP 2 project I'm paginating my products. In the Controller I've set $this->Paginator->settings['offset'] = 1. In the first page, the 'offset' works (skipping the first product), but in second page the 'offset' seems not working, resulting in a repeated product. Any ideia how can I make it work?
# Dec 21st 2017, 12:59 jkpatel291289 how should is dispalt statename in inddex.ctp view?
# Dec 21st 2017, 12:59 jkpatel291289 $this->paginate['contain'] = ['States'];
# Dec 21st 2017, 12:58 jkpatel291289 $this->paginate['fields'] = [ 'Customers.id', 'Customers.name', 'States.name', 'Customers.contact_number', ];
# Dec 21st 2017, 12:46 obinoob johan me too but it might be on this specific version not sure lol
# Dec 21st 2017, 12:45 obinoob neon1024 definitely mysql version ;)
# Dec 21st 2017, 12:45 johan I guess the simple answer is: don't do it.
# Dec 21st 2017, 12:45 johan I can remember "ON UPDATE CURRENT_TIMESTAMP" being on multiple columns in the same table being a problem as far back as MySQL 5.5, maybe even before that.
# Dec 21st 2017, 12:44 neon1024 Perhaps a different version of MySQL. I know that 5.7 made some updates to GROUP BY to make it more strict and inline with “proper databases”, so perhaps there are other changes
# Dec 21st 2017, 12:40 obinoob yes I agree however I'm pretty sure I've done exactly the same before in many tables...
# Dec 21st 2017, 12:39 neon1024 Sounds pretty explanatory
# Dec 21st 2017, 12:38 obinoob neon1024 I've removed the timestamp(0) param but mysql still complain for ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
# Dec 21st 2017, 12:38 neon1024 Oh right
# Dec 21st 2017, 12:37 obinoob neon1024 not exactly a problem, I'm just trying to establish mysql default behaviour in fact it's not a problem for cakephp I guess :) anyway I think it's more related with mysql version...
# Dec 21st 2017, 12:24 neon1024 obinoob, You’ve added one? What’s wrong with the Timestamp behaviour? Or, I should say, how does your use-case differ? Perhaps there is an enhancement possible with the Timestamp behaviour
# Dec 21st 2017, 12:24 johan Sup David :slightly_smiling_face:
# Dec 21st 2017, 12:23 neon1024 Heya @johan
# Dec 21st 2017, 12:20 obinoob johan yes I agree I've added a behaviour for created and updated actions
# Dec 21st 2017, 12:20 johan In fact, you probably don't even need it for `created`.
# Dec 21st 2017, 12:19 johan In that case I'd remove the `ON UPDATE CURRENT_TIMESTAMP` part from the `updated`'s declaration. The Cake behaviour should be taking care of that for you anyway :slightly_smiling_face: