Skip to content

Instantly share code, notes, and snippets.

@Dattaya
Created February 16, 2012 12:15
Show Gist options
  • Select an option

  • Save Dattaya/1844433 to your computer and use it in GitHub Desktop.

Select an option

Save Dattaya/1844433 to your computer and use it in GitHub Desktop.

Revisions

  1. Dattaya revised this gist Feb 16, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -14,8 +14,8 @@ List of available versions: https://github.com/leafo/lessphp/tags
    * Run `bin/vendors install`;

    * ~~Then~~
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```
    * ~~Create a new file `autoload_non_standart.php` in `app` folder.~~
    * ~~Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```~~

    * ~~Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties~~
    * The best approach is to add `file: %kernel.root_dir%/../vendor/lessphp/lessc.inc.php` to config.yml file:
  2. Dattaya revised this gist Feb 16, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1. README.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ List of available versions: https://github.com/leafo/lessphp/tags
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * ~~Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties~~
    * The best approach is adding `file: %kernel.root_dir%/../vendor/lessphp/lessc.inc.php` to config.yml file:
    * The best approach is to add `file: %kernel.root_dir%/../vendor/lessphp/lessc.inc.php` to config.yml file:

    ```yaml
    #...
  3. Dattaya revised this gist Feb 16, 2012. 1 changed file with 13 additions and 2 deletions.
    15 changes: 13 additions & 2 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,19 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;

    * ~~Then~~
    * ~~Then~~
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * ~~Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties~~
    * ~~Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties~~
    * The best approach is adding `file: %kernel.root_dir%/../vendor/lessphp/lessc.inc.php` to config.yml file:

    ```yaml
    #...
    assetic:
    #...
    filters:
    lessphp:
    file: %kernel.root_dir%/../vendor/lessphp/lessc.inc.php
    apply_to: "\.less$"
    ```
  4. Dattaya revised this gist Feb 16, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1. README.md
    Original file line number Diff line number Diff line change
    @@ -17,4 +17,4 @@ List of available versions: https://github.com/leafo/lessphp/tags
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * ~~Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties ~~
    * ~~Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties~~
  5. Dattaya revised this gist Feb 16, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,8 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;

    * - Then -
    * ~~Then~~
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * - Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties -
    * ~~Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties ~~
  6. Dattaya revised this gist Feb 16, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,8 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;

    * - Then -
    * - Then -
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * - Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties -
    * - Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties -
  7. Dattaya revised this gist Feb 16, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,8 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;

    * -Then-
    * - Then -
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * -Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties -
    * - Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties -
  8. Dattaya revised this gist Feb 16, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,8 +13,8 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;

    * Then
    * -Then-
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties
    * -Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties -
  9. Dattaya revised this gist Feb 16, 2012. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -12,5 +12,9 @@ Symfony2.0.10. How to integrate assetic lessphp filter.
    List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * Then
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```

    * Or another way - http://stackoverflow.com/questions/8958118/symfony-autoload-namespace-difficulties
  10. Dattaya revised this gist Feb 16, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php` file: ```php require 'autoload_non_standart.php'; ```
    * Add this to the end of `app/autoload.php` file: ```require 'autoload_non_standart.php'; ```
  11. Dattaya revised this gist Feb 16, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php'` file: ```php require 'autoload_non_standart.php'; ```
    * Add this to the end of `app/autoload.php` file: ```php require 'autoload_non_standart.php'; ```
  12. Dattaya revised this gist Feb 16, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1. README.md
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php' file: ```php require 'autoload_non_standart.php'; ```
    * Add this to the end of `app/autoload.php'` file: ```php require 'autoload_non_standart.php'; ```
  13. Dattaya revised this gist Feb 16, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 1. README.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ Symfony2.0.10. How to integrate assetic lessphp filter.
    target=/lessphp
    version=v0.3.2
    ```
    List of allowed versions: https://github.com/leafo/lessphp/tags
    List of available versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;
    * Create a new file `autoload_non_standart.php` in `app` folder.
  14. Dattaya created this gist Feb 16, 2012.
    16 changes: 16 additions & 0 deletions 1. README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    Symfony2.0.10. How to integrate assetic lessphp filter.
    =============

    * Add the following lines of code to the end of the `deps` file:

    ```
    [lessphp]
    git=https://github.com/leafo/lessphp.git
    target=/lessphp
    version=v0.3.2
    ```
    List of allowed versions: https://github.com/leafo/lessphp/tags

    * Run `bin/vendors install`;
    * Create a new file `autoload_non_standart.php` in `app` folder.
    * Add this to the end of `app/autoload.php' file: ```php require 'autoload_non_standart.php'; ```
    13 changes: 13 additions & 0 deletions 20. autoload_non_standart.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <?php
    spl_autoload_register(function($className)
    {
    $ds = DIRECTORY_SEPARATOR;

    $vendor = __DIR__."{$ds}..{$ds}vendor{$ds}";
    $loadable = array(
    'lessc' => "lessphp{$ds}lessc.inc.php",
    );

    isset($loadable[$className]) ? require $vendor.$loadable[$className] : '';

    }, false);