Download the PHP package dhii/php-project without Composer

On this page you can find all versions of the php package dhii/php-project. 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 php-project

Dhii - PHP Project

Continuous Integration

A PHP starter to ease project creation

Details

Use this project as a starter for your PHP library!

Feaures

Usage

Getting Started

Use Composer to bootstrap your project.

  1. Clone and install deps:

    Here, my_project is the name of the project folder.

  2. Customize project

    Note: Asterisk * below denotes that changing this value requires rebuild of the images in order to have effect on the dev environment.

    • Copy .env.example to .env.
    • .env:

      • BASE_PATH - If you are using Docker Machine, i.e. on any non-Linux system, set this to the absolute path to the project folder inside the machine. If you are on Linux, you do not need to change this.
      • PROJECT_NAME - Slug of your project. Used mainly for naming containers with container_name. This is helpful to run multiple projects on the same machine.
      • PHP_BUILD_VERSION - The version of PHP, on which the plugin will be built. This should correspond to the minimal PHP requirement of your plugin. Used to determine the tag of the php image.
      • PHP_TEST_VERSION* - The version of PHP, on which the plugin will be run. This should correspond to the maximal PHP requirement of your plugin. Used to determine the tag of the php image.
    • composer.json:
      • name - Name of your package.
      • description - Description of your package.
      • authors - You and/or your company details.
      • require - Your project's package and platform requirements. You may want to change the PHP version if your minimal requirement is different. Don't forget to update PHP_BUILD_VERSION in .env.
      • require-dev - Your project's development requirements. Tools for testing and code quality.

Updating Dependencies

Composer is installed into the build service's image. To run composer commands, use docker-compose run. For example, to update dependencies you can run the following:

If you use PHPStorm, you can use the composer integration, as the project is already configured for this.

Testing Code

This bootstrap includes PHPUnit. It is already configured, and you can test that it's working by running the sample tests:

If you use PHPStorm, you can use its PHPUnit integration: right-click on any test or folder inside the tests directory, and choose "Run". This will do the same as the above command. Because the test service is used for tests, they will be run with its PHP version, which should correspond to your project's minimal requirements, but can be something else if you want to test on a system that has different specs.

Debugging

The bootstrap includes xDebug in the test service of the Docker environment, and PHPStorm configuration. To use it, right click on any test or folder within the tests directory, and choose "Debug". This will run the tests with xDebug enabled. If you receive the error about xdebug.remote_host being set incorrectly and suggesting to fix the error, fix it by setting that variable to your machine's IP address on the local network in the window that pops up. After this, breakpoints in any code reachable by PHPUnit tests, including the code of tests themselves, will cause execution to pause, allowing inspection of code.

Static Analysis


All versions of php-project with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 | ^8.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 dhii/php-project contains the following files

Loading the files please wait ...