Closed (fixed)
Project:
Examples for Developers
Version:
8.x-1.x-dev
Component:
DBTNG Example
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
26 Aug 2013 at 13:36 UTC
Updated:
3 Dec 2013 at 05:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wesleydv commentedAdding a patch
Comment #3
mile23Thanks, wesleydv. Sorry about the block_example test fail. :-)
I'm not sure about the pattern of putting database-related methods like load() and delete() on the controller. It's not a bad idea, but it breaks the separation of concerns. It'd be handy if D8 gave us something like Doctrine's repository, but oh well.
That said, I think it's a reasonable move, so we can leave those methods where they are, for the sake of readability.
Just a few other things:
Use @see and/or @link
Qualify the namespace in the @file docblock.
Comment #4
rteijeiro commented@wesleydv, I will continue with this issue as I also am working in https://drupal.org/node/1868178 if you agree ;)
Comment #5
rteijeiro commentedRefactored to OOP. Tried to follow the best practices taking ideas from contrib modules :)
Comment #6
marvil07 commentedThanks for the new patch!
Uhm, it seems like tests are not passing on upstream code, I'll take a look tonigh in order to tests to be run here.
In the meantime, a little quick review with really trivial stuff.
This reference can be fullname(full namespace and class), and docs should convert it in a link IIRC.
Minor space error.
Again, minor space error.
No need to include setUp() if not used.
Comment #7
rteijeiro commentedFixed minor fixes and rebased with the latest changes in DBTNGExampleTest.php file (maybe done by you :P)
Comment #8
marvil07 commented@rteijeiro: Thanks for the new patch, I will be reviewing it in detail as soon as I end up fixing tests in 8.x-1.x (core changes breaking us :-p)
Comment #10
mile23Linking together with this one: #1868178: (better docs for) Port dbtng_example to D8
Also note that #7 removes a whole lot of lovingly crafted documentation in docblocks. It would be great if we could retain and update as much of that info as possible.
Comment #11
rteijeiro commentedHi Mile23, I guess I keep all the docblock comments. Let me know if I have deleted something but I tried to keep all ;)
Comment #12
mile23Since we're having a branch blocker at the testbot level, I've hammered this patch into test-passing.
Found a few references to the old module functions and sorted those out, and also some minor formatting changes.
Not submitting a patch because the testbot will hang anyway, and because you can read it all here:
http://drupalcode.org/project/examples.git/commit/4d79cdc69e179709845f99...
Marking this one closed... Go ahead and open a new issue if you want to continue work on it.
Thanks, folks. :-)