xmlsquad / gsheet-to-xml

Given the url of a Google Sheet, this Symfony Console command fetches the Google Sheet and outputs it in the form of Xml.
Apache License 2.0
3 stars 1 forks source link

Split command into abstract and concrete #22

Closed forikal-uk closed 6 years ago

forikal-uk commented 6 years ago

Goal

[See title]

Why

So that I can isolate the model into the concrete. Eventually the abstract would be in a library and the concrete in a repo representing the concrete command.

How

Refactor and test as I go along.

forikal-uk commented 6 years ago

Where do I put the abstract command?

Google: "symfony bundle best practices"

I didn't find and answer. I am going to create a folder called Library where I can isolate all classes that are infrastructural.

~Let's put it in there or the Command folder~

Actually. No. The example commad

Use an abstract and that is in the Command folder of the Library. So, if we move ours to become a sibling of that, it ought to be there too.

...
use XmlSquad\Library\Command\AbstractCommand;
...

Let's stick ours straight in the Command folder for now, and move it the Library\Command\AbstractGSheetToXmlCommand.php when we are ready to split.

forikal-uk commented 6 years ago

I tried to close this commit with a27d64e56 but I got the wrong url in the commit message. In case your'e wondering it fixes this issue and not whatever it points to.