Download the PHP package daycry/schemas without Composer

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

schemas

Schemas for Codeigniter 4

Build status Coverage Status Downloads GitHub release (latest by date) GitHub stars GitHub license

Quick Start

  1. Install with Composer: > composer require daycry/schemas
  2. Generate a new schema: > php spark schemas

Features

1 Some features are still in development. See Handlers > Development for planned future expansion.

Installation

Install easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities and always be up-to-date:

Or, install manually by downloading the source files and adding the directory to app/Config/Autoload.php.

Configuration (optional)

The library's default behavior can be altered by extending its config file. Copy examples/Schemas.php to app/Config/ and follow the instructions in the comments. If no config file is found in app/Config the library will use its own.

Usage

Schemas has four main functions, each with a variety of handlers available:

The Schemas service is also available to simplify a workflow with convenient wrapper functions. At its most basic (with automation enabled), the service will draft, archive, and return a schema with one simple command:

$schema = service('schemas')->get();

You may want to control when portions of the workflow take place to optimize performance. Here is an example of one common process, mapping the default database group and storing the resulting schema to the cache:

If you need to deviate from default handler configurations you can inject the handlers yourself:

Command

Schemas comes with a spark command for convenient schema generation and display:

`schemas [-draft handler1,handler2,...] [-archive handler1,... | -print]`

Use the command to test and troubleshoot, or add it to your cron for periodic schema caching:

php spark schemas -draft database,model -archive cache

Automation

By default automation is turned on, but this can be configured via the $automate toggles in your config file. Automation will allow the service to fall back on a Reader, or even on a Drafter should it fail to have a schema already loaded. While automation makes using the library very easy, it can come at a performance cost if your application is not configured correctly, since it may draft a schema on every page load. Use automation to help but don't let it become a crutch.

Structure

Schemas uses foreign keys, indexes, and naming convention to detect relationships automatically. Make sure your database is setup using the appropriate keys and foreign keys to assist with the detection. Naming conventions follow the format of {table}_id for foreign keys and {table1}_{table2} for pivot tables. For more examples on relationship naming conventions consult the Rails Guide Active Record Associations (and please excuse the Ruby reference).

Intervention

Should autodetection fail or should you need to deviate from conventions there are a few tools you can use to overwrite or augment the generated schema.

Drafting

Currently supported handlers:

Archiving/reading

Database Support

All CodeIgniter 4 database drivers work but due to some differences in index handling they may not all report the same results. Example: see skipped tests for SQLite3.

Development

The eventual goal is to support mapping from and deploying to any source. Planned handler implementations include:

And the file-specific handlers:

Want to help out? All code and issues are managed on GitHub


All versions of schemas with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 daycry/schemas contains the following files

Loading the files please wait ....