-
Notifications
You must be signed in to change notification settings - Fork 889
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
Fatal: hasOption() on null #1181
Conversation
bf8abed
to
ed672cf
Compare
@Ehimen Thanks for this, looks good :) Not sure about the changes to the PDO Adapter test though? Did you mean to commit that? |
I did, yeah. They're a bit weird to cater for older PHPUnit (following required PHP versions in the CI build), but that does cover this case. Without the fix, the test would fail with the same hasOption() on null bug. |
Is there a workaround until this PR is accepted ? |
@Veridis Ok. You've also renamed the test, can you undo that? |
Sorry @JayPHP. Not sure what you mean? |
ed672cf
to
faf83b8
Compare
faf83b8
to
4c26aeb
Compare
Codecov Report
@@ Coverage Diff @@
## master #1181 +/- ##
==========================================
- Coverage 72.13% 72.01% -0.13%
==========================================
Files 35 35
Lines 5592 5592
==========================================
- Hits 4034 4027 -7
- Misses 1558 1565 +7
Continue to review full report at Codecov.
|
+1, this is actually a critical issue. It's impossible to boostrap a new project with a PDO adapter to a database that doesn't have the phinxlog table already created. |
oh man, so glad i am not going insane. been trying to bootstrap for like two hours now. can confirm the above fix works. |
Looks like a good change! |
@lorenzo let's merge it. |
Thanks @Ehimen ! |
Unit test files must end with the `Test` suffix, otherwise they're not being run. refs cakephp#1181
Unit test files must end with the `Test` suffix, otherwise they're not being run. refs #1181
Unit test files must end with the `Test` suffix, otherwise they're not being run. refs cakephp#1181
Hi there! Any ETA on when this will be released? |
I've just realised the test file rename. I didn't intend this; must have been my IDE. So despite the coverage dropping and @JayPHP explicitly mentioning this, I still missed it. Apologies all. |
Hi. Not sure if I'm missing something, but we've encountered an issue when instantiating a migration environment.
Sample code:
Where our test configuration is:
We encounter this error:
Our script runs an empty seed to prove the problem, but I suspect this would happen with any DB operation against the manager. I think the problem is around initialising a connection, which is too early for an environment to be aware of a console input.
We've worked around this in our project by reverting to v0.8.1, but I'm posting this quick-fix PR in case it is any use.
Thanks! :)