mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-18 21:37:29 +00:00
removed remaining mentions of the C extension
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
/build
|
|
||||||
/composer.lock
|
/composer.lock
|
||||||
/ext/twig/autom4te.cache/
|
|
||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
/vendor
|
/vendor
|
||||||
|
|||||||
@@ -12,11 +12,8 @@ matrix:
|
|||||||
- php: hhvm-stable
|
- php: hhvm-stable
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: TWIG_EXT=no
|
|
||||||
- php: 7.0
|
- php: 7.0
|
||||||
env: TWIG_EXT=no
|
|
||||||
- php: 7.1
|
- php: 7.1
|
||||||
env: TWIG_EXT=no
|
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: hhvm-stable
|
- php: hhvm-stable
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
@@ -27,7 +24,3 @@ before_install:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- travis_retry composer install
|
- travis_retry composer install
|
||||||
|
|
||||||
before_script:
|
|
||||||
- if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && make install"; fi
|
|
||||||
- if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
* 2.0.0 (2016-XX-XX)
|
* 2.0.0 (2016-XX-XX)
|
||||||
|
|
||||||
|
* removed the C extension
|
||||||
* moved Twig_Environment::getAttribute() to twig_get_attribute()
|
* moved Twig_Environment::getAttribute() to twig_get_attribute()
|
||||||
* removed Twig_Environment::getLexer(), Twig_Environment::getParser(), Twig_Environment::getCompiler()
|
* removed Twig_Environment::getLexer(), Twig_Environment::getParser(), Twig_Environment::getCompiler()
|
||||||
* removed Twig_Compiler::getFilename()
|
* removed Twig_Compiler::getFilename()
|
||||||
|
|||||||
+2
-57
@@ -30,60 +30,5 @@ Installing the development version
|
|||||||
|
|
||||||
git clone git://github.com/twigphp/Twig.git
|
git clone git://github.com/twigphp/Twig.git
|
||||||
|
|
||||||
Installing the C extension
|
.. _`download page`: https://github.com/twigphp/Twig/tags
|
||||||
--------------------------
|
.. _`Composer`: https://getcomposer.org/download/
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The C extension is **optional** but it brings some nice performance
|
|
||||||
improvements. Note that the extension is not a replacement for the PHP
|
|
||||||
code; it only implements a small part of the PHP code to improve the
|
|
||||||
performance at runtime; you must still install the regular PHP code.
|
|
||||||
|
|
||||||
Twig comes with a C extension that enhances the performance of the Twig
|
|
||||||
runtime engine; install it like any other PHP extensions:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
cd ext/twig
|
|
||||||
phpize
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
|
|
||||||
For Windows:
|
|
||||||
|
|
||||||
1. Setup the build environment following the `PHP documentation`_
|
|
||||||
2. Put Twig's C extension source code into ``C:\php-sdk\phpdev\vcXX\x86\php-source-directory\ext\twig``
|
|
||||||
3. Use the ``configure --disable-all --enable-cli --enable-twig=shared`` command instead of step 14
|
|
||||||
4. ``nmake``
|
|
||||||
5. Copy the ``C:\php-sdk\phpdev\vcXX\x86\php-source-directory\Release_TS\php_twig.dll`` file to your PHP setup.
|
|
||||||
|
|
||||||
.. tip::
|
|
||||||
|
|
||||||
For Windows ZendServer, ZTS is not enabled as mentioned in `Zend Server
|
|
||||||
FAQ`_.
|
|
||||||
|
|
||||||
You have to use ``configure --disable-all --disable-zts --enable-cli
|
|
||||||
--enable-twig=shared`` to be able to build the twig C extension for
|
|
||||||
ZendServer.
|
|
||||||
|
|
||||||
The built DLL will be available in
|
|
||||||
``C:\\php-sdk\\phpdev\\vcXX\\x86\\php-source-directory\\Release``
|
|
||||||
|
|
||||||
Finally, enable the extension in your ``php.ini`` configuration file:
|
|
||||||
|
|
||||||
.. code-block:: ini
|
|
||||||
|
|
||||||
extension=twig.so #For Unix systems
|
|
||||||
extension=php_twig.dll #For Windows systems
|
|
||||||
|
|
||||||
And from now on, Twig will automatically compile your templates to take
|
|
||||||
advantage of the C extension. Note that this extension does not replace the
|
|
||||||
PHP code but only provides an optimized version of the
|
|
||||||
``Twig_Template::getAttribute()`` method.
|
|
||||||
|
|
||||||
.. _`download page`: https://github.com/twigphp/Twig/tags
|
|
||||||
.. _`Composer`: https://getcomposer.org/download/
|
|
||||||
.. _`PHP documentation`: https://wiki.php.net/internals/windows/stepbystepbuild
|
|
||||||
.. _`Zend Server FAQ`: http://www.zend.com/en/products/server/faq#faqD6
|
|
||||||
|
|||||||
Reference in New Issue
Block a user