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

Enable strict mode #8841

Merged
merged 7 commits into from
Jul 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Pass strings to SimpleXMLELement::addAttribute()
  • Loading branch information
greg0ire committed Jul 20, 2021
commit 270e7a4234bf2aec1c374b5a65f01bb12130ace9
6 changes: 3 additions & 3 deletions lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
}

if (isset($field['length'])) {
$idXml->addAttribute('length', $field['length']);
$idXml->addAttribute('length', (string) $field['length']);
}

if (isset($field['associationKey']) && $field['associationKey']) {
@@ -186,11 +186,11 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
}

if (isset($field['precision'])) {
$fieldXml->addAttribute('precision', $field['precision']);
$fieldXml->addAttribute('precision', (string) $field['precision']);
}

if (isset($field['scale'])) {
$fieldXml->addAttribute('scale', $field['scale']);
$fieldXml->addAttribute('scale', (string) $field['scale']);
}

if (isset($field['unique']) && $field['unique']) {
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -2141,11 +2141,6 @@ parameters:
count: 2
path: lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php

-
message: "#^Parameter \\#2 \\$value of method SimpleXMLElement\\:\\:addAttribute\\(\\) expects string, int given\\.$#"
count: 3
path: lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php

-
message: "#^Right side of && is always true\\.$#"
count: 2
5 changes: 0 additions & 5 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -3663,11 +3663,6 @@
<DeprecatedClass occurrences="1">
<code>AbstractExporter</code>
</DeprecatedClass>
<InvalidScalarArgument occurrences="3">
<code>$field['length']</code>
<code>$field['precision']</code>
<code>$field['scale']</code>
</InvalidScalarArgument>
<MissingClosureParamType occurrences="2">
<code>$m1</code>
<code>$m2</code>