Download the PHP package jackalope/jackalope-doctrine-dbal without Composer

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

Jackalope Doctrine-DBAL

Build Status Latest Stable Version Total Downloads

Implementation of the PHP Content Repository API (PHPCR) using a relational database to persist data.

Jackalope uses Doctrine DBAL to abstract the database layer. It is currently tested to work with MySQL, PostgreSQL and SQLite.

For the moment, it is less feature complete, performant and robust than Jackalope-Jackrabbit but it can run on any server with PHP and an SQL database.

Discuss on [email protected] or visit #jackalope on irc.freenode.net

License

This code is dual licensed under the MIT license and the Apache License Version 2.0. Please see the file LICENSE in this folder.

Requirements

Installation

The recommended way to install jackalope is through composer.

Create a repository

Set up a new database supported by Doctrine DBAL. You can use your favorite GUI frontend or use the following commands:

MySQL

Note that you need at least version 5.1.5 of MySQL, otherwise you will get SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION cmf-app.EXTRACTVALUE does not exist

Also note that with MySQL/MariaDB, you need to configure the encoding to be used (see "bootstrapping" below).

If you configured the encoding but still run into issues with the encoding, e.g. SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4', you can set the jackalope.case_sensitive_encoding parameter in the call to RepositoryFactoryDoctrineDBAL::getRepository.

PostgreSQL

SQLite

Database is created automatically if you specify driver and path ("pdo_sqlite", "jackalope.db"). Database name is not needed.

For further details, please see the Doctrine configuration page.

Oracle

Disclaimer: There is no continuous integration with Oracle. Jackalope 1.8.0 was successfully tested by one of our users against Oracle 19c Enterprise Edition. If you plan to use Jackalope with an Oracle Database, we recommend that you set up the Jackalope test suite to ensure your version of Jackalope and Oracle work together nicely.

Note: A doctrine middleware is automatically added to the database connection to work around Oracle converting the lowercase table and field names to upper case in its results.

CLI Tool

We provide a couple of useful commands to interact with the repository.

NOTE: If you are using PHPCR with the Symfony framework, the DoctrinePHPCRBundle provides the commands in the normal Symfony console. Only do the below setup if you use Jackalope without the Symfony integration.

To use the console, copy cli-config.dist.php to cli-config.php and configure the connection parameters. Then you can run the commands from the jackalope directory with ./bin/jackalope

There is the Jackalope specific command jackalope:init:dbal which you need to run to initialize a database before you can use it.

You have many useful commands available from the phpcr-utils. To get a list of all commands, type:

To get more information on a specific command, use the help command. To learn more about the phpcr:workspace:export command for example, you would type:

Bootstrapping

Before you can use Jackalope with a database, you need to prepare the database. Create a database as described above, then make sure the command line utility is set up (see above "CLI Tool"). Now you can run:

Once these steps are done, you can bootstrap the library. A minimalist sample code to get a PHPCR session with the doctrine-dbal backend:

To use a workspace different than default you need to create it first. To create a new workspace, run the command bin/jackalope phpcr:workspace:create <myworkspace>. You can also use the PHPCR API to create workspaces from your code.

Usage

The entry point is to create the repository factory. The factory specifies the storage backend as well. From this point on, there are no differences in the usage (except for supported features, that is).

See PHPCR Tutorial for a more detailed tutorial on how to use the PHPCR API.

Performance tweaks

If you know that you will need many child nodes of a node you are about to request, use the depth hint on Session::getNode. This will prefetch the children to reduce the round trips to the database. It is part of the PHPCR standard. You can also globally set a fetch depth, but that is Jackalope specific: Call Session::setSessionOption with Session::OPTION_FETCH_DEPTH to something bigger than 1.

Use Node::getNodeNames if you only need to know the names of child nodes, but don't need the actual nodes. Note that you should not use the typeFilter on getNodeNames with jackalope. Using the typeFilter with getNodes to only fetch the nodes of types that interest you can make a lot of sense however.

Advanced configuration

Logging

Jackalope supports logging, for example to investigate the number and type of queries used. To enable logging, provide a logger instance to the repository factory:

You can also wrap a PSR-3 compatible logger like monolog with the Psr3Logger class.

Note that when using jackalope in Symfony2, the logger is integrated in the debug toolbar.

Custom UUID generator

By default, Jackalope uses the UUIDHelper class from phpcr-utils. If you want to use something else, you can provide a closure that returns UUIDs as parameter jackalope.uuid_generator to $factory->getRepository($parameters)

Implementation notes

See doc/architecture.md for an introduction how Jackalope is built. Have a look at the source files and generate the phpdoc.

Running the tests

Jackalope-doctrine-dbal is integrated with the phpcr-api-tests suite that tests all PHPCR functionality.

If you want to run the tests, please see the README file in the tests folder.

Things left to do

The best overview of what needs to be done are the skipped API tests. Have a look at ImplementationLoader to see what is currently not working and start hacking :-)

Also have a look at the issue trackers of this project and the base jackalope/jackalope.

Contributors


All versions of jackalope-doctrine-dbal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-dom Version *
ext-pdo Version *
ext-xml Version *
doctrine/dbal Version ^3.8.1 || ^4.0
phpcr/phpcr Version ~2.1.5
phpcr/phpcr-utils Version ^1.8 || ^2.0
jackalope/jackalope Version ^2.0.0
psr/simple-cache Version ^1.0 || ^2.0 || ^3.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 jackalope/jackalope-doctrine-dbal contains the following files

Loading the files please wait ....