Download the PHP package baraja-core/doctrine without Composer

On this page you can find all versions of the php package baraja-core/doctrine. 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?
baraja-core/doctrine
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package doctrine

BRJ logo
BRJ organisation

Baraja Doctrine database πŸ“š

Integrity check

A simple and easy to use, maximum performance database layer with connection to Doctrine, which allows you to use all the advantages of OOP and also has support for Nette 3.

This package automatically installs Doctrine to your project (also sets everything up in the configuration) and runs stably.

πŸ› Best debug Tracy panel

This package contains the most advanced native tools for debugging your application and SQL queries. You can very easily view the performed queries, click directly on the place of their original invocation and watch the time graphs on the output (with the possibility of analyzing slow queries). Write query types are displayed separately for quick control of data flow.

The package also includes advanced logic for debugging corrupted entities and queries directly through Tracy Bluescreen. Using the debugger turns on automatically and you will never lose any useful information.

πŸ“¦ Installation & Basic Usage

This package can be installed using Package Manager which is also part of the Baraja Sandbox. If you are not using it, you will have to install the package manually using this guide.

A model configuration can be found in the common.neon file inside the root of the package.

To manually install the package call Composer and execute the following command:

In the project's common.neon you have to define the database credentials. A fully working example of configuration can be found in the common.neon file inside this package. You can define the configuration simply using baraja.database extension.

For example:

For now the package supports only the connection to one database.

Possible connection options: url, pdo, memory, driver, driverClass, driverOptions, unix_socket, host, port, dbname, servicename, user, password, charset, portability, fetchCase, persistent, types, typesMapping, wrapperClass.

βš™οΈ Drivers

In default settings Doctrine use MySql driver.

You can rewrite it for example for Postgres:

In your common.neon simple type:

πŸ—ΊοΈ Entity mapping

In order for Doctrine to know which classes are entities and which application logic, it is necessary to set up a mapping.

For mapping, it is necessary to set the introductory part of the namespace entities and the directory where they occur in the project common.neon. A relative path can also be used.

For example:

You can also specify the ignore key, which disables browsing a specific directory.

Important warning:

The value of the %rootDir%, %appDir%, %wwwDir%, %vendorDir% and %tempDir% parameters may be corrupted when running schema generation in CLI mode. To resolve this mistake, please install Package Manager and call the command as a composer dump.

Generate database structure from entities

This package implements a bridge to automatically execute Doctrine commands.

For example you can simply call:

The command o:s:u means orm:schema-tool:update.

If everything will work fine, the command will create the table core__database_slow_query which is defined in this package and is ready for logging slow queries.

TIP: If you are using Package Manager, you can simply call the composer dump command.

πŸš€ Performance Benchmarks

When Doctrine is used poorly, it can be unnecessarily slow.

For more details (in Czech language): https://ondrej.mirtes.cz/doctrine-2-neni-pomala

This package uses best-practices to increase the performance. It sets automatically autoGenerateProxyClasses to false, ProxyClasses will be generated when needed by Doctrine.

For maximum performance is best to save the generated meta data about your entities using Redis: https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/caching.html

UUID

TIP: Read more about UUID binary performance (czech language)

For unique record (entity) identification the package defines the trait UuidIdentifier or UuidBinaryIdentifier with already defined all basic best-practice configurations for your entity. The ID will be generated automatically.

For a better experience please insert two traits to all the entities in your project:

UUID will be generated automatically in PHP.

πŸ“„ License

baraja-core/doctrine is licensed under the MIT license. See the LICENSE file for more details.


All versions of doctrine with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-pdo Version *
baraja-core/nette-symfony-console Version ^1.0
baraja-core/url Version ^1.1
baraja-core/network Version ^1.0
nette/di Version ^3.0
doctrine/orm Version ^2.13
doctrine/annotations Version ^1.13
ramsey/uuid Version ^4.4
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 baraja-core/doctrine contains the following files

Loading the files please wait ....