Conversation
|
I do not understand why we should forbid the use of those methods; not now. |
|
This is because this values are evaluated at runtime, so they are subject to change, return something different if a table name changes for example. This should be hardcoded so we are sure of the values, at anytime. This ensure the table xxx was created because it's hardcoded. |
These rules specifically target migration files. |
AdrienClairembault
left a comment
There was a problem hiding this comment.
Ok for me but the errors should be in english.
While I was fixing a migration file, I've a POC to check migration files, so the implicit rules become explicit.
An exemple phpstan config could be, (important part is the rules includes).
levelmay be set higher, that not the purpose of these PR.Some other files may be needed in bootstrap.
String must be translated in english, that's just a fast POC.