cycle / database

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

Adding the ability to pass the port as a string #109

Closed msmakouz closed 1 year ago

msmakouz commented 1 year ago

This will allow passing a value from env without casting it to an integer.

'drivers' => [
    'mysql' => new Config\MySQLDriverConfig(
        connection: new Config\MySQL\TcpConnectionConfig(
            database: 'spiral',
            host: '127.0.0.1',
            port: env('DB_PORT'),
            user: 'root',
            password: 'root',
         ),
        queryCache: true
    ),
],
codecov[bot] commented 1 year ago

Codecov Report

Merging #109 (66192de) into 2.x (457d1f2) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##                2.x     #109   +/-   ##
=========================================
  Coverage     94.49%   94.50%           
- Complexity     1648     1649    +1     
=========================================
  Files            96       96           
  Lines          4470     4473    +3     
=========================================
+ Hits           4224     4227    +3     
  Misses          246      246           
Impacted Files Coverage Δ
src/Config/MySQL/TcpConnectionConfig.php 100.00% <100.00%> (ø)
src/Config/Postgres/TcpConnectionConfig.php 100.00% <100.00%> (ø)
src/Config/SQLServer/TcpConnectionConfig.php 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.