laravel-doctrine / orm

An integration library for Laravel and Doctrine ORM
MIT License
829 stars 178 forks source link

[IMPROVEMENT] Better IDE support for entity() helper parameters #504

Closed soltmar closed 3 years ago

soltmar commented 3 years ago

Slightly refactored entity() helper method for better IDE support. 'dynamic' keyword is not supported by PhpDoc and 'mixed is the correct one. Also replaced func_get_args() with splat operator.

soltmar commented 3 years ago

Hi, just to note that tests are failing due to different version of DBAL and have nothing to do with entity() helper changes.

To fix most of the tests DBAL package would need to be locked to version 2- "doctrine/dbal": "^2.13", but not sure if it would be desired. Additionally, few other changes to the tests itself are required.

soltmar commented 3 years ago

I have locked DBAL version. Please let me know if it's not desired.

eigan commented 3 years ago

Just want to let you know that I have eyes on this and will take a look at it when I get the time 👍🏻

Any idea what happen to the tests? Looks like the got broken in the other branches too. Related to dbal 3?

soltmar commented 3 years ago

Yes, this is due to dbal 3.

I can try to work on supporting DBAL 3 and submit another PR3

soltmar commented 3 years ago

Would you be ok with accepting this PR prior to fixes for DBAL 3 ? Or maybe at least label my PR as hacktoberfest-accepted (just conscious of hacktoberfest end-date 😉 )

eigan commented 3 years ago

I cherry-picked your dbal commit into 1.5 and above. Could you rebase your branch on latest 1.7? :)

soltmar commented 3 years ago

This may sound stupid but I've never done rebase before 🤦‍♂️

How can I do this ?

eigan commented 3 years ago
git remote add upstream https://github.com/laravel-doctrine/orm.git
git fetch upstream
git checkout 1.7
git rebase -i upstream/1.7
# An editor opens. Replace `pick` with `drop` on each line - except on the line with "Better IDE support for entity() parameters".
git push -f
eigan commented 3 years ago

Released with 1.7.12 @soltmar. Thanks! 🙂