Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
2b33eeff
Unverified
Commit
2b33eeff
authored
Aug 17, 2018
by
Michael Moravec
Committed by
Sergei Morozov
Nov 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Doctrine\DBAL\Types\Type::getDefaultLength()
parent
b7e82302
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
25 deletions
+4
-25
UPGRADE.md
UPGRADE.md
+4
-0
StringType.php
lib/Doctrine/DBAL/Types/StringType.php
+0
-8
Type.php
lib/Doctrine/DBAL/Types/Type.php
+0
-12
StringTest.php
tests/Doctrine/Tests/DBAL/Types/StringTest.php
+0
-5
No files found.
UPGRADE.md
View file @
2b33eeff
# Upgrade to 3.0
## BC BREAK: `Doctrine\DBAL\Types\Type::getDefaultLength()` removed
The
`Doctrine\DBAL\Types\Type::getDefaultLength()`
method has been removed as it served no purpose.
## BC BREAK: `Doctrine\DBAL\Types\Type::__toString()` removed
Relying on string representation was discouraged and has been removed.
...
...
lib/Doctrine/DBAL/Types/StringType.php
View file @
2b33eeff
...
...
@@ -17,14 +17,6 @@ class StringType extends Type
return
$platform
->
getVarcharTypeDeclarationSQL
(
$fieldDeclaration
);
}
/**
* {@inheritdoc}
*/
public
function
getDefaultLength
(
AbstractPlatform
$platform
)
{
return
$platform
->
getVarcharDefaultLength
();
}
/**
* {@inheritdoc}
*/
...
...
lib/Doctrine/DBAL/Types/Type.php
View file @
2b33eeff
...
...
@@ -114,18 +114,6 @@ abstract class Type
return
$value
;
}
/**
* Gets the default length of this type.
*
* @deprecated Rely on information provided by the platform instead.
*
* @return int|null
*/
public
function
getDefaultLength
(
AbstractPlatform
$platform
)
{
return
null
;
}
/**
* Gets the SQL declaration snippet for a field of this type.
*
...
...
tests/Doctrine/Tests/DBAL/Types/StringTest.php
View file @
2b33eeff
...
...
@@ -25,11 +25,6 @@ class StringTest extends DbalTestCase
self
::
assertEquals
(
'DUMMYVARCHAR()'
,
$this
->
type
->
getSqlDeclaration
([],
$this
->
platform
));
}
public
function
testReturnsDefaultLengthFromPlatformVarchar
()
{
self
::
assertEquals
(
255
,
$this
->
type
->
getDefaultLength
(
$this
->
platform
));
}
public
function
testConvertToPHPValue
()
{
self
::
assertInternalType
(
'string'
,
$this
->
type
->
convertToPHPValue
(
'foo'
,
$this
->
platform
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment