Log message #4181648

# At Username Text
# Apr 1st 2019, 15:00 feLiruc I think that the internet posts about this are all about plugins, and not real systems
# Apr 1st 2019, 14:59 feLiruc Hello guys, can anybody help me to configurate Travis-CI in my open source cakephp project, with auto deploy to a VPN?
# Apr 1st 2019, 14:18 johnwayne And why do we need package for env. vars if `getenv()` is already in php....
# Apr 1st 2019, 14:14 johnwayne I am using cakePhp 3.3 version... I will also try with this solution. Thx
# Apr 1st 2019, 14:13 berarma You aren't doing the same.
# Apr 1st 2019, 14:13 berarma @johnwayne https://github.com/cakephp/app/blob/fa2b3fbf6bc0c9411bce3ee1556e97a334a583ee/config/bootstrap.php#L56
# Apr 1st 2019, 14:08 johnwayne my .env is on the root of project, but each key in .env is null
# Apr 1st 2019, 14:08 johnwayne @berarma Yes, I have ``` /* * Load an environment local configuration file. * You can use a file like app_local.php to provide local overrides to your * shared configuration. */ Configure::load(CORE_PATH , '.env'); ```
# Apr 1st 2019, 14:03 berarma @johnwayne Have you uncommented the related code in config/bootstrap.php
# Apr 1st 2019, 13:57 johnwayne How can I read from .env file (.env file is saved on the root of the project). I have try with -> ``` debug(env('TEST')); debug(getenv('TEST')); debug(getenv('TEST')); debug($_ENV['TEST']); ``` .env `TEST=test` I am getting always `null` as result
# Apr 1st 2019, 12:09 slackebot2 echo $this->Html->meta([ 'rel' => 'apple-touch-icon', 'sizes' => '144x144', 'link' => '/apple-touch-icon.png', ]); This produces: <link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="144x144" /> What I want is: <link href="/theme/mytheme/apple-touch-icon.png" rel="apple-touch-icon" sizes="144x144" />
# Apr 1st 2019, 12:09 development Hi all, I'm using CakePHP 2 and I want to add a custom meta tag for the apple-touch-icon. I need a different icon per theme but can't get this to work. This works perfectly fine if I use the built-in 'icon' type for my favicon. It then uses /theme/mytheme as the folder. If I add custom properties in an array (see below), this doesn't seem to work for me. If there some way to fix this or do I need do add the theme to the url manually?
# Apr 1st 2019, 11:34 neon1024 Oh was that what it was? Too obscure for me I’m afraid
# Apr 1st 2019, 11:31 dakota @neon1024 You should join the new training course (https://training.cakephp.org/) :slightly_smiling_face:
# Apr 1st 2019, 11:26 berarma BTW, had you seen their April fools joke?
# Apr 1st 2019, 11:26 berarma This stackexchange response suggests the solution I've used: https://dba.stackexchange.com/a/35826
# Apr 1st 2019, 11:25 dereuromark like "skipping v4 directly going to v5?^^
# Apr 1st 2019, 11:24 neon1024 I’m surprised the core team didn’t do an April Fools around Cake 4 today ;)
# Apr 1st 2019, 11:20 dereuromark sure thing
# Apr 1st 2019, 11:18 neon1024 How’s things @dereuromark? Having a good Monday?
# Apr 1st 2019, 11:17 berarma Thanks!
# Apr 1st 2019, 11:17 berarma Mmmm, I'l look up what that means.
# Apr 1st 2019, 11:17 berarma Ok, so it would be best to use the string as index.
# Apr 1st 2019, 11:17 dereuromark if you set up the index correctly
# Apr 1st 2019, 11:16 dereuromark they optimize the lookup through their own index, faster than most other things you could come up with
# Apr 1st 2019, 11:15 berarma So they already use a hash for string indexes?
# Apr 1st 2019, 11:13 dereuromark again: thats what DBs do with indexes
# Apr 1st 2019, 11:11 berarma Strings don't have a natural primary key. They are just strings. So denormalizing would mean looking for the string, in my case I preferred an integer hash.
# Apr 1st 2019, 11:08 dereuromark what you are doing indeed doesnt seem to make sense
# Apr 1st 2019, 11:07 dereuromark usually people would normalize and leverage the primary key aiid.
# Apr 1st 2019, 11:07 slackebot2 <neon1024>
# Apr 1st 2019, 11:06 berarma It's really simple instead. Not something I'd like to do if it wasn't because I have to store a large number of strings and a lot of them are duplicated. So tables would be growing really fast forever if I don't deduplicate the strings.
# Apr 1st 2019, 11:04 neon1024 What is the purpose of this hash?
# Apr 1st 2019, 11:04 neon1024 This all sounds incredibly overengineered
# Apr 1st 2019, 10:59 dereuromark why not letting the DB handle this using real indexes?
# Apr 1st 2019, 10:57 berarma I do a select to get the rows with the hash, then check all the results for the one that is the same string. I can't see anything wrong there. I don't think the === could fail if the string is in the results and the hash is the same. And I don't know why the select might not return the existing hashes.
# Apr 1st 2019, 10:55 berarma It's a non-primary key. I'm checking for collisions and that wouldn't duplicate strings, it would cause other problems though.
# Apr 1st 2019, 10:47 neon1024 Is this hash set as the primary key of the entity?
# Apr 1st 2019, 10:45 dereuromark a hash is often not collision free
# Apr 1st 2019, 10:43 berarma Hi. I use a table with strings to avoid duplication of data. The strings are stored with an integer hash value to Query them faster. I add new rows to this table from the beforeSave of some models. First I look for the hash of the new string in the table, if it doesn't exist I add it to the table. In some cases I'm creating rows for strings that are already in the table with the same hash. Do you know what could be happening?
# Apr 1st 2019, 10:35 patox44 I fixed my problem