Logs for #cakephp

Page 2 of 36,130, showing 100 records out of 3,612,917 total, starting on record 101, ending on 200

# At Username Text
# Yesterday, 07:20 admad @luisdelamo From localized plugin readme: "This plugin also houses translations for the client-facing translated strings in the core (the cake domain). *to use these files link or copy them into their expected location: src/Locale/<locale>/cake.po*"
# Yesterday, 07:18 luisdelamo I try now, and for core translations should be works loading the localized Plugin?
# Yesterday, 07:17 welo.lamacchia if it has afterSave i only change the entity... if not i save the new entity
# Yesterday, 07:16 welo.lamacchia i can check in behavior if table has afterSave method
# Yesterday, 07:15 admad you'll end up with infinite loop if you are not careful about calling save() in afterSave callback
# Yesterday, 07:15 luisdelamo Thanks @admad
# Yesterday, 07:13 welo.lamacchia @admad my problem was that in behavior i call $event->getSubject()->save($entity), so the entity in Table afterSave is not new
# Yesterday, 07:09 admad @luisdelamo you can use $this->loadPlugins() in your testcase class to load required plugin
# Yesterday, 07:07 luisdelamo I try in test folder bootstrap.php use plugin::getcollection:add but not work either
# Yesterday, 07:05 luisdelamo I think is about the plugins now is in Application.php
# Yesterday, 07:04 luisdelamo When I run the unit test the the plugins translations doesn't work.
# Yesterday, 07:03 welo.lamacchia not in my case
# Yesterday, 07:03 welo.lamacchia mmmmm
# Yesterday, 06:58 admad $entity->isNew() would return the same results in both the behavior and table's afterSave()
# Yesterday, 06:40 welo.lamacchia i can't call parent::afterSave in behavior :S
# Yesterday, 06:27 welo.lamacchia ill try to do this, thanks
# Yesterday, 06:26 turkles Do you just need to call parent::afterSave() in your behaviour?
# Yesterday, 06:24 welo.lamacchia Hello everyone, i have Table attached to behavior with afterSave callback when check if entity is new i did some logics. In Table i have another afterSave callback when i check also if entity is new, but it return false because it was executed already in Behavior. How i can resolve this issue ?
# Yesterday, 06:15 turkles JS Calendar - you mean https://gramthanos.github.io/jsCalendar ? Seems its only dates, I need a time input too
# Yesterday, 04:43 admad @turkles just use a text input instead of date time selects and JS calendar
# Yesterday, 03:25 turkles Hi all, the FormHelper for DateTime - is there something quick/easy that would help me display this as a calendar picker? Or replace it?
# Yesterday, 00:30 waspinator `parent_id` needs a prefix I think
# Yesterday, 00:29 itmpls `property_id` in this case is ambiguous. prefixing it with either alias doesn't work. wut?
# Yesterday, 00:29 itmpls how can a self reference be made with conditions because of ambiguity? `$this->belongsTo('ParentBuildings', ['className' => 'Properties.Properties', 'foreignKey' . => 'ParentBuildings.property_id', 'conditions' => ['parent_id IS NULL'] ]);`
# Yesterday, 00:28 itmpls hm
# May 21st, 23:40 waspinator @luisdelamo try asking your question, and if someone can help they will
# May 21st, 23:12 luisdelamo somebody can help me
# May 21st, 21:20 dereuromark @neon1024 This is my draft on the CastTrait: https://github.com/dereuromark/cakephp-shim/blob/master/docs/Controller/CastTrait.md You might find that useful for the controller scope. Phpstan level 7 approved^^.
# May 21st, 20:57 ricksaccous yeah it just makes things faster as well
# May 21st, 20:57 cnizzardini ^ that much we can all agree on i think
# May 21st, 20:56 luisdelamo for safety migrations, create always with bin/bake migration MyMigration
# May 21st, 20:56 cnizzardini thanks
# May 21st, 20:55 ricksaccous personally
# May 21st, 20:55 cnizzardini yeah imma keep em
# May 21st, 20:55 ricksaccous i still wouldn't delete old ones
# May 21st, 20:55 ricksaccous to do things that way
# May 21st, 20:55 ricksaccous honestly i'm prob a mediocre dev as well so if you listened to me it'd be the blind leading the blind maybe it works nicer in your case
# May 21st, 20:55 cnizzardini our app is huge and that data helps em get going
# May 21st, 20:54 cnizzardini we prob are using migrations wrong, but, i prefer setting someone up with a staging dump
# May 21st, 20:54 ricksaccous cool
# May 21st, 20:53 cnizzardini already was using proper class and extending correctly
# May 21st, 20:53 cnizzardini @ricksaccous removing the namespace seems to work
# May 21st, 20:52 luisdelamo ?
# May 21st, 20:52 luisdelamo can you show the error
# May 21st, 20:52 luisdelamo but not change
# May 21st, 20:52 luisdelamo @cnizzardini deprecated methods
# May 21st, 20:51 cnizzardini im a very mediocre developer
# May 21st, 20:51 cnizzardini but what do i know
# May 21st, 20:51 ricksaccous i like the idea of being able to get the app going in one command, tables created, etc
# May 21st, 20:51 cnizzardini and as part of CI and deployment
# May 21st, 20:51 cnizzardini yep
# May 21st, 20:51 ricksaccous so you don't have to keep SQL dumping
# May 21st, 20:51 ricksaccous i guess you use them to push changes up to each other
# May 21st, 20:50 cnizzardini cause we have em
# May 21st, 20:50 cnizzardini we are
# May 21st, 20:50 cnizzardini i mean
# May 21st, 20:50 ricksaccous then you aren't really using migrations
# May 21st, 20:50 ricksaccous heh
# May 21st, 20:50 cnizzardini Why have them run all those migrations
# May 21st, 20:50 cnizzardini We just give new engineers a sql dump
# May 21st, 20:48 ricksaccous that's mainly why
# May 21st, 20:48 ricksaccous imagine if you wanted a barebones version of the project up
# May 21st, 20:47 ricksaccous even then that's probably not wise
# May 21st, 20:47 ricksaccous you should never remove old migrations though imo unless you want to replace them with a snapshot migration
# May 21st, 20:46 ricksaccous lmao
# May 21st, 20:46 ricksaccous depends who is on your team
# May 21st, 20:43 cnizzardini Many of these migrations are several years old, is there any negative side effects to removing old migrations?
# May 21st, 20:42 ricksaccous i guess try and see if that helps
# May 21st, 20:42 cnizzardini so remove namespace App\config\Migrations;?
# May 21st, 20:41 ricksaccous migrations are not namespaced
# May 21st, 20:41 ricksaccous and above that a use Migrations\AbstractMigration;
# May 21st, 20:41 ricksaccous class PublisherTableDeletes extends AbstractMigration
# May 21st, 20:41 ricksaccous in that migration you should have
# May 21st, 20:38 cnizzardini According to the docs, now require robmorgin/phinx but what about cakephp/migrations?
# May 21st, 20:36 cnizzardini Any idea on how migrations changed between 3.5 and 3.7, I am getting errors when running migrations Exception: Could not find class "PublisherTableDeletes" in file "config/Migrations/20170812215941_PublisherTableDeletes.php" in [vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php, line 670]
# May 21st, 18:40 luisdelamo when*
# May 21st, 18:30 luisdelamo does not work either
# May 21st, 18:30 luisdelamo in the App/test/boostrap.php I used the Plugin::getCollection
# May 21st, 18:28 luisdelamo Whe I run the unit test, the core translations doesn´t work
# May 21st, 18:28 luisdelamo I have a question, now with the new updates, Plugin::load is deprecated, now the plugins are loaded in Application.php
# May 21st, 18:25 luisdelamo Hello, good afternoon from Tenerife
# May 21st, 16:45 hollistergraham123 @admad Thank you!!!!!! Your a champ among champions.
# May 21st, 16:44 admad btw plural of "inventory" is "inventories" not "inventorys"
# May 21st, 16:42 admad @hollistergraham123 `['Inventorys.store_id = Repairs.store_id']`
# May 21st, 16:40 waspinator that makes sense. not sure how to do it though. sorry
# May 21st, 16:36 hollistergraham123 Right now I’m just getting the repair then using it’s store_id in the condition. But it seems like a unnecessary query.
# May 21st, 16:34 hollistergraham123 Yeah, I want to do a where Inventorys.store_id = Repairs.store_id which I can do in sql I just don’t know how to do it in the ORM
# May 21st, 16:33 waspinator oh, you already do that.
# May 21st, 16:32 waspinator contain?
# May 21st, 16:32 waspinator https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#retrieving-associated-data
# May 21st, 16:31 hollistergraham123 I’ve seen matching and used it but I don’t see how to use it when I don’t have a static variable. I.e. I don’t know the store_id. I wanna get a repair and get the inventory record for it’s parts for the store that, that repair belongs to
# May 21st, 16:23 waspinator https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#filtering-by-associated-data-via-matching-and-joins
# May 21st, 16:21 hollistergraham123 How do I query for a parents value i.e. $this->Repairs->find()->contain([‘Parts’ => function (Query $q) { return $q->select($this->Parts)->contain([‘Inventorys’])->select($this->Parts->Inventorys)->where([‘Inventorys.store_id’ => ‘Repairs.store_id’]); }]; in cakephp orm
# May 21st, 16:06 birdy247 I am now trying to solve them logging in the widget which should also set their session in the php app
# May 21st, 16:05 birdy247 @neon1024 good point
# May 21st, 15:30 neon1024 Or at least handle the failure gracefully
# May 21st, 15:30 neon1024 Ensure if they logout in the PHP application, that the widget doesn’t submit data to a session which doesn’t exist :slightly_smiling_face:
# May 21st, 15:17 birdy247 @neon1024 I went with the simple approach of just doing a get request to the server and then it checks the session
# May 21st, 14:50 itmpls 'plugin' => 'Customers', 'controller' => 'Customers', 'action' => 'index' fed to 'url' of Form->create generats just /customers/customeres. Is theereee anyway to make /indeex stick? E keey brokeen, sorry for thee typos lol
# May 21st, 14:43 neon1024 https://github.com/Xety/Cake3-CookieAuth