Sort of a broad question but let's tackle at least a few issues.
In case of PHP:
Start a project using composer
// answer questions
In case of license, figure out what suits your project best. Check licenses.
Write code. A lot depends on your use case. What do you want to build? An application? A library? Add dependencies accordingly with Composer. Have good test coverage if you want your code to be reliable.
Tag releases accordingly using your version control system. Use semantic versioning
Publish in Github and packagist
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.