Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only a few PDO attributes can be configured in propel.database.connections.default.attributes, in contrast to what is mentioned in docs #1213

Closed
motin opened this issue Jun 9, 2016 · 2 comments

Comments

@motin
Copy link
Contributor

motin commented Jun 9, 2016

On http://propelorm.org/documentation/reference/configuration-file.html#attributes it says that all standard PDO attributes can be set as well as a Propel-specific attribute PropelPDO::PROPEL_ATTR_CACHE_PREPARES

It further mentions that attributes in the configuration file can be specified with or without the PDO:: (or PropelPDO::) constant prefix.

However, PropelConfiguration.php restricts the the possible attributes to a few values (ATTR_EMULATE_PREPARES and ATTR_TIMEOUT). Setting other attributes results in the following exception when for instance creating a migration (vendor/bin/propel -vvv migration:create):

  [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
  Unrecognized options "ATTR_ERRMODE, PROPEL_ATTR_CACHE_PREPARES" under "propel.database.connections.default.attributes" 

Note that neither the PDO:: nor PropelPDO:: prefixes are allowed neither.

Either the docs should be updated or Propel should be configured to allow setting the mentioned attributes.

@marcj
Copy link
Member

marcj commented Jun 13, 2016

Yeah probably we should not limit those children. @cristianoc72 do you have an idea how to solve that elegantly?

@marcj
Copy link
Member

marcj commented Oct 15, 2016

Fixed via #1279.

@marcj marcj closed this as completed Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants