Download the PHP package themusicdev/contact without Composer

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

TheMusicDev/Contact

Contact-form intake for CakePHP 5 sites: an inquiries table and one seam, ContactIntake::intake($request), that validates a submission, flags spam (honeypot field and a too-fast-to-be-human timer), captures where it came from, and saves it. The plugin owns the data and the rules; your site owns the contact page, the response, and the admin screens.

Requires PHP 8.2+ and CakePHP 5.2+. Status: 1.0.0. Design and decisions: docs/contact-plugin-design.md.

Install

(cakephp/migrations runs the migration; it is a dev dependency of this repo, so require it in your app if you do not already have it.)

Use

In your controller action for the contact form's POST:

Status Meaning Saved? Respond with
ok a normal submission yes, status = new success
spam honeypot filled, or submitted faster than min_submit_ms yes, status = spam the same success (never tip bots off)
rejected name, email or message missing or blank no 400
invalid a length cap or the email format failed no 400, errors is a flat field => message map

Request body fields (JSON or form): name, email, message (required); phone, subject, landingPage (optional); renderedAt (ms since epoch when the form was rendered); the honeypot field. Anything else is ignored. IP address, user agent, referrer and locale are taken from the request headers, never from the body.

The table alias is TheMusicDev/Contact.Inquiries; the triage statuses are Inquiry::STATUSES (new, read, spam, archived).

Examples: your site hosts its own pages

The plugin ships no routes, no templates and no admin UI. Layout, branding and authentication belong to the site, so each site hosts its own contact page and its own admin screens. examples/ has a contact controller action, a form with the honeypot and the timer, and an admin triage list with a status flip. They are examples to copy, clearly marked, not autoloaded, and not covered by the plugin's tests.

Configure (host config/app.php, optional)

Host values win over the plugin's config/app_default.php.

Gotchas

Development

Tests run on MariaDB, never sqlite. Override the connection with DATABASE_TEST_URL. Conventions for all TheMusicDev plugins: TheMusicDev/cakephp-conventions. License: MIT.


All versions of contact with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
cakephp/cakephp Version ^5.2
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 themusicdev/contact contains the following files

Loading the files please wait ...