-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #2462 Prepare for php 7.2 (hboomsma)
This PR was merged into the 1.x branch. Discussion ---------- Prepare for php 7.2 * allow `|length` of `null` * allow `|length` of objects not implementing `\Countable` *To get no errors when running with PHP 7.2 You need to use phpunit ^6.1, otherwise the `each` function, used by phpunit, triggers errors. You can do so by running phpunit like: `SYMFONY_PHPUNIT_VERSION=6.1 phpnightly vendor/bin/simple-phpunit`* Commits ------- d2b7a01 Prepare for php 7.2
- Loading branch information
Showing
3 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
"length" filter | ||
--TEMPLATE-- | ||
{{ null|length }} | ||
{{ magic|length }} | ||
{{ non_countable|length }} | ||
--DATA-- | ||
return array( | ||
'null' => null, /* triggers deprecation error */ | ||
'magic' => new MagicCallStub(), /* used to assert we do *not* call __call, also triggers deprecation */ | ||
'non_countable' => new \StdClass(), /* triggers deprecation error */ | ||
); | ||
--EXPECT-- | ||
0 | ||
1 | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters