Commit Graph

3836 Commits

Author SHA1 Message Date
Fabien Potencier fa359529e2 Merge branch '1.x' into 2.x
* 1.x:
  Fixed counting children of SimpleXMLElement object
2018-03-14 08:29:46 -07:00
Fabien Potencier 4d9dc79516 bug #2659 [v1] Fixed counting children of SimpleXMLElement object (webimpress)
This PR was merged into the 1.x branch.

Discussion
----------

[v1] Fixed counting children of SimpleXMLElement object

It works correctly in v1.32 and since v1.33 it is not working correctly.
See: https://github.com/twigphp/Twig/compare/v1.32.0...v1.33.0#diff-d7378002f67a61c458c1de0468eef74fR1265

Test code:
```php
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><doc><elem/><elem/></doc>');

var_dump($xml instanceof \Countable);
echo 'Count: ' . count($xml), PHP_EOL;
echo 'Strlen: ' . strlen($xml), PHP_EOL;
echo 'MB Strlen: ' . mb_strlen($xml), PHP_EOL;
```

Results:
```
bool(false)
Count: 2
Strlen: 0
MB Strlen: 0
```

https://3v4l.org/VvUXG

Commits
-------

4a23bdc3 Fixed counting children of SimpleXMLElement object
2018-03-14 08:27:12 -07:00
webimpress 4a23bdc345 Fixed counting children of SimpleXMLElement object 2018-03-14 10:16:52 +00:00
Fabien Potencier 8630b6e19e Merge branch '1.x' into 2.x
* 1.x:
  added missing else clause to avoid infinite loops
  fixed .. (range operator) in sandbox policy
  fixed version
  bumped version to 1.35.3-DEV
  prepared the 1.35.2 release
2018-03-04 18:10:27 -08:00
Fabien Potencier 981c4d8ca0 bug #2652 Add missing else clause to avoid infinite loops (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Add missing else clause to avoid infinite loops

Commits
-------

de2be6a0 added missing else clause to avoid infinite loops
2018-03-04 18:08:10 -08:00
Fabien Potencier de2be6a0ee added missing else clause to avoid infinite loops 2018-03-04 18:07:35 -08:00
Fabien Potencier ab6c99e707 bug #2651 Fix .. (range operator) in sandbox policy (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Fix .. (range operator) in sandbox policy

Closes #2630

Commits
-------

6f45fcf5 fixed .. (range operator) in sandbox policy
2018-03-04 17:57:12 -08:00
Fabien Potencier 6f45fcf519 fixed .. (range operator) in sandbox policy 2018-03-04 10:12:13 -08:00
Fabien Potencier 5145bc55ff minor #2650 Optimize parser (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Optimize parser

Depending on the complexity of the template, I see up to 50% faster template compilation.

Commits
-------

510e5eba optimized the parser by inlining the constant values
2018-03-04 10:02:05 -08:00
Fabien Potencier 77725e2a47 minor #2649 Make a small performance improvement (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Make a small performance improvement

And it also fixes some potential subtle bugs.

Commits
-------

27f905ed made a small performance improvement
2018-03-04 10:01:43 -08:00
Fabien Potencier 510e5eba7d optimized the parser by inlining the constant values 2018-03-04 09:07:52 -08:00
Fabien Potencier 27f905edbe made a small performance improvement 2018-03-04 08:56:47 -08:00
Fabien Potencier e4172ebe21 fixed version 2018-03-03 08:24:54 -08:00
Fabien Potencier bf7bbf1e93 fixed version 2018-03-03 08:24:39 -08:00
Fabien Potencier f3023a87c4 bumped version to 2.4.7-DEV 2018-03-03 08:23:34 -08:00
Fabien Potencier d2117ec118 prepared the 2.4.6 release v2.4.6 2018-03-03 08:23:01 -08:00
Fabien Potencier fe4a5e846c bumped version to 1.35.3-DEV 2018-03-03 08:22:00 -08:00
Fabien Potencier 9c24f2cd39 prepared the 1.35.2 release v1.35.2 2018-03-03 08:21:29 -08:00
Fabien Potencier f5ec8ed470 updated CHANGELOG 2018-03-03 08:19:28 -08:00
Fabien Potencier da473b5ac9 Merge branch '1.x' into 2.x
* 1.x:
  fixed test
  fixed profiler unicity when several ones are registered
2018-03-03 08:19:03 -08:00
Fabien Potencier 1278ca96af bug #2647 Fix profiler unicity when several ones are registered (fabpot)
This PR was squashed before being merged into the 1.x branch (closes #2647).

Discussion
----------

Fix profiler unicity when several ones are registered

Closes #2627, closes #2643, alternative to #2645

What happens is that both Twig and Symfony register a Twig profiler. Unfortunately, the current code does assign the same variable for both profiler, which means that trying to close it twice does not work.

Commits
-------

0ee096f0 fixed test
7b2bdbe3 fixed profiler unicity when several ones are registered
2018-03-03 08:18:26 -08:00
Fabien Potencier 0ee096f092 fixed test 2018-03-03 07:53:48 -08:00
Fabien Potencier 7b2bdbe351 fixed profiler unicity when several ones are registered 2018-03-03 07:49:53 -08:00
Fabien Potencier 94dc7dfed7 bumped version to 2.4.6-DEV 2018-03-02 17:42:56 -08:00
Fabien Potencier 43b23931c6 prepared the 2.4.5 release v2.4.5 2018-03-02 17:41:58 -08:00
Fabien Potencier 9bac13daf0 fixed CS 2018-03-02 13:12:59 -08:00
Fabien Potencier e508c91b0b Merge branch '1.x' into 2.x
* 1.x:
  fixed CS
2018-03-02 13:11:50 -08:00
Fabien Potencier caf2caa8f4 fixed CS 2018-03-02 13:09:41 -08:00
Fabien Potencier f43aea9461 minor #2640 Remove obsolete code (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Remove obsolete code

Commits
-------

09dee2f7 removed obsolete code
2018-03-02 13:08:50 -08:00
Fabien Potencier a7fc5261a4 Merge branch '1.x' into 2.x
* 1.x:
  Switch the PHP ext jobs to a whitelist rather than a blacklist
2018-03-02 13:06:02 -08:00
Fabien Potencier b047676503 minor #2639 Switch the PHP ext jobs to a whitelist rather than a blacklist (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Switch the PHP ext jobs to a whitelist rather than a blacklist

Any new PHP version added in the future will be a PHP 7.x one, not a 5.x one, and so should not have a job for the extension.

the whitelist is already shorter than the blacklist today (3 whitelisted vs 4 blacklisted before, as PHP 5.3 is already handled separately due to precise anyway)

Commits
-------

738f17bb Switch the PHP ext jobs to a whitelist rather than a blacklist
2018-03-02 13:05:33 -08:00
Fabien Potencier 633a781b04 feature #2641 Optimize performance of calls to extensions at runtime (fabpot)
This PR was squashed before being merged into the 2.x branch (closes #2641).

Discussion
----------

Optimize performance of calls to extensions at runtime

Commits
-------

540c9006 updated CHANGELOG
f4c5152f optimized calls to custom extension runtimes
279993b2 optimized performance when accessing extensions in templates
2018-03-02 12:54:10 -08:00
Fabien Potencier 540c900649 updated CHANGELOG 2018-03-02 11:43:17 -08:00
Fabien Potencier f4c5152f45 optimized calls to custom extension runtimes 2018-03-02 11:10:19 -08:00
Fabien Potencier 279993b24d optimized performance when accessing extensions in templates 2018-03-02 11:10:19 -08:00
Fabien Potencier 09dee2f71e removed obsolete code 2018-03-02 10:19:02 -08:00
Fabien Potencier 14b4e5e1d5 Merge branch '1.x' into 2.x
* 1.x:
  bumped version to 1.35.2-DEV
  prepared the 1.35.1 release
2018-03-02 10:08:35 -08:00
Christophe Coevoet 738f17bb45 Switch the PHP ext jobs to a whitelist rather than a blacklist
Any new PHP version added in the future will be a PHP 7.x one, not a 5.x one, and so should not have a job for the extension.
2018-03-02 19:08:25 +01:00
Fabien Potencier 067ade15e6 bumped version to 1.35.2-DEV 2018-03-02 10:07:31 -08:00
Fabien Potencier ffda54d85c prepared the 1.35.1 release v1.35.1 2018-03-02 10:06:27 -08:00
Fabien Potencier be23d8d49d Merge branch '1.x' into 2.x
* 1.x:
  simplified code
  fixed C ext
  fixed Travis config
2018-03-02 10:05:25 -08:00
Fabien Potencier 277b400158 bug #2637 Fix C ext (fabpot)
This PR was squashed before being merged into the 1.x branch (closes #2637).

Discussion
----------

Fix C ext

Commits
-------

bffc117f simplified code
a0c24242 fixed C ext
64e85689 fixed Travis config
2018-03-02 10:04:32 -08:00
Fabien Potencier bffc117f53 simplified code 2018-03-02 09:54:18 -08:00
Fabien Potencier a0c24242de fixed C ext 2018-03-02 09:53:02 -08:00
Fabien Potencier 64e856892b fixed Travis config 2018-03-02 09:53:02 -08:00
Fabien Potencier 89fbce2e13 updated CHANGELOG 2018-03-02 09:08:47 -08:00
Fabien Potencier 7e80b77d61 Merge branch '1.x' into 2.x
* 1.x:
  updated CHANGELOG
  added missing test
  Exception for use of "===" instead of "same as"
2018-03-02 09:06:37 -08:00
Fabien Potencier bf34cadf0f updated CHANGELOG 2018-03-02 08:56:04 -08:00
Fabien Potencier 445b706259 feature #2636 Improve performance by inlining constants (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Improve performance by inlining constants

This one was suggested by @nicolas-grekas and it is similar to what we've done for the Symfony container. That improves performance **a lot**. Combined with my previous pull request, method calls are now twice as fast as the current stable 2.x release.

Commits
-------

6a946960 improved performance by inlining constants
2018-03-02 08:22:33 -08:00
Fabien Potencier 6a946960fd improved performance by inlining constants 2018-03-02 08:19:08 -08:00