-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split and move around exceptions, make MigrationException an interface #636
Conversation
'Migrations configuration file already loaded' | ||
), | ||
8 | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only really need to linebreak either self
or sprintf
, not both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, why the sprintf
?
sprintf( | ||
'Migrations configuration file already loaded' | ||
), | ||
8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are those codes about? Do you think people might rely on them? Should they be documented somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, they were there before, let's keep them then, I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will have to ask someone else for that. :P 5d6fbf8
Just kept those for compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OF course, with this new exception layout it's obsolete.
sprintf( | ||
'Migration class "%s" contains a prepared statement. | ||
Unfortunately there is no cross platform way of outputing it as an sql string. | ||
Do you want to write a PR for it ?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha that's great 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Majkl578 great job, just this tiny little thing 😄
public static function new() : self | ||
{ | ||
return new self( | ||
sprintf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sprintf()
here is not really needed
I further split Doctrine\Migrations\Configuration\Exception\NotValid to specific ones and removed it. |
Ready to merge? |
Still wanted @alcaeus to have a look. 😊 But if you need it in for some other work, could be discussed after merge. |
Hmm, I alegedly decreased coverage by 1% just by moving around the methods and it's now blocking merge. 🤔 |
This follows concept introduced in ORM (doctrine/orm#6743 + doctrine/orm#7210) and naming follows pattern accepted in Doctrine CS.
No polyfill is currently provided in this PR, it should be introduced in 1.x afterwards.
closes #621
cc @greg0ire