cycle / database

Database Abstraction Layer, Schema Introspection, Schema Generation, Query Builders
MIT License
54 stars 22 forks source link

Add psr/log dependency #35

Closed thgs closed 2 years ago

thgs commented 2 years ago

Steps to reproduce

  1. composer install --no-dev
  2. Running the below example code will complain

example.php

<?php

require_once "vendor/autoload.php";

use Cycle\Database\DatabaseManager;
use Cycle\Database\Driver;      // unused import here
use Cycle\Database\Config;

$dbal = new DatabaseManager(new Config\DatabaseConfig([
    'databases' => [
        'default' => [
            'driver' => 'runtime'
        ],
    ],
    'connections' => [
        'runtime' => new Config\SQLiteDriverConfig(
            connection: new Config\SQLite\FileConnectionConfig(
                database: __DIR__ . './runtime/database.sqlite'
            ),
            queryCache: true,
        ),
    ],
]));

Error message

PHP Warning:  Uncaught Error: Interface "Psr\Log\LoggerAwareInterface" not found in ../cycle/database/src/Driver/Driver.php:36

Another way to reproduce is to require cycle/orm and do not require cycle/annotated and try to setup as per above example file.

codecov[bot] commented 2 years ago

Codecov Report

Merging #35 (a38d674) into 2.x (cee476e) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##                2.x      #35   +/-   ##
=========================================
  Coverage     92.81%   92.81%           
  Complexity     1521     1521           
=========================================
  Files            93       93           
  Lines          3937     3937           
=========================================
  Hits           3654     3654           
  Misses          283      283           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cee476e...a38d674. Read the comment docs.

roxblnfk commented 2 years ago

Thank you

thgs commented 2 years ago

Thank you as well