Project Structure
Your project will always have the same basic structure. It may be made more complicated if needed, but most of the time this structure will be enough.
Client Definitions
All your work should be done in the
folder. All references to file locations in this section will be within the src folder.src/
Client Resource Group
In the src folder, you should create a file called
, which will be the main entry point into your module (the Client Resource Group). There will only ever be one of these.Client.php
Tests
Tests should be done in the
folder. All tests should extend tests/
. Unit tests will be put in the Unit folder and feature tests in the Feature folder. Tests should be named after the class they test, appended with tests/TestCase.php
.Test
Docs
We have yet to decide on the docs structure. It’ll use antora, but for now you are free to document however you want.
- src
- Client.php // The main entry point
- clients/
- FileClient.php // Used to access the file resource
- CommentClient.php // Used to access the comments resource
- models/
- File.php // Represents a file model
- Comment.php // Represents a comment model
- tests
- TestCase.php
- Unit
- ClientTest.php
- clients/
- FileClientTest.php
- CommentClientTest.php
- models/
- FileTest.php
- CommentTest.php
- Feature
- ClientTest.php