# |
May 25th 2021, 15:14 |
neon1024 |
Yes, good spot, thanks |
# |
May 25th 2021, 14:53 |
ndm |
The migration guide says that it will be removed in 5.x, but that's the only place that mentions a version AFAICT. https://book.cakephp.org/4/en/appendices/4-0-migration-guide.html#component |
# |
May 25th 2021, 14:46 |
neon1024 |
I assumed 5.x as it’s deprecated now in 4.x |
# |
May 25th 2021, 14:46 |
neon1024 |
Anyone know when AuthComponent is being removed? I don’t see it on the 5.x roadmap |
# |
May 25th 2021, 10:57 |
neon1024 |
Convoluted but okay |
# |
May 25th 2021, 10:56 |
neon1024 |
ArrayAccess |
# |
May 25th 2021, 10:56 |
neon1024 |
Ah, EntityInterface implements |
# |
May 25th 2021, 10:56 |
neon1024 |
Or is an Entity \ArrayAccess? |
# |
May 25th 2021, 10:55 |
neon1024 |
Have I misconfigured something? I am using the `Authentication.Session` Authenticator, with the Form one for login, and an `auth` finder in my `UsersTable` |
# |
May 25th 2021, 10:54 |
neon1024 |
How do I get a consistent type return from Authentication? I am trying `$this->Authentication->getIdentity()->getOriginalData()` (the component), and the method return type is marked as `@return \ArrayAccess|array` but when I dump it in my controller it’s `App\Model\Entity\User Object` |
# |
May 25th 2021, 10:50 |
ndm |
https://stackoverflow.com/questions/62713730/why-is-the-callback-identifier-not-being-invoked/62718515#62718515 |
# |
May 25th 2021, 10:36 |
kushan |
thanks, may I ask if there is a link to an example please? |
# |
May 25th 2021, 10:34 |
ndm |
Certainly possible |
# |
May 25th 2021, 10:33 |
kushan |
is it possible to have an Authenticator class in my codebase (src/) that extends an existing core Authenticator? I tried adding it to src/Authenticator but it didn't work. |
# |
May 25th 2021, 10:10 |
ndm |
Then the answer is no, the matching process will always sort the routes according to their template, in descending regular order. If you're using 4.2.2+, you can use `bin/cake routes` to check in what order they will be matched (top first). |
# |
May 25th 2021, 10:04 |
rudy1976s |
yes |
# |
May 25th 2021, 10:02 |
ndm |
@rudy1976s What does "order" mean to you? The order in which they are being tested when trying to match a URL? |
# |
May 25th 2021, 08:36 |
rudy1976s |
Good morning , is there a way to set up an order for routes? |
# |
May 24th 2021, 23:37 |
rightscoreanalysis |
ok I might just need to change the model file then, no big deal |
# |
May 24th 2021, 23:36 |
rightscoreanalysis |
cak2 btw ^ |
# |
May 24th 2021, 23:32 |
ndm |
I don't really remember anymore how the class registry works... but I think it required unique aliases just like 3.x+ does, ie there can be only one `Order`, and the first one initialized wins. |
# |
May 24th 2021, 23:24 |
rightscoreanalysis |
Ok thanks as an aside, My plugin has an Order model, I need to load my main Oder model though, when I do ClassRegistry::init('Order') cake is loading the plugin version not the main. How can i load the main? |
# |
May 24th 2021, 23:23 |
ndm |
I'd assume that your webhook is a separate request, and therefore a separate connection. Note that internally the id is populated using the last insert ID too. |
# |
May 24th 2021, 23:21 |
rightscoreanalysis |
a webhook is bein gprocessed for another order, so the last InserID might not be what you expect it to be |
# |
May 24th 2021, 23:21 |
rightscoreanalysis |
I mean say a customer updated an Order with a purchase using the frontend |
# |
May 24th 2021, 23:18 |
ndm |
Probably depends on your DBMS and on what you mean by "_resources_". In MySQL for example the last insert ID is per-connection. |
# |
May 24th 2021, 22:40 |
rightscoreanalysis |
want to make sure I am correct in what I am saying, better to use $this->Model->id ? |
# |
May 24th 2021, 22:40 |
rightscoreanalysis |
trying to explain that it is risky and shouldn't be relied on to find *your* last insert id |
# |
May 24th 2021, 22:39 |
rightscoreanalysis |
lastInsertId is the last insert id to the db from any resources is that correct? |
# |
May 24th 2021, 19:34 |
david |
thank you @kevin.pfeifer |
# |
May 24th 2021, 19:33 |
kevin.pfeifer |
but haven't dealt with routes that deep till now |
# |
May 24th 2021, 19:32 |
kevin.pfeifer |
otherwise i would guess you would need to create a custom route class to parse the URL https://book.cakephp.org/4/en/development/routing.html#custom-route-classes and then redirect on that match to whatever you need https://book.cakephp.org/4/en/development/routing.html#redirect-routing |
# |
May 24th 2021, 19:31 |
david |
it was only a try |
# |
May 24th 2021, 19:31 |
david |
yes @kevin.pfeifer, is the way i'm doing right now |
# |
May 24th 2021, 19:30 |
kevin.pfeifer |
i think you are faster when you do that via a .htaccess rewrite rule |
# |
May 24th 2021, 19:19 |
david |
I can't figure how to use wildcards in redirections, or if it is possible |
# |
May 24th 2021, 19:18 |
david |
is there any smart way to redirect using routes all urls containing a word? Something like "redirect /%wp% to /404" |
# |
May 24th 2021, 19:16 |
david |
Hello :) |
# |
May 24th 2021, 13:43 |
michal_kotus |
Hi, @khalil, I am not sure, Mercury is disabled, gonna check. Thank you |
# |
May 24th 2021, 13:40 |
khalil |
And when I remove [] from the field it sends one value instead of multiple |
# |
May 24th 2021, 13:23 |
khalil |
@michal_kotus You have an SMTP server installed on your machine? |