Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via composer

doctrine/dbal 3.6.3

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
Package summary
Share
0
issues
1
license
6
MIT
Package created
10 Oct 2011
Version published
1 Jun 2023
Maintainers
2
Total deps
6
Direct deps
5
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
6 Packages, Including:
doctrine/cache@2.2.0
doctrine/dbal@3.6.3
doctrine/deprecations@1.1.3
doctrine/event-manager@2.0.0
psr/cache@3.0.0
psr/log@3.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of doctrine/dbal 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
doctrine/cache2.2.015.99 kBMIT
prod
doctrine/deprecations1.1.37.42 kBMIT
prod
doctrine/event-manager2.0.05.95 kBMIT
prod
psr/cache3.0.06.01 kBMIT
prod dev
psr/log3.0.06.77 kBMIT
prod dev

Visualizations

Frequently Asked Questions

What does doctrine/dbal do?

Doctrine DBAL (Database Abstraction Layer) is a powerful PHP tool for handling database operations. It provides a uniform interface for different types of databases, which allows developers to switch databases seamlessly. Furthermore, Doctrine DBAL offers a comprehensive toolkit for database schema introspection and management, making it much simpler to work with and modify your database structure.

How do you use doctrine/dbal?

To get started with Doctrine DBAL in your PHP project, you first need to install it using Composer:

composer require doctrine/dbal

After installation, you can initiate a database connection and start executing queries like so:

<?php
require_once 'vendor/autoload.php';

use Doctrine\DBAL\DriverManager;

$connectionParams = [
    'dbname' => 'mydb',
    'user' => 'user',
    'password' => 'secret',
    'host' => 'localhost',
    'driver' => 'pdo_mysql',
];

$conn = DriverManager::getConnection($connectionParams);

$sql = "SELECT * FROM users";
$stmt = $conn->query($sql);

while ($row = $stmt->fetch()) {
    echo $row['username']."\n";
}

In this example, the $connectionParams array holds the db connection details. The DriverManager::getConnection method establishes the connection and returns a connection object. The $conn->query($sql) method is used to execute SQL queries.

Remember, this is a basic example. You can perform more complex operations like transaction management, schema manipulation, and more with Doctrine DBAL.

Where are the doctrine/dbal docs?

Complete documentation for the Doctrine DBAL library can be found at its dedicated documentation website - DBAL Documentation. This documentation is a comprehensive guide for using Doctrine DBAL. It covers topics such as connection details, configuration settings, query builder usage, schema management, transaction operations, detailed API information, and much more. Have a look at it to get up and running with Doctrine DBAL effectively.