Comments (4)
Hello Vytautas!
The point is that Sylius itself is an enormous project when compared to any of the official plugins and hence it's much harder to try something we consider fresh and interesting there (i. e. removing the get
word from getters). In our opinion, that's one of the plugins' advantages. Let's set the examples of RefundPlugin and RbacPlugin - their logic relies on both application events and commands while the Sylius Core does not.
Since we've decided to use a uuid as an invoice identifier instead of an incremented integer the risk of not finding the invoice in the repository is negligible. Here comes the difference between find
and get
word in the repository. While find
will return an invoice or null, get
always returns a valid object - an invoice in this case.
from invoicingplugin.
Furthermore, set the expected return values to ?InvoiceInterface for the functions 'get' and 'getOneByOrderNumber' to avoid fatal errors if no invoice was found.
from invoicingplugin.
I totally agree with the @bartoszpietrzak1994 explanation 👍 We must remember that Sylius is developed for years and sometimes there is just no space to refactor everything according to the most modern standards. For example, interface InvoiceRepository
is named this way to avoid redundant Interface
suffix, when we can specify details of the class a little bit more in the implementation's name (like DoctrineInvoiceRepository
). There are lot's of things that are the matter of convention and I strongly believe it's not a really big problem that they're not 100% consistent with Sylius' ones. For me, the bigger problem would be if we stick to the old, not-so-great-anymore conventions and coding principles only because we must keep them in a Sylius/Sylius
repository 🚀
from invoicingplugin.
Hello @tautelis !
Please see #108 (comment) and let us know what you think and if you are fine with closing this issue as well :)
from invoicingplugin.
Related Issues (20)
- composer require sylius/invoicing-plugin get error HOT 3
- use symfony mailer and twig inky and not swiftmailer HOT 1
- Invoice not generated at the right state HOT 3
- The process has been signaled with signal 11 HOT 1
- Cleanup class
- Sending invoice per email is broken when using S3 HOT 2
- Links with table do not seem to be right HOT 1
- Customizing the invoice pdf generated by the plugin - not working HOT 1
- change the .env SYLIUS_INVOICING_LOGO_FILE HOT 4
- [RFC] One order item splitted into multiple line items once their unit price differs HOT 7
- WKHTMLTOPDF_PATH path env HOT 1
- [Bug] Resend Invoice : No error message displayed - Admin does not handle 'failure' flash type message (should be 'error') HOT 3
- catalog unit price HOT 5
- Question: delivery note / receipt HOT 2
- OrderPlacedProducer is not connected to the state machine HOT 2
- During reverting migrations Version20191216134233 is failing HOT 1
- InvoiceVoter does not support other instances of Sylius\Component\User\Model\UserInterface HOT 1
- sylius-invoicing:generate-invoices - Expected a value other than null. HOT 1
- Price values are wrong in the PDF invoice HOT 3
- Unit price calculation is wrong on line item HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invoicingplugin.