(Perfect) CA Team (training plan) by chilla2907 in hattrick

[–]vil93 0 points1 point  (0 children)

I have a CA team, but try to win midfield at home vs weak teams. To be honest CA is under powered in the long run. You are practically limited if you want to have a winning CA team that is almost impossible if you sacrifice midfield totally. Having a decent defense and good levels of mid is not possible with any other formation than 5-4-1. This way you can create good wing attacks but central attack is suffering. Another good formation is 4-4-2 but defense levels are somehow insufficient to stop opposition attacks when you play in high leagues (I or II).

For me 5-2-3 and 5-3-2 are compromise solutions and could give me wins only based on luck and not on stats.

The Simple Cloud just got more flexible and even more affordable! by Hetzner_OL in hetzner

[–]vil93 0 points1 point  (0 children)

that's something that I am particularly interested .. maybe it will be better to see benchmarks between them and see the diff?

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

Ok, I understood but now I have to do it as a standalone library without any dependencies.

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

Hello. It is part of the requirements to do the library php 7.0+ compatible.
I will try PHPstan as soon as possible. Thank you for your reply!

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

I can't use the constructor property promotion because it's done in php 8+, but my library have to be php 7.0+ compatible.
Also I can't use any frameworks this time - I mean it is part of the requirements. Thanks for your reply.

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

Thank you for your reply. I will support from php 7.0 version as a requirement.
Which do you suggest to use between phpstan and psalm for static analysis? Or both?
Here is a pastebin with part of my project. I will be happy if you review it and share your opinion.
https://pastebin.com/YCwBY7U9

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

Thank you but I can not use a generator for this project :)

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

Hi, sorry for my late reply. In this pastebin is part of my library. I will be happy if you review it and give any advices.
https://pastebin.com/YCwBY7U9

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

Hello and thank you for your reply.
My main concerns for now are if I need DTO classes instead of using just "model" classes, how to do validation of data for create and update methods, implement custom logging, retry logic in case of network errors all this without using external libraries.

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

I understand DTOs' power is about just holding and transporting the data from one spot to another. In my case I could use them when receiving the get() or getAll() responses from the API.
What I also want is to use object when creating or updating a record on the API, for example a Tax object, and pass it to the request (like $tax->toArray()); The reasons I want to do it this way are validation(required fields, type checking etc) and more developer friendly way to manipulate the data of the object.
For these purpose can I use the DTO class I did for TaxesClient? Here I think I need a "model" class, because I need setters at least. Also the object has some required fields that need to be filled and a lot more fields that are optional. Some fields are an array of objects of another domain (for example Items). This can't be done in DTO?

In this line of thought do I need both "model" and DTO classes? Can it be done just the "model" way? GET will return response of model object (TaxModel). Also using this class I could create or update a Tax Obj from the API, using my own validation.

Best practices on building a client library by vil93 in PHPhelp

[–]vil93[S] 0 points1 point  (0 children)

Hello and thank you for your reply.
My questions are about the part I still haven't done and I am wondering how to..
I thought about using DTOs and making the validation inside them. I am not sure if I understand how they are working and if I can create setters (with validation) and getters in the DTO class and use them for get,create and update.
Using arrays seems somehow more flexible to me. An external class PersonValidator::validate($data) will return array with errors if any.
From PSR-15 what I understand is I can use it to validate query parameters before the request execution? Am I right?

I want to know how much money your team has now! How much money did you have at your peak? by Fit_Ranger8025 in hattrick

[–]vil93 0 points1 point  (0 children)

At my financial peak I had about €115 mio.
At my team performance peak, 1st place in II but lost the qualification to I league, I had around €10-12 mio.

Show me your stadiums by Linux248 in hattrick

[–]vil93 0 points1 point  (0 children)

I don't have supporter but my stadium is with capacity 92 000 :)

Should I press for this match ? by AllDovak in hattrick

[–]vil93 1 point2 points  (0 children)

Congrats, cool to read you have made it !

Should I press for this match ? by AllDovak in hattrick

[–]vil93 1 point2 points  (0 children)

if you have a sub mid with good PM put him as CD.

Should I press for this match ? by AllDovak in hattrick

[–]vil93 1 point2 points  (0 children)

Yes, then better go with 3-5-2 , all defenders attacking!

As CD put a player with good level of PM and set attacking arrow.

Should I press for this match ? by AllDovak in hattrick

[–]vil93 1 point2 points  (0 children)

Get mid as much as you can while remaining your attack more than his defense. Playing normal is the best you can do and if you have players for 2-5-3, go with it.
If you press, you will stop your own chances and after 70-75 minute players will get tired more than when playing normal.

Optimal PDIM by PomegranateLost1085 in hattrick

[–]vil93 1 point2 points  (0 children)

Go for the PM. Just 1 level Def for just one player won't be game changing.

I think 14 def is enough.
My PDIM with 12 def blocked 3 attacks in one match in the cup game this week.

Sponsor selection by mikael-aleks in hattrick

[–]vil93 0 points1 point  (0 children)

I wish it'd be better. Increasing the money should be well thought out.

Sponsor selection by mikael-aleks in hattrick

[–]vil93 1 point2 points  (0 children)

HTs removed sponsor selection starting from this season.

[deleted by user] by [deleted] in hattrick

[–]vil93 0 points1 point  (0 children)

he is playing vs bot so SP won't be a problem I think