Download the PHP package rizzen/composer-package-template without Composer

On this page you can find all versions of the php package rizzen/composer-package-template. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-package-template

composer-package-template

Description

A simple Composer template for starting a library package using Git for versioning control.

Requirements

Installation

From a console prompt enter the following command and press . Replace the path of the command with the path of your project, even if the directory does not exist as it will be created by the command.

Usage

Once the template is installed, make the necessary changes to the existing files, add a few source code files (and directories) for your project.

Edit meta data files

Edit the date and name in the LICENSE file (MIT license), or simple replace the LICENSE file with another license that is suitable for the project.

The included README.md provides a good start for your project's README.md file, as it contains the common sections typically found in many projects' README.md file. Edit the README.md file as needed to reflect your project.

Edit the composer.json file to reflect your project, such as vendor identifier, project package name, author(s) details, descriptions, etc.

Remember to use your vendor identifier in the namespace of your project files.

Update project source files

Once satisfied with the above meta files editing, it is time to to add your project's source code. Begin with removing, or renaming and editing, the example class file in src directory. Create additional sub directories as required, and add the source files.

If planning to do unit testing, create a directory in package directory outside the src directory, and place all your unit testing files there, this way you can keep your src directory clean.

Hosted Git repository

No need to add the entire project before setting up Git in your package. Even one class file in src directory is enough to start off with.

On your hosted Git repository website, create repository of the same name as your package. Ensure the repository is public, and there is no need to add README.md or LICENSE as you already have edited them from the above section.

At console prompt, enter the following commands, each followed by pressing . Adjust the commands as needed, but particular the email, git-username, and package-name with your project's details.

Register package in Packagist

Even though not a requirement, it is recommended to register your package on Packagist, and have it linked to your hosted Git repository. By registering your package on Packagist, you are enabling easier usage of your package, as Packagist will use the Git repository tags to determine which version of your package to deliver to the user's project via Composer. Here the term user means application user, or developer of application, or another library package dependent on your project.

On Packagist website https://packagist.org/ login with your account, if not create an account. Then head over to Submit page, which just has a single URL field to be filled in with the URL to your project's Git repository, and a Submit button.

At this point you should see a warning: This package is not auto-updated. Please set up the GitHub Hook for Packagist so that it gets updated whenever you push!

The easiest way of keeping your package up to date is to allow your Git repository send notification to Packagist. Else you can manually update your package on Packagist using the green Update button.

For GitHub

Simple process:

  1. Navigate to your repository in Github and click on Settings.
  2. In this document select the Webhooks option from the left menu.
  3. Click on Add webhook and search for Packagist and then click on it.
  4. On the Webhooks / Add webhook page, fill in the 4 fields:
    • Payload URL with https://packagist.org/api/github?username=GitHubUsername, where GitHubUsername is your GitHub account username.
    • Content Type as application/json
    • Secret is your Packagist API Token, obtained from your Packagist profile page.
    • Which events, just push events is good enough.
  5. Click Add webhook to complete the process.

Authors and Contributors

Rizzen Yazston

License

This Composer template is released under the MIT license, see included LICENSE file.


All versions of composer-package-template with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rizzen/composer-package-template contains the following files

Loading the files please wait ....