-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86e2777
commit 803a622
Showing
24 changed files
with
166 additions
and
17 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
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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,19 @@ | ||
Copyright (c) 2018 Fabien Potencier | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,14 @@ | ||
Symfony Polyfill / Php73 | ||
======================== | ||
|
||
This component provides functions added to PHP 7.3 core: | ||
|
||
- [`is_countable`](https://php.net/is_countable) | ||
|
||
More information can be found in the | ||
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). | ||
|
||
License | ||
======= | ||
|
||
This library is released under the [MIT license](LICENSE). |
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,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
if (PHP_VERSION_ID < 70300) { | ||
if (!function_exists('is_countable')) { | ||
function is_countable($var) { | ||
return is_array($var) || $var instanceof Countable; | ||
} | ||
} | ||
} |
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,31 @@ | ||
{ | ||
"name": "symfony/polyfill-php73", | ||
"type": "library", | ||
"description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", | ||
"keywords": ["polyfill", "shim", "compatibility", "portable"], | ||
"homepage": "https://symfony.com", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Nicolas Grekas", | ||
"email": "p@tchwork.com" | ||
}, | ||
{ | ||
"name": "Symfony Community", | ||
"homepage": "https://symfony.com/contributors" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.3.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { "Symfony\\Polyfill\\Php73\\": "" }, | ||
"files": [ "bootstrap.php" ] | ||
}, | ||
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
"minimum-stability": "dev", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.7-dev" | ||
"dev-master": "1.8-dev" | ||
} | ||
} | ||
} |
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,42 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Polyfill\Tests\Php73; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @author Gabriel Caruso <carusogabriel34@gmail.com> | ||
*/ | ||
class Php73Test extends TestCase | ||
{ | ||
/** | ||
* @covers Symfony\Polyfill\Php73\Php73::is_countable | ||
*/ | ||
public function testIsCountable() | ||
{ | ||
$this->assertTrue(is_countable(array(1, 2, '3'))); | ||
$this->assertTrue(is_countable(new \ArrayIterator(array('foo', 'bar', 'baz')))); | ||
$this->assertTrue(is_countable(new \ArrayIterator())); | ||
$this->assertFalse(is_countable(new \stdClass())); | ||
} | ||
|
||
/** | ||
* @covers Symfony\Polyfill\Php73\Php73::is_countable | ||
* @requires PHP 5.5 | ||
*/ | ||
public function testIsCountableForGenerator() | ||
{ | ||
require 'generator.php'; | ||
|
||
$this->assertFalse(is_countable(genOneToTen())); | ||
} | ||
} |
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,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Polyfill\Tests\Php73; | ||
|
||
function genOneToTen() | ||
{ | ||
for ($i = 1; $i <= 10; ++$i) { | ||
yield $i; | ||
} | ||
} |