Log message #4103002

# At Username Text
# Dec 12th 2017, 16:52 hughbertd Hi All, possibly a silly question, but would requests for things like images (when their path is rendered on the page) go through the Middleware layers in Cake3?
# Dec 12th 2017, 16:49 flavius well at least i can overwrite the timezone and locale through the 2nd and 3rd parameter in i18nFormat
# Dec 12th 2017, 16:43 hmic not cake
# Dec 12th 2017, 16:43 hmic it's php that is "broken" with that respect
# Dec 12th 2017, 16:42 flavius i would have understood this for some random time string, but not for the Time object that contains the timezone inside, i think i18nFormat is broken
# Dec 12th 2017, 16:38 hmic if your country has no english locale
# Dec 12th 2017, 16:38 flavius i can see that :slightly_smiling_face:
# Dec 12th 2017, 16:38 hmic difficult to accomplish :O
# Dec 12th 2017, 16:38 hmic (or gmt+1 respectively)
# Dec 12th 2017, 16:38 flavius thing is my application should be in english, but the server is located in my timezone
# Dec 12th 2017, 16:38 hmic uk is gmt timezone
# Dec 12th 2017, 16:37 V99 hmic: slackebot i will start learning cakephp and i take notes of yours recomendations
# Dec 12th 2017, 16:37 flavius haha, switching from en_US to en_UK outputs correctly
# Dec 12th 2017, 16:36 hmic utilize the locale
# Dec 12th 2017, 16:36 hmic thats the idea of the i18n in the name!
# Dec 12th 2017, 16:36 hmic like i said in the very beginning
# Dec 12th 2017, 16:35 flavius so the timezone in my Time object isn't used, instead what's used for i18nFormat is what locale i have setup in my config?
# Dec 12th 2017, 16:35 hmic V99, time to get started!
# Dec 12th 2017, 16:35 V99 and i havent idea of how cakephp works
# Dec 12th 2017, 16:34 hmic flavius: makes sense, as this is what gets set to intl.default_locale, which php internally uses to determine the timezone to use on outputting date/time related data
# Dec 12th 2017, 16:34 dereuromark but if you are a beginner maybe stick to easier things here
# Dec 12th 2017, 16:34 V99 is not my code hmic im trying to solve two bugs, the person that developed this code nowadays is not working on the factory
# Dec 12th 2017, 16:34 dereuromark V99: I usually recommend the Passwordable behavior as it is exactly doing what you want. It also keeps things DRY and out of the model itself etc.
# Dec 12th 2017, 16:33 hmic additionally you *cannot* use the authcomponent from within the model scope, but the password hasher directly!
# Dec 12th 2017, 16:33 flavius switching from `'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),` to my locale outputs 2017 correctly in both web and CLI
# Dec 12th 2017, 16:32 hmic the beforeSave is the wrong place to hash the password, it should be in the entity class instead
# Dec 12th 2017, 16:32 hmic btw. your code fragment it is wrong and bad practice on multiple levels!
# Dec 12th 2017, 16:32 hmic this is what i am talking about all the time.
# Dec 12th 2017, 16:32 hmic once you are to the file, you are done.
# Dec 12th 2017, 16:31 hmic you will find it instantiates a password hasher class as per the appcomponent config
# Dec 12th 2017, 16:31 hmic so now you check what that function deos next
# Dec 12th 2017, 16:31 V99 I'm sorry hmic, my English is not good and I can not explain myself well, I'm looking for what password hashing system i use first and i find a file called User.php that have the next function: https://pastebin.com/TX0ka0gW
# Dec 12th 2017, 16:26 neon1024 Perhaps try the Cakebox VM?
# Dec 12th 2017, 16:26 hmic i'd rather be interested in fixing my (dev)environment instead :P
# Dec 12th 2017, 16:26 flavius ill just use `format()` instead
# Dec 12th 2017, 16:26 flavius you know what? i give up :)
# Dec 12th 2017, 16:25 neothermic sweet
# Dec 12th 2017, 16:25 flavius this is nucking futz
# Dec 12th 2017, 16:25 flavius File uploaded https://cakesf.slack.com/files/U75U0UMR9/F8DD4P11R/image.png / https://slack-files.com/T053DPNCM-F8DD4P11R-cf11268370
# Dec 12th 2017, 16:24 GuillaumeP -> when using PHP 7.x ?
# Dec 12th 2017, 16:24 GuillaumeP are you aware of a type error in ErrorHandlerMiddleware.php on line 167 ??