Skip to content

Commit

Permalink
[doctrineGH-2846] Convert unknown Column options deprecation to Doctr…
Browse files Browse the repository at this point in the history
…ine API.
  • Loading branch information
beberlei committed Mar 7, 2021
1 parent 6d9882d commit c7225fe
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/Doctrine/DBAL/Schema/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
namespace Doctrine\DBAL\Schema;

use Doctrine\DBAL\Types\Type;
use Doctrine\Deprecations\Deprecation;

use function array_merge;
use function is_numeric;
use function method_exists;
use function sprintf;
use function trigger_error;

use const E_USER_DEPRECATED;

/**
* Object representation of a database column.
Expand Down Expand Up @@ -80,11 +77,13 @@ public function setOptions(array $options)
$method = 'set' . $name;
if (! method_exists($this, $method)) {
// next major: throw an exception
@trigger_error(sprintf(
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/2846',
'The "%s" column option is not supported,' .
' setting it is deprecated and will cause an error in Doctrine DBAL 3.0',
' setting unknown options is deprecated and will cause an error in Doctrine DBAL 3.0',
$name
), E_USER_DEPRECATED);
);

continue;
}
Expand Down

0 comments on commit c7225fe

Please sign in to comment.