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
83acc2ac
Unverified
Commit
83acc2ac
authored
Aug 17, 2018
by
Michael Moravec
Committed by
Sergei Morozov
Nov 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Doctrine\DBAL\Types\Type::getDefaultLength()
parent
746e8e30
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
29 deletions
+4
-29
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
-9
No files found.
UPGRADE.md
View file @
83acc2ac
# 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 @
83acc2ac
...
...
@@ -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 @
83acc2ac
...
...
@@ -159,18 +159,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 @
83acc2ac
...
...
@@ -31,15 +31,6 @@ class StringTest extends DbalTestCase
self
::
assertEquals
(
'TEST_VARCHAR'
,
$this
->
type
->
getSqlDeclaration
([],
$this
->
platform
));
}
public
function
testReturnsDefaultLengthFromPlatformVarchar
()
:
void
{
$this
->
platform
->
expects
(
$this
->
once
())
->
method
(
'getVarcharDefaultLength'
)
->
willReturn
(
255
);
self
::
assertEquals
(
255
,
$this
->
type
->
getDefaultLength
(
$this
->
platform
));
}
public
function
testConvertToPHPValue
()
:
void
{
self
::
assertIsString
(
$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