Download the PHP package totten/amp without Composer

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

Download

Build and Test

The build and test processes are based on composer, phpunit, and box.

To facilitate local development and testing with multiple versions of php and mysqld (on Linux and macOS), the repo includes a few helpers: default.nix, ./scripts/run-tests.sh, and ./scripts/run-build.sh. These helper scripts require the nix package manager. Usage:

About amp: Vision

amp is a tool to facilitate development of PHP web applications. The goal is to complement composer (and similar tools) by adding a (mostly) automated step to setup the database and webserver for newly downloaded code. For example, a developer checking out a project might say:

The my-application package depends on the amp package (using require-dev or suggest). The amp create step creates a new database in the local mysqld and a new virutal-host in the local httpd; then it writes out necessary credentials (eg the mysql username and password) to a config file.

Additional thoughts:

About amp: Pre-Alpha Example

At time of writing, amp is in-development and doesn't fully meet its vision. In the third line, the developer shouldn't call amp create directly; rather, the author of my-application should include an install.sh script, and the downstream developer can run it:

The amp config command determines how to connect to MySQL and httpd. It may scan the local system for common configurations (Ubuntu vs MAMP vs MacPorts; Apache vs nginx), prompt the user for information, and retain the info (in ~/.amp) for future use.

The install.sh is mostly specific to the application, but it builds on amp to address the tedious bit about setting up mysqld and httpd. For example, one might say:

Backlog

See doc/backlog.md

FAQ

Q: Is amp stable? Should I rely on it right now?

A: Probably not. amp is pre-alpha. Interfaces and workflows are likely to change.

Q: How do I configure amp to work on my system?

A: Run `amp config

Q: How do I know if amp is working?

A: Run amp test

Q: How does amp assign a virtual hostname and port?

A: You can specify one by passing the --url option to create. If omitted, it will use localhost and assign an alternative port.

Q: How does amp name databases and database users?

A: The name is computed by taking the directory name (eg my-application) and appending some random characters. The directory name may be truncated to meet MySQL's size limits. The name is the same for the DB and user.

Q: Where does amp store its configuration data?

A: By default, ~/.amp. If you define the environment variable AMPHOME, it will store in the specified directory.

Q: I have five web apps installed. How does AMP distinguish them?

A: Each application should have its own directory (eg /home/me/src/my-application-1). By default, amp assumes that each directory corresponds to a single virtual-host and a single MySQL database. If you need an additional virtual-host and DB for that application, call create again with the --name argument. If you want an additional virtual-host XOR DB, specify --skip-db or --skip-url.

Q: How do I build a stand-alone PHAR executable for amp?

A: Install Box. Then, in the amp source dir, run "php -d phar.readonly=0 which box build"

Internal Architecture

amp uses components from Symfony 2 (eg Console, Config, and Dependency-Injection).

There are a few key services defined in the container:

There may be competing implementations of db, httpd, hosts, and perm -- eg one implementation might connect to a remote mysqld while another launches a local mysqld on a ramdisk. These can be chosen at runtime by calling commands like:

Parameters and services may be configured in amp's source-tree (app/defaults/services.yml) or in the local home directory (~/.amp/services.yml). Parameters entered through the CLI (amp config, amp config:set, etc) are stored in the local home directory (~/.amp/services.yml).


All versions of amp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
lesser-evil/shell-verbosity-is-evil Version ~1.0
symfony/console Version ~5.4
symfony/config Version ~5.4
symfony/yaml Version ~5.4
symfony/dependency-injection Version ~5.4
symfony/filesystem Version ~5.4
symfony/templating Version ~5.4
symfony/process Version ~4.4
totten/process-helper Version ^1.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 totten/amp contains the following files

Loading the files please wait ....