Download the PHP package phpnomad/safemysql-integration without Composer

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

phpnomad/safemysql-integration

Latest Version Total Downloads PHP Version License

Integrates the SafeMySQL library with PHPNomad's database layer. Provides concrete strategies that plug a SafeMySQL instance into the abstractions declared by phpnomad/mysql-integration and phpnomad/db.

Installation

What This Provides

Requirements

Usage

Create one SafeMySQL instance for the application and bind both strategies to it in your container. The strategies share the same connection so transaction state carries across queries run through the database strategy.

From here, any PHPNomad component that depends on DatabaseStrategy or AtomicOperationStrategy resolves through the SafeMySQL-backed implementations.

Coordinated database operations

Coordination is optional. Load SafeMySqlCoordinationInitializer after the normal MySQL initializer. It binds SafeMySqlCoordinatedDatabaseStrategy as the DatabaseStrategy, and the container autowires it, so bind the application's SafeMySQL instance and a LoggerStrategy. Without the SafeMySQL binding the container builds a new, unconfigured connection.

The coordinated strategy extends SafeMySqlDatabaseStrategy, so ordinary queries behave as before.

The capability locks the complete primary-key identity of the coordination row, checks every declared participant, and runs the callback once in one transaction on the supplied mysqli connection. Declared writes commit together. The callback receives a backend that detects lost ownership and refuses queries after the operation ends. Do not perform external effects in that callback.

It requires MySQL 8, autocommit enabled, READ COMMITTED or REPEATABLE READ, no ambient transaction, stable direct TRIGGER visibility for each participant, and InnoDB base tables without triggers. Unsupported cases fail before the callback.

mysqli cannot report whether a transaction is open, so the adapter reads MySQL's transaction instrumentation instead. Grant the application account read access to four performance_schema tables:

MySQL 8 turns on the transaction instrument and the events_transactions_current consumer by default. Without the grant, or with either one off, coordination refuses before it opens a transaction and names what is missing.

Deadlocks and lock waits become CoordinatedOperationConflictException only after rollback is confirmed. A failed commit or lost ownership can produce CoordinatedOperationOutcomeUnknownException. An unconfirmed rollback produces CoordinatedOperationCleanupFailedException, and a logger transport failure produces CoordinatedOperationReportingFailedException while retaining the classified database failure.

Documentation

Framework docs live at phpnomad.com. For the underlying library, see the SafeMySQL repository and its placeholder reference.

License

MIT. See LICENSE.


All versions of safemysql-integration with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
phpnomad/mysql-integration Version ^1.3
phpnomad/db Version ^2.2.4
phpnomad/datastore Version ^2.0
colshrapnel/safemysql 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 phpnomad/safemysql-integration contains the following files

Loading the files please wait ...