Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-DBIx-Class CPAN distribution.

Report information
The Basics
Id: 118449
Status: open
Priority: 0/
Queue: Test-DBIx-Class

People
Owner: Nobody in particular
Requestors: HKCLARK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.47
Fixed in: (no value)



Subject: Warnings from Test::PostgreSQL
Test::PostgreSQL has deprecated initdb_args and postmaster_args constructor args in lieu of extra_initdb_args and extra_postmaster_args and it throws warnings. I think this patch should fix things: --- a/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm +++ b/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm @@ -26,8 +26,8 @@ package Test::DBIx::Class::SchemaManager::Trait::Testpostgresql; { } my %config = ( - initdb_args => $Test::PostgreSQL::Defaults{initdb_args} ."", - postmaster_args => $Test::PostgreSQL::Defaults{postmaster_args}, + extra_initdb_args => $Test::PostgreSQL::Defaults{initdb_args} ."", + extra_postmaster_args => $Test::PostgreSQL::Defaults{postmaster_args}, ); $config{base_dir} = $self->base_dir if $self->base_dir;
That probably will fix the warnings, but I've been hesitant to add any code to deal with that as we have much bigger problems with the new version. Without some sort of fix for those issues I'm really reluctant to adapt to the new version. https://github.com/jjn1056/Test-DBIx-Class/issues/37 I will try to file an issue on RT rather than github in case the author picks up issues better there. Show quoted text
> I think this patch should fix things: > > --- a/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm > +++ b/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm > @@ -26,8 +26,8 @@ package > Test::DBIx::Class::SchemaManager::Trait::Testpostgresql; { > } > > my %config = ( > - initdb_args => > $Test::PostgreSQL::Defaults{initdb_args} ."", > - postmaster_args => > $Test::PostgreSQL::Defaults{postmaster_args}, > + extra_initdb_args => > $Test::PostgreSQL::Defaults{initdb_args} ."", > + extra_postmaster_args => > $Test::PostgreSQL::Defaults{postmaster_args}, > ); > > $config{base_dir} = $self->base_dir if $self->base_dir;
Another note on this patch. We probably need to worry about the version of the Test::PostgreSQL module the user has installed. While we can specify a version number in the optional features part of our dependencies, I don't think that will necessarily ensure it gets upgraded if it's too old. We probably need to detect older versions too. I pushed a fudge I came up with some time ago to github if you want to try it - https://github.com/colinnewell/Test-DBIx-Class/tree/colin/root_fudge That prevents the warning and also ensures it can run on root. It doesn't detect older versions of Test::PostgreSQL, it just has a comment to remind me to add that if I go any further with that branch. On Thu Oct 20 12:31:18 2016, HKCLARK wrote: Show quoted text
> Test::PostgreSQL has deprecated initdb_args and postmaster_args > constructor args in lieu of extra_initdb_args and > extra_postmaster_args and it throws warnings. > > I think this patch should fix things: > > --- a/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm > +++ b/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm > @@ -26,8 +26,8 @@ package > Test::DBIx::Class::SchemaManager::Trait::Testpostgresql; { > } > > my %config = ( > - initdb_args => > $Test::PostgreSQL::Defaults{initdb_args} ."", > - postmaster_args => > $Test::PostgreSQL::Defaults{postmaster_args}, > + extra_initdb_args => > $Test::PostgreSQL::Defaults{initdb_args} ."", > + extra_postmaster_args => > $Test::PostgreSQL::Defaults{postmaster_args}, > ); > > $config{base_dir} = $self->base_dir if $self->base_dir;
Another note on this patch. We probably need to worry about the version of the Test::PostgreSQL module the user has installed. While we can specify a version number in the optional features part of our dependencies, I don't think that will necessarily ensure it gets upgraded if it's too old. We probably need to detect older versions too. I pushed a fudge I came up with some time ago to github if you want to try it - https://github.com/colinnewell/Test-DBIx-Class/tree/colin/root_fudge That prevents the warning and also ensures it can run on root. It doesn't detect older versions of Test::PostgreSQL, it just has a comment to remind me to add that if I go any further with that branch. On Thu Oct 20 12:31:18 2016, HKCLARK wrote: Show quoted text
> Test::PostgreSQL has deprecated initdb_args and postmaster_args > constructor args in lieu of extra_initdb_args and > extra_postmaster_args and it throws warnings. > > I think this patch should fix things: > > --- a/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm > +++ b/lib/Test/DBIx/Class/SchemaManager/Trait/Testpostgresql.pm > @@ -26,8 +26,8 @@ package > Test::DBIx::Class::SchemaManager::Trait::Testpostgresql; { > } > > my %config = ( > - initdb_args => > $Test::PostgreSQL::Defaults{initdb_args} ."", > - postmaster_args => > $Test::PostgreSQL::Defaults{postmaster_args}, > + extra_initdb_args => > $Test::PostgreSQL::Defaults{initdb_args} ."", > + extra_postmaster_args => > $Test::PostgreSQL::Defaults{postmaster_args}, > ); > > $config{base_dir} = $self->base_dir if $self->base_dir;