Fabien Potencier 84631789a2 bug #2502 Use class_exists instead of require (ogizanagi)
This PR was merged into the 1.x branch.

Discussion
----------

Use class_exists instead of require

I think this is required for https://github.com/symfony/symfony/pull/23073 to pass. It's probably very similar to https://github.com/symfony/symfony/pull/22657.

A simple reproducer:

```php
<?php

use Twig\Node\Node;

require_once __DIR__ . '/vendor/autoload.php';

new Node();
new \Twig_Node();
```

[Without this patch](https://travis-ci.org/symfony/symfony/jobs/239712676#L2100):

```php
PHP Fatal error:  Cannot declare class Twig_Node, because the name is already in use in vendor/twig/twig/lib/Twig/Node.php on line 20
```

With, everything works fine, whatever the two calls order.

Commits
-------

2c174e40 Use class_exists instead of require
2017-06-05 16:59:01 -07:00
2017-06-05 11:26:06 -07:00
2017-06-05 11:26:06 -07:00
2017-06-05 23:42:50 +02:00
2015-01-20 03:31:04 +01:00
2017-01-04 14:05:59 -08:00
2017-05-22 07:43:40 +02:00
2017-06-05 11:26:06 -07:00
2017-05-24 10:12:32 +02:00
2017-01-02 12:22:20 -08:00
2017-03-11 20:03:13 +01:00

Twig, the flexible, fast, and secure template language for PHP
==============================================================

Twig is a template language for PHP, released under the new BSD license (code
and documentation).

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

More Information
----------------

Read the `documentation`_ for more information.

.. _documentation: http://twig.sensiolabs.org/documentation
Languages
PHP 99.9%