Closed diabl0 closed 7 years ago
@diabl0 Hi, this looks solid. Could you please fix the conflicts and write accompanying tests? Thanks.
@diabl0, I just realized that you made this PR against master. Could you please make this against the devel branch? Let me know if you have the time to do this within the next one or two days, so I can include this in the next release.
Also, there is a chance that in order to accept third-party code into this repo, a CLA (https://www.arangodb.com/documents/cla.pdf) might have to be signed and mailed or faxed to ArangoDB's offices. @jsteemann can you confirm this? I remember I signed it, but I am not sure if it only applies to the main arangodb/arangodb repo or indeed all arangodb/* repos.
@diabl0 pls check my last comment on the issue of the CLA and the correct branch to make a PR against. Please also make sure there are no conflicts. Thanks
@frankmayer CLA was submitted and accepted. Next week I will try to update my pull request to current devel branch.
@diabl0 great! please also write one or more tests to cover the new functionality. Essentially the best thing is to check the https://github.com/arangodb/arangodb-php/blob/devel/CONTRIBUTING.md file.
Hey @diabl0, I would love to see your pull request merged, I thought about to help to resolve the merge conflicts or write some tests ... if it doesn't require to send CLA, which would slow down the merge, of course.
@hwde i have it mostly rewritten to current debate branch but due to other urgent project I haven't tested it properly. I will push current work in progress later if you want to contribute.
@diabl0 That would be cool, thanks.
@hwde it's pushed here: https://github.com/diabl0/arangodb-php/tree/DocumentClass
@diabl0 Ok, I've written some tests and added the documentClass to Batch and Export too, please have a look here: https://github.com/hwde/arangodb-php/tree/DocumentClass - five arangodb-php tests are failing, but I assume it's because I'm using macOS, on devel branch the same tests failed.
@hwde Great. Can you create pull request?
I switched my main project to use this arrangedb-php branch and it works properly, so probably tomorrow I will try to wrap this up, update documentation, write some use cases and create new pull request from DocumentClass branch to devel branch.
Closing this PR in favor of PR #208
Related with https://github.com/arangodb/arangodb-php/issues/6 Allows to use custom document classes. This will enable to have some business logic associated with particular document types and helps with using ArangoDB documents in different frameworks like Symfony.
Documentation:
If you want to use custom document class you can pass it's name to DocumentHandler or CollectionHandler using method
setDocumentClass
. Remember that Your class must extend\triagens\ArangoDb\Document
.