-
Notifications
You must be signed in to change notification settings - Fork 68
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
Having trouble creating PDO object #195
Comments
I've just tested this and it is an actual bug, it looks like it was introduced when scalar type hints were added. Multiple variables of the same type would be counted twice when there were also matching values of those types in |
Truthfully I don't think it did. Even if PDO had been working, I still didn't get far enough in 8 hours to show them the things they were really looking for, due to my choosing to roll my own framework. Thanks for the fix - I'll try it out. |
* Support nullable class type hints (Level-2#182) * Remove PHP 8 deprecation warning * Level-2#195 - stop some parameters getting counted twice * Fix issue where 'shareInstances' resolve but fail to propagate (Level-2#201) * Level-2#200 - Expand shareInstances test to replicate propagation issue * Level-2#200 - Fix issue where 'shareInstances' resolve but fail to propagate Because `$share` is passed by reference to `matchParam()`, and `matchParam()` removes matching objects from its `$search` array, instances may be removed from `$share` before it is passed to `expand()` or `create()`. Depending on the order of constructor parameters and the relative placement of `shareInstances` dependencies in the object tree, this may result in multiple instances of these dependencies being created. Fixed by passing a copy of the `$share` array to `matchParam()`. - Updated CI to use github actions Co-authored-by: thisispiers <[email protected]> Co-authored-by: Tom Butler <[email protected]> Co-authored-by: Luke Arms <[email protected]>
This is the same as #181 |
For a job interview today, I had to try to make a Twitter clone, getting as far as I could in 8 hours. Aside from the fact that I should have chosen Laravel instead of doing it from scratch, and thus I didn't get nearly far enough... I ran into a problem near the end where I couldn't get an instance of PDO going with Dice.
Here's the relevant config:
https://github.com/garrettw/screamer/blob/main/dic-config.php#L39
The problem I was running into was that somehow, the PDO constructor was being sent 5 params: my 3 followed by two NULLs -- so it was complaining that it could only take 4 params. I tried to work around it in a few ways but I didn't get any different outcome.
Can you see anything I might be doing wrong in the config? Or is this an actual bug?
The text was updated successfully, but these errors were encountered: