Contributing

Contributions are welcome and will be fully credited.

Please read and understand the contribution guide before creating an issue or pull request.

Etiquette

This project is open source, and as such, the maintainers give their free time to build and maintain the source code held within. They make the code freely available in the hope that it will be of use to other developers. It would be extremely unfair for them to suffer abuse or anger for their hard work.

Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the world that developers are civilized and selfless people.

It's the duty of the maintainer to ensure that all submissions to the project are of sufficient quality to benefit the project. Many developers have different skill sets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.

Viability

When requesting or submitting new features, first consider whether it might be useful to others. Open source projects are used by many developers, who may have entirely different needs to your own. Think about whether or not your feature is likely to be used by other users of the project.

Procedure

Before filing an issue:

Before submitting a pull request:

Requirements

If the project maintainer has any additional requirements, you will find them listed here.

We try to follow the Laravel standards, https://laravel.com/docs/9.x/contributions#coding-style

1# Example usage
2phpcs --standard=ruleset.xml

Please add tests!

Package Development

Testing

Testing the app

I am currently using an actual (stripped down) Laravel installation to run the tests. To run the tests, first make sure the server is running then start the tests. If it is your first time running the tests you need to install the composer dependencies from the tests/laravel directory.

1php tests/laravel/artisan serve
2php tests/laravel/artisan test

Validating the code

1# If you have CodeSniffer, use the following command to ensure your code follows the PSR2 standard.
2phpcs --standard=ruleset.xml

Building

I've included a build script to automate the build process. It takes care of copying and modifying the root markdown files into examples shipped in the resources/docs directory. Run the commands from your package directory.

Run the build command to copy the markdown files into the resources directory and publish the assets.

1bash build.sh

Next, run these commands

1# Build stylesheet
2npx tailwindcss -i ./resources/src/app.css -o ./resources/assets/app.css --minify
3 
4# Replace path with your Laravel test installation
5php /path/to/laravel/artisan vendor:publish --tag="laradocgen" --force
6 
7# Build API Documentation
8php phpDocumentor.phar

Next, run your tests if you have the LaradocgenTests repo set up (recommended)

1php /path/to/laravel/artisan test

Happy coding!