26 Jun 2019

feedSymfony Blog

Symfony 4.3.2 released

Symfony 4.3.2 has just been released. Here is a list of the most important changes:

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy. Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

26 Jun 2019 2:31pm GMT

Symfony 4.2.10 released

Symfony 4.2.10 has just been released. Here is a list of the most important changes:

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy. Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

26 Jun 2019 2:24pm GMT

Symfony 3.4.29 released

Symfony 3.4.29 has just been released. Here is a list of the most important changes:

Want to upgrade to this new release? Fortunately, because Symfony protects backwards-compatibility very closely, this should be quite easy. Read our upgrade documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a version is not maintained anymore? Or only when a security issue is fixed? Consider subscribing to the Symfony Roadmap Notifications.


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

26 Jun 2019 2:18pm GMT

25 Jun 2019

feedSymfony Blog

Save the date for SymfonyLive Tunis 2020!

SymfonyLive Tunis 2020 Conference Logo

The first edition of the SymfonyLive Tunis 2019 took place on April 27th 2019! Save the date for next year's edition, the conference will return on April 27th 2020. SymfonyLive Tunis is a one-day French speaking conference to meet the local Symfony community!


La première édition du SymfonyLive Tunis a eu lieu le samedi 27 avril 2019 au Mövenpick Hotel du Lac à Tunis et a réuni 300 participants, 9 fantastiques speakers et des super sponsors autour d'une journée complète de conférences sur Symfony. Nous avons été ravis de vous accueillir pour cette première édition de la conférence !

Nous sommes heureux de vous annoncer que le SymfonyLive Tunis sera de retour en 2020 pour sa seconde édition ! Save the Date : rendez-vous le samedi 18 avril 2020 au Mövenpick Hotel du Lac à Tunis !

Nous avons hâte de retrouver la communauté locale de Symfony pour une nouvelle journée de partage de connaissances sur Symfony, PHP et de rencontres avec l'écosystème local de Symfony réunis autour d'un track ! Deux journées de formation seront organisées les jeudi 16 et vendredi 17 avril 2020.

Le SymfonyLive Tunis est une conférence locale en français pour les passionnés de Symfony et PHP. Plus d'informations à venir prochainement, en attendant restez à l'écoute et notez la date du SymfonyLive Tunis 2020 dans votre agenda !

Rendez-vous l'année prochains sous le soleil tunisien !


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

25 Jun 2019 2:25pm GMT

Preparing your Applications for Twig 3

Twig, the template language used in Symfony and thousands of other projects, has three active development branches: 1.x is for legacy applications, 2.x is for current applications and 3.x will be the next stable version.

Unlike Symfony, older Twig branches still receive some new features. For example, 1.x received the new filter, map and reduce features and the new white space trimming options. However, sometimes new features need to deprecate some current behaviors. This cannot be done in 1.x and that's why features like the auto import of Twig macros are not available in 1.x.

Although Twig 1.x will be maintained for the foreseeable future, it will receive less and less new features, especially when Twig 3.x is released. The tentative release date of Twig 3 is before the end of 2019, so you should start upgrading your Twig 1.x usage now.

The main change needed to prepare for 3.x is to use the namespaced Twig classes (the non-namespaced classes are still available in 1.x and 2.x but deprecated, and they will be removed in 3.x):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
namespace App\Twig;

+use Twig\Extension\AbstractExtension;
+use Twig\TwigFilter;

-class AppExtension extends \Twig_Extension
+class AppExtension extends AbstractExtension
{
    public function getFilters()
    {
        return [
-            new \Twig_SimpleFilter('...', [$this, '...']),
+            new TwigFilter('...', [$this, '...']),
        ];
    }

    // ...
}

For most applications, these namespace updates are the only change you'll need to make to upgrade to Twig 3.x. However, if you make an advanced usage of Twig internals, you'll see other deprecated warnings. Check out the list of deprecated features in Twig 1.x and the list of deprecations in Twig 2.x.

Twig 3.x will be the most polished Twig release ever. It includes a ton of small tweaks, better error messages, better performance, better consistency and cleaner code. Get your applications ready for Twig 3 by upgrading them to 2.x as soon as possible.


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

25 Jun 2019 10:58am GMT

24 Jun 2019

feedSymfony Blog

Better White Space Control in Twig Templates

Whitespace control in Twig templates allows you to control the indentation and spacing of the generated contents (usually HTML code). Controlling white spaces is very important when using Twig to generate contents like YAML, text emails or any other format where the white spaces are significant.

In contrast, when generating HTML contents, most of the times you should ignore this feature, because the HTML contents are minified and compressed before sending them to the users, so trying to generate perfectly aligned HTML code is just a waste of time.

However, there are some specific cases where whitespace can change how things are displayed. For example, when an <a> element contains white spaces after the link text and the link displays an underline, the whitespace is visible. That's why Twig provides multiple ways of controlling white spaces. In recent Twig versions, we've improved those features.

New whitespace trimming options

Fabien Potencier

Contributed by
Fabien Potencier
in #2925.

Consider the following Twig snippet:

1
2
3
4
5
6
7
<ul>
    <li>
        {% if some_expression %}
            {{ some_variable }}
        {% endif %}
    </li>
</ul>

If the value of some_variable is 'Lorem Ipsum', the HTML generated when the if expression matches, would be the following:

1
2
3
4
5
<ul>
    <li>
            Lorem Ipsum
        </li>
</ul>

Twig only removes by default the first \n character after each Twig tag (the \n after the if and endif tags in the previous example). If you want to generate HTML code with better indention, you can use the - character, which removes all white spaces (including newlines) from the left or right of the tag:

1
2
3
4
5
6
7
<ul>
    <li>
        {%- if some_expression %}
            {{- some_variable -}}
        {% endif -%}
    </li>
</ul>

The output is now:

1
2
3
<ul>
    <li>Lorem Ipsum</li>
</ul>

Starting from Twig 1.39 and 2.8.0, you have another option to control whitespace: the ~ character (which can be applied to {{, {% and {#). It's similar to -, with the only difference that ~ doesn't remove newlines:

1
2
3
4
5
6
7
<ul>
    <li>
        {%~ if some_expression %}
            {{ some_variable -}}
        {% endif ~%}
    </li>
</ul>

The output now contains the newlines after/before the <li> tags, so the generated HTML is more similar to the original Twig code you wrote:

1
2
3
4
5
<ul>
    <li>
        Lorem Ipsum
    </li>
</ul>

Added a spaceless filter

Fabien Potencier

Contributed by
Fabien Potencier
in #2872.

In previous Twig versions, there was a tag called {% spaceless %} which transformed the given string content to remove the white spaces between HTML tags. However, in Twig, transforming some contents before displaying them is something done by filters.

That's why, starting from Twig 1.38 and 2.7.3, the spaceless tag has been deprecated in favor of the spaceless filter, which works exactly the same:

1
{{ some_variable_with_HTML_content|spaceless }}

However, this is commonly used with the alternative way of applying some filter to some HTML contents:

1
2
3
4
5
-{% spaceless %}
+{% apply spaceless %}
    {# some HTML content here #}
-{% endspaceless %}
+{% endapply %}

In case you missed it, the apply tag was recently added to replace the previous filter tag.

In any case, even after these changes, it's still recommend to not use the spaceless filter too much. The removal of white spaces with this filter happens at runtime, so calling it repeatedly can hurt performance.

Fine-grained escaping on ternary expressions

Fabien Potencier

Contributed by
Fabien Potencier
in #2934.

This new feature introduced in Twig 1.39 and 2.8 is not related to whitespace control, but it's an important new feature to consider in your templates. Consider the following example and the results rendered in Twig versions before 1.39 and 2.8:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{% set foo = '<strong>foo</strong>' %}
{% set bar = '<strong>bar</strong>' %}

{{ false ? '<strong>bar</strong>' : foo|raw }}
{# renders as '<strong>foo</strong>' #}

{{ false ? bar : foo|raw }}
{# renders as '&lt;strong&gt;foo&lt;/strong&gt;' #}

{{ (false ? bar : foo)|raw }}
{# renders as '<strong>foo</strong>' #}

The reason why this example worked in that way in previous Twig versions is that in the first ternary statement, foo is marked as being safe and Twig does not escape static values. In the second ternary statement, even if foo is marked as safe, bar remains unsafe and so is the whole expression. The third ternary statement is marked as safe and the result is not escaped.

This behavior was confusing to lots of designers and developers. That's why, starting from Twig 1.39 and 2.8, the result of this example has changed as follows:

1
2
3
4
5
6
7
{% set foo = '<strong>foo</strong>' %}
{% set bar = '<strong>bar</strong>' %}

{{ false ? '<strong>bar</strong>' : foo|raw }}
{{ false ? bar : foo|raw }}
{{ (false ? bar : foo)|raw }}
{# renders as '<strong>foo</strong>' in all cases #}

Before, the escaping strategy was the same for both sides of the ternary operator. Now, in Twig 1.39 and 2.8, Twig applies a special code path for ternary operator that is able to have different escaping strategies for the two sides.


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

24 Jun 2019 7:43am GMT

23 Jun 2019

feedSymfony Blog

A Week of Symfony #651 (17-23 June 2019)

This week, development activity focused mostly on fixing bugs instead of adding new features. Meanwhile, a new proposal was made to improve all the commands related to Symfony Flex. Lastly, the full schedule and workshops were announced for the SymfonyLive London conference (September 13).

Symfony development highlights

This week, 54 pull requests were merged (34 in code and 20 in docs) and 40 issues were closed (33 in code and 7 in docs). Excluding merges, 25 authors made 1,169 additions and 563 deletions. See details for code and docs.

3.4 changelog:

4.2 changelog:

4.3 changelog:

4.4 changelog:

Newest issues and pull requests

They talked about us

Upcoming Symfony Events

Call to Action


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

23 Jun 2019 8:22am GMT

21 Jun 2019

feedSymfony Blog

Simpler Macros in Twig Templates

Macros are one of the most important features of the Twig template language to avoid repetitive contents. In Twig 2.11, usage of macros was simplified and other features were added to help you work with macros.

Automatic macro import

Fabien Potencier

Contributed by
Fabien Potencier
in #3012.

Macros are similar to PHP functions because you can pass arguments to them and the contents generated inside the macro are returned to include them in the place where the macro is called.

On symfony.com we use macros for example to display the "contributor box" in several places to highlight our amazing Symfony code and docs contributors:

1
2
3
4
5
6
{% macro contributor_details(contributor, vertical_layout = false) %}
    <div class="d-flex">
        <img class="avatar {{ vertical_layout ? 'm-b-15' }}" src="...">
        Thanks {{ contributor.name }} for being a Symfony contributor.
    </div>
{% endmacro %}

Before calling to a macro in a template you must import it, even if the macro is defined in the same template. This behavior always felt confusing to some people and made using macros a bit annoying. Starting from Twig 2.11, we've fixed that and macros defined in the same template are imported automatically under the special variable _self:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{# templates/some-template.html.twig #}
{% macro contributor_details(contributor, vertical_layout = false) %}
    <div class="d-flex">
        <img class="avatar {{ vertical_layout ? 'm-b-15' }}" src="...">
        Thanks {{ contributor.name }} for being a Symfony contributor.
    </div>
{% endmacro %}

{# ... #}

{% for contributor in contributors %}
    {# you don't have to import the macro before using it #}
    {{ _self.contributor_details(contributor) }}
{% endfor %}

This automatic import also works for macros themselves, so you can call to a macro inside another macro of the same template without importing it explicitly (this also works for any macro imported globally in the template):

1
2
3
4
5
6
7
8
9
{% macro contributor_details(contributor, vertical_layout = false) %}
    {# ... #}
{% endmacro %}

{% macro contributor_list(contributors) %}
    {% for contributor in contributors %}
        {{ _self.contributor_details(contributor) }}
    {% endfor %}
{% endmacro %}

Checking for macro existence

Fabien Potencier

Contributed by
Fabien Potencier
in #3014.

Another new feature introduced in Twig 2.11 is the support for checking the existence of macros before calling to them thanks to the is defined test. It works both for macros imported explicitly and for auto-imported macros:

1
2
3
4
5
{% import 'templates/_macros.html.twig' as macros %}

{% if macros.contributor_details is defined %}
    {# ... #}
{% endif %}

Macros Scoping

Fabien Potencier

Contributed by
Fabien Potencier
in #3009.

The scoping rules that define which macros are available inside each element of each template have been clearly defined as of Twig 2.11 as follows:

  • Imported macros are available in all blocks and other macros defined in the current template, but they are not available in included templates or child templates (you need to explicitly re-import macros in each template).
  • Macros imported inside a {% block %} tag are only defined inside that block and override other macros with the same name imported in the template. Same for macros imported explicitly inside a {% macro %} tag.

Better macro errors

Recent Twig versions have fixed some edge-cases related to macros (e.g. calling a macro imported in a block from a nested block, etc.) and improved other error messages to make them crystal clear and help you debug issues more easily.


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

21 Jun 2019 7:29am GMT

20 Jun 2019

feedSymfony Blog

Twig Adds Filter, Map and Reduce Features

Twig is the template language used in Symfony and thousands of other projects. In the last six months alone, Twig has released 30 versions for its 1.x and 2.x branches, adding lots of interesting new features. This article focuses on some of the new filters and tags added recently.

Filter, map and reduce

Fabien Potencier

Contributed by
Fabien Potencier
in #2996.

The "filter, map and reduce" pattern is getting more and more popular in other programming languages and paradigms (e.g. functional programming) to transform collections and sequences of elements. You can now use them in Twig thanks to the new filter, map and reduce filters in combination with the new arrow function.

The filter filter removes from a sequence all the elements that don't match the given expression. For example, to ignore products without enough stock:

1
2
3
{% for product in related_products|filter(product => product.stock > 10) %}
    {# ... #}
{% endfor %}

The arrow function receives the value of the sequence or mapping as its argument. The name of this argument can be freely chosen and it doesn't have to be the same as the variable used to iterate the collection:

1
2
3
{% for product in related_products|filter(p => p.id not in user.recentPurchases) %}
    {# ... #}
{% endfor %}

If you also need the key of the sequence element, define two arguments for the arrow function (and wrap them in parenthesis):

1
2
3
{% set components = all_components|filter(
    (v, k) => v.published is true and not (k starts with 'Deprecated')
) %}

Thanks to the new filter option, the if condition is no longer needed for the for loops, so we've deprecated it in favor of always using filter:

1
2
3
4
-{% for product in related_products if product.stock > 10 %}
+{% for product in related_products|filter(p => p.stock > 10) %}
    {# ... #}
{% endfor %}

If you prefer to keep using the for ... if pattern, include the if in the for loop:

1
2
3
4
5
{% for product in related_products %}
    {% if product.stock > 10 %}
        {# ... #}
    {% endif %}
{% endfor %}

The map filter applies an arrow function to the elements of a sequence or a mapping (it's similar to PHP's array_map()):

1
2
3
4
5
6
7
{% set people = [
    {first: "Alice", last: "Dupond"},
    {first: "Bob", last: "Smith"},
] %}

{{ people|map(p => p.first ~ ' ' ~ p.last)|join(', ') }}
{# outputs Alice Dupond, Bob Smith #}

The reduce filter iteratively reduces a sequence or a mapping to a single value using an arrow function. Because of this behavior, the arrow function always receives two arguments: the current value and the result of reducing the previous elements (usually called "carry"):

1
2
{% set num_products = cart.rows|reduce((previousTotal, row) => previousTotal + row.totalUnits) %}
{{ num_products }} products in total.

In addition to filter, map and reduce, recent Twig versions have added other useful filters and tags.

The "column" filter

Pablo Schläpfer

Contributed by
Pablo Schläpfer
in #2992.

This new column filter returns the values from a single column in the given array (internally it uses the PHP array_column() function):

1
Your oldest friend is {{ max(user.friends|column('age')) }} years old.

The "apply" tag

Fabien Potencier

Contributed by
Fabien Potencier
in #2977.

The filter tag has been deprecated (to not confuse it with the new filter filter explained above) and it has been replaced by the new apply tag which works exactly the same as the previous tag:

1
2
3
4
-{% filter upper %}
+{% apply upper %}
    This text becomes uppercase.
{% endapply %}

Allowed using Traversable objects

Ondřej Exner

Contributed by
Ondřej Exner
in #3016.

Another important change related to filters and tags is that you can now use objects that implement the Traversable PHP interface everywhere you can use iterators or arrays: the with tag, the with argument of the include and embed tags, the filter filter, etc.


Be trained by Symfony experts - 2019-06-26 Berlin - 2019-06-26 Lille - 2019-06-26 Clichy

20 Jun 2019 7:24am GMT

29 Jun 2017

feedZend Developer Zone

PHP 7.2: Add Extension By Name

I don't know if you've been keeping up, but there's not a lot of new coming down the pipe in PHP 7.2. Yeah, there is a good list of things that are being deprecated, and a change to allow for type widening, but compared to PHP 7.0 and PHP 7.2, PHP 7.2 is positively a yawner. This makes writing articles about the new hotness coming down the pipe a bit difficult.

The post PHP 7.2: Add Extension By Name appeared first on Zend Developer Zone.

29 Jun 2017 6:36pm GMT

27 Jun 2017

feedZend Developer Zone

Deprecations in PHP 7.2

The only constant is change.
- Heraclitus of Ephesus

PHP is a living language and as such, as some things are added, others are removed. Click on inside to find out what is being flagged to go away in PHP 7.2

The post Deprecations in PHP 7.2 appeared first on Zend Developer Zone.

27 Jun 2017 3:41pm GMT

16 Jun 2017

feedZend Developer Zone

June 2017 PHP Community (coffee) Cup of Service winner

It is time for the June 2017 PHP Community (coffee) Cup of Service award. This month it goes to someone who has been giving to PHP for more than 15 years, Ms. Sara Golemon. Sara: Is a regular speaker at PHP conferences worldwide An active core contributor One of the release managers of PHP 7.2 Please join us here at... Read more »

The post June 2017 PHP Community (coffee) Cup of Service winner appeared first on Zend Developer Zone.

16 Jun 2017 12:00pm GMT

22 May 2017

feedZend Developer Zone

May 2017 PHP Community (coffee) Cup of Service winner

Since this is the very first "Michelangelo van Dam PHP Community (coffee) Cup of Service", I spent a long time running through potential recipients. To set the tone for this award, I wanted someone who gives a lot back to our community. While there are a lot of worthy recipients that meet the criteria, the one that stood out to... Read more »

The post May 2017 PHP Community (coffee) Cup of Service winner appeared first on Zend Developer Zone.

22 May 2017 4:21pm GMT

15 May 2017

feedZend Developer Zone

Sharpen your knives

As a manager, it is your responsibility to take care of, maintain, and improve the developers under your care. If you are not regularly investing in keeping their skills sharp, you are doing a disservice to your developers, to your project, and to your company.

The post Sharpen your knives appeared first on Zend Developer Zone.

15 May 2017 12:57pm GMT

10 Mar 2017

feedZend Developer Zone

ZendCon 2017 Call for Papers is OPEN!

For the five of you who are living under a rock and haven't heard, the dates for ZendCon 2017 have been announced and the ZendCon 2017 Call for Papers is open. You will want to check out the complete Speaker's package for all the details and awesomeness, but here are the highlights. Full conference pass (conference and tutorials) Lunch (conference... Read more »

The post ZendCon 2017 Call for Papers is OPEN! appeared first on Zend Developer Zone.

10 Mar 2017 4:52pm GMT

01 Mar 2017

feedZend Developer Zone

Scrape Screens with zend-dom

Even in this day-and-age of readily available APIs and RSS/Atom feeds, many sites offer none of them. How do you get at the data in those cases? Through the ancient internet art of screen scraping. The problem then becomes: how do you get at the data you need in a pile of HTML soup? You could use regular expressions or... Read more »

The post Scrape Screens with zend-dom appeared first on Zend Developer Zone.

01 Mar 2017 4:36pm GMT

22 Feb 2017

feedZend Developer Zone

zend-config For All Your Configuration Needs

Different applications and frameworks have different opinions about how configuration should be created. Some prefer XML, others YAML, some like JSON, others like INI, and some even stick to the JavaProperties format; in Zend Framework, we tend to prefer PHP arrays, as each of the other formats essentially get compiled to PHP arrays eventually anyways. At heart, though, we like... Read more »

The post zend-config For All Your Configuration Needs appeared first on Zend Developer Zone.

22 Feb 2017 4:18pm GMT

14 Feb 2017

feedZend Developer Zone

PHP and SQL Server for Linux

This week we tested the public preview of Microsoft SQL Server for Linux using PHP 7 with our component zendframework/zend-db. Microsoft announced the availability of a public preview of SQL Server for Linux on the 16th of November, 2016. This new version of SQL Server has some interesting features such as: transparent data encryption; always encrypted; row level security; in-memory... Read more »

The post PHP and SQL Server for Linux appeared first on Zend Developer Zone.

14 Feb 2017 9:28pm GMT

13 Feb 2017

feedZend Developer Zone

Zend Certified Engineer 2017-PHP

The new ZCE is here! As of February 13th, 2017, the new Zend Certified Engineer test is available. As with many things in life, it took a lot of effort to get the test updated but we are sure you will find it worth the wait. The new test now tests developers knowledge of PHP and programming concepts through PHP... Read more »

The post Zend Certified Engineer 2017-PHP appeared first on Zend Developer Zone.

13 Feb 2017 12:42am GMT

11 Nov 2011

feedCI News

Reportula

What can you tell us about the team that built reportula.org?

The Team that made reportula.org is just one person. Pedro Oliveira, started Reportula when he needed a clean and fast web application that reported the Bacula Backups software of the company he works for. He has decided to open the project, and let it grow to full web application that is able to manage the Bacula Backups.

Reportula Website Screen Shot

What can you tell us about the site in general? What are the goals of the site and the main audience?

Reportula is a php based web program that provides you a summarized output of jobs that have already run. It obtains its information from the Bacula's database. Aside from a nice graphical display, it provides summaries of your jobs, as well as graphs of job usage. This is a fairly high level bacula management tool.

The main goals were to create a web reporting tool for the bacula backups system, as I got further into the project it developed into something more than that. Right know it calculates average of bacula backups, it has time line history of backups. Imagine this scenario for example, if you use the crontab feature of reportula, you can see in time by how much data your backups infrastructure is growing.

Example. in 2011.05.01 if backups infrastructure stores 500 Tera bytes, in 2011.12.30 it stores 510 terabytes. This is very handy for us because with this feature you can predict the storage needs of your backups for the future.

What was your major consideration in using CodeIgniter for this?

I chose codeigniter because I needed an easy, fast, and supported PHP development framework. I found that with Codeigniter I could achieve that. This project was made in less than month.

Another nice thing about Codeigniter is that you don't have to "re-invent the wheel". Codeigniter has most of the thing that you need for an application already developed. All you have to do is connect the blocks which is very easy.

What is next on the plate for reportula.org? Any additional functionality you can tell us about?

On the plate for Reportula is user registrations, acls, and managing Bacula Backups like "bconsole".

Do you have any other information you'd like to share with the community? Tips from this project you'd like to share? Lessons you've learned?

First of all i think that Codeigniter is one of the best frameworks on the internet. I've tried them all (Cake, Yii, Symfony, Zend) they are all too complicated, too big, with lots of features and slow. They all had one problem BIG, STEEP LEARNING CURVE.

Codeigniter has less features than the others but you start making an application in less than 30 minutes. And what it does it does well! Even if you think you need a big framework after starting with codeigniter it cames to you that you don't need another framework to develop some applications. The lessons I learned are don't re-invent the wheel, Codeigniter does it and does it well, the community are nice, and always had support on the forum.

11 Nov 2011 10:19pm GMT

02 Nov 2011

feedCI News

GoCart

Every week we hear of really awesome places that CodeIgniter is being used. I want to start sharing those with the community-at-large. I will start by posting them here under a new Showcase Category with the hopes that any future revisions of CI.com will have a section for stuff like this. You guys and gals make some really cool stuff and deserve a platform to show it off.

So without further ado…

This showcase is an interview with Kyle Roseborrough about GoCart

What can you tell us about the GoCart team?

We have a pair of PHP developers who knew there was a better way to build a shipping cart. Noah (lead developer) has 6 years experience in PHP development and 4 years in CodeIgniter. Gabe has about 10 years experience in web application development. Kyle has been working in UI and management for 10 years.
GoCart Website Screen Shot

What can we tell about the site in general?

GoCartdv.com was built to showcase GoCart and offer some basic information on the system.

What are the goals of the site and the main audience?

The main audience is CodeIgniter developers who are wanting a simple, scalable, CodeIgniter shopping cart. The goal is to get people involved in development to improve the cart and allow it to fully embody the goal of the project. To be easy to customize for developers and easy to use for end users/customers

What was your major consideration in using CodeIgniter for this?

CodeIgniter has great documentation and is easy to learn. We build lot of custom projects on CodeIgniter and it only made sense for us to build our cart on it. When looking for commerce solutions, we never found a suitable solution built on CodeIgniter so we decided to set out to do it on our own.

What is next on the plate for GoCart?

We really want GoCart to foster a great community of people contributing back to the roadmap and path the project will take. We want the focus to remain the same though "Easy to Customize, Easy to Use". It would be great if we could get enough people using.

Any additional functionality you can tell us about?

Well, not really. GoCart is intended to be a shopping cart, plain and simple. It does have some basic page and banner management and a whole slew of cart related features, but ultimately it's an ecommerce platform.

Do you have any other information you'd like to share with the community?

We built GoCart to be simple and scalable. As time goes on, we want the software to become easier and easier to use. We want GoCart to be scalable and to be able to work with new platforms as they come out. We feel that CodeIgniter and the CodeIgniter community is a huge benefit here. It enables developers to tie into a whole plethora of libraries, helpers and applications easily and support each other in the endeavor to make CodeIgniter better. Essentially, what's good for CodeIgniter is good for GoCart.

Tips from this project you'd like to share?

If you really want something, do it yourself. If it doesn't happen then you probably don't want it as bad as you think.

Lessons you've learned?

- Not every idea is a good one. Generally you need someone else around to discuss ideas and methods with. Collaboration is the best way to build a good application.
- No one knows what the next trend will be. Having a scalable platform that will adjust to a new set of tools and user demands is very important.


If you have a project that you would like to see in our showcase email me

02 Nov 2011 7:31pm GMT

05 Oct 2011

feedCI News

New User Guide in Development

We are happy to announce today that the user guide has had some significant improvements, and the first commit of these changes were just pushed today.

As many of you likely heard at CICON 2011, the Reactor team has had an internal project going on for some time to move the user guide to Sphinx. In addition to handling the tedium of generating page and document tables of contents, or maintaining internal links and references, the documentation is now easier to write, as you can simply focus on the content instead of markup and presentation. Don't forget syntax highlighting of PHP, HTML, CSS, and JavaScript in code samples. Based on ReStructured Text, it's also more human readable in a text editor than HTML is, which is likely where you spend most of your time. As an added benefit, Sphinx can output HTML, PDF, and even EPUB formats all from the same source files. We will likely be taking advantage of that at a later date.

But we didn't stop there, we also enlisted the thunderous powers of EllisLab's Chief Creative Officer, James Mathias for a style redesign. They are clean, easy to read, and beautiful.

Setting up your dev environment to work with Sphinx (if you want to render and output locally) is very easy, and takes about five minutes. For those that want to geek out, we have added a readme file to the user guide source folder so the step by step instructions are available right from GitHub.

Today marks the first commit with the new user guide to the unreleased develop branch, so you may encounter some bumps. Most notably are the code blocks, which pandoc lost our line breaks on, and some navigation issues as we experiment with different table of contents presentation and depth. We'll be cleaning these up prior to the next release (much is as simple as some line breaks and tabs), but feel free to pitch in and submit some pull requests if you see anything out of whack.

And lastly, for the first time ever, we have live nightly builds of documentation for the develop branch available at the CodeIgniter web site. Enjoy!

05 Oct 2011 7:23pm GMT

21 Sep 2011

feedCI News

Upcoming Site Downtime

The EllisLab family of sites (ExpressionEngine.com, CodeIgniter.com, MojoMotor.com, and EllisLab.com) will be down for scheduled maintenance on Thursday, September 22, 2011 beginning at approximately 10-11pm Eastern and lasting a number of hours. Access to critical resources such as the store, your product downloads, and documentation will be unaffected.

21 Sep 2011 4:17pm GMT

06 Sep 2011

feedCI News

Contribution Guide

CodeIgniter is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or Pull Requests on the EllisLab CodeIgniter repository on GitHub.

Issues are a quick way to point out a bug. If you find a bug or documentation error in CodeIgniter then please check a few things first:

Reporting issues is helpful but an even better approach is to send a Pull Request, which is done by "Forking" the main repository and committing to your own copy. This will require you to use the version control system called Git.

Guidelines

Before we look into how, here are the guidelines. If your Pull Requests fail to pass these guidelines it will be declined and you will need to re-submit when you've made the changes. This might sound a bit tough, but it is required for us to maintain quality of the code-base.

PHP Style: All code must meet the Style Guide, which is essentially the Allman indent style, underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible.

Documentation: If you change anything that requires a change to documentation then you will need to add it. New classes, methods, parameters, changing default values, etc are all things that will require a change to documentation. The change-log must also be updated for every change. Also PHPDoc blocks must be maintained.

Compatibility: CodeIgniter is compatible with PHP 5.1.6 so all code supplied must stick to this requirement. If PHP 5.2 or 5.3 functions or features are used then there must be a fallback for PHP 5.1.6.

Branching: CodeIgniter uses the Git-Flow branching model which requires all pull requests to be sent to the "develop" branch. This is where the next planned version will be developed. The "master" branch will always contain the latest stable version and is kept clean so a "hotfix" (e.g: an emergency security patch) can be applied to master to create a new version, without worrying about other features holding it up. For this reason all commits need to be made to "develop" and any sent to "master" will be closed automatically. If you have multiple changes to submit, please place all changes into their own branch on your fork.

One thing at a time: A pull request should only contain one change. That does not mean only one commit, but one change - however many commits it took. The reason for this is that if you change X and Y but send a pull request for both at the same time, we might really want X but disagree with Y, meaning we cannot merge the request. Using the Git-Flow branching model you can create new branches for both of these features and send two requests.

How-to Guide

There are two ways to make changes, the easy way and the hard way. Either way you will need to create a GitHub account.

Easy way

GitHub allows in-line editing of files for making simple typo changes and quick-fixes. This is not the best way as you are unable to test the code works. If you do this you could be introducing syntax errors, etc, but for a Git-phobic user this is good for a quick-fix.

Hard way

The best way to contribute is to "clone" your fork of CodeIgniter to your development area. That sounds like some jargon, but "forking" on GitHub means "making a copy of that repo to your account" and "cloning" means "copying that code to your environment so you can work on it".

  1. Set up Git (Windows, Mac & Linux)
  2. Go to the CodeIgniter repo
  3. Fork it
  4. Clone your CodeIgniter repo: git@github.com:<your-name>/CodeIgniter.git
  5. Checkout the "develop" branch At this point you are ready to start making changes. Fix existing bugs on the Issue tracker after taking a look to see nobody else is working on them.
  6. Commit the files
  7. Push your develop branch to your fork
  8. Send a pull request http://help.github.com/send-pull-requests/

The Reactor Engineers will now be alerted about the change and at least one of the team will respond. If your change fails to meet the guidelines it will be bounced, or feedback will be provided to help you improve it.

Once the Reactor Engineer handling your pull request is happy with it they will post it to the internal EllisLab discussion area to be double checked by the other Engineers and EllisLab developers. If nobody has a problem with the change then it will be merged into develop and will be part of the next release.

Keeping your fork up-to-date

Unlike systems like Subversion, Git can have multiple remotes. A remote is the name for a URL of a Git repository. By default your fork will have a remote named "origin" which points to your fork, but you can add another remote named "codeigniter" which points to git://github.com/EllisLab/CodeIgniter.git. This is a read-only remote but you can pull from this develop branch to update your own.

If you are using command-line you can do the following:

git remote add codeigniter git://github.com/EllisLab/CodeIgniter.git

git pull codeigniter develop

git push origin develop

Now your fork is up to date. This should be done regularly, or before you send a pull request at least.

[Editor's note: This article will be added to the User Guide]

06 Sep 2011 1:36pm GMT

31 Aug 2011

feedCI News

Amazing Progress Report & Addition of IRC to CodeIgniter.com

In less than two weeks since the announcement was made at CICON that CodeIgniter was moving to GitHub, we've seen some incredible results from the change. Already CodeIgniter is the 10th most watched PHP project at GitHub (currently 758), with 42 open pull requests, 53 merged pull requests, 170 forks, and 41 individual contributors. Incredible!

Behind the scenes, the Reactor engineers and the EllisLab team are regularly conversing about potential changes, and working jointly on larger more sprawling projects like converting the userguide to Sphinx, and getting things ready for the inclusion of Sparks.

We also noticed what seemed to be a spike in activity on the #CodeIgniter Freenode IRC channel, so we've decided to make it more prominent to encourage its continued use. You'll now notice an IRC tab in the main navigation, letting you access the #CodeIgniter IRC channel right here at CodeIgniter.com.

Join in the discussions, and if you haven't already, start watching the CodeIgniter repo at GitHub, contributing, and even just commenting on people's requests or engaging in peer code review. With our community's energy, I think we might even eclipse some of the larger PHP projects at GitHub! You all are awesome, and we thank you.

31 Aug 2011 8:29pm GMT

27 Aug 2011

feedCI News

CICON2011 Recap

Phil Sturgeon has settled in after last weekend's very successful CICON, and relates his take on the biggest news items: GitHub, git-flow, no more "Core" branch, Sparks, and (drum roll) the community! Read the full article on Phil's blog.

27 Aug 2011 12:43pm GMT

25 Aug 2011

feedCI News

Converting from Mercurial to Git

If you've been maintaining a Mercurial fork of the CodeIgniter repo, we've written up a how-to demonstrating migration of that repository to Git. You can always just clone anew from GitHub, but if you migrate your Hg repository, you will not lose any of your change set history when switching. Read the step-by-step instructions along with some additional resources at the EllisLab blog.

25 Aug 2011 2:27pm GMT

20 Aug 2011

feedCI News

GitHub, Reactor, and v2.0.3

If you are following CICON 2011 today, then you no doubt already heard from the Reactor team: CodeIgniter is now using Git for source control, and has moved its home to GitHub. Also, CodeIgniter "Core" is not longer being publicly maintained. CodeIgniter "Reactor" is CodeIgniter, so we are dropping that suffix. In short: CodeIgniter is the framework, and Reactor is our community driven development program.

Lastly, version 2.0.3 was released today, download it here or from the release tag at GitHub.

For full details of our switch to Git, head over to the EllisLab blog.

20 Aug 2011 4:03pm GMT

27 May 2011

feedCI News

Jeffrey Way Talks CodeIgniter

Yesterday Jeffrey Way, Editor of Nettuts+ did a video tutorial on Easy Authentication using CodeIgniter. As part of the tutorial he takes you through the process of building an authentication system with CodeIgniter and how to restrict access to certain parts of your website to only those who've logged in.

27 May 2011 4:29pm GMT

25 May 2011

feedCI News

Giving Back

Today we have an announcement that we are very excited about. If you take a look around you will notice some ad spots have appeared in various locations around the CodeIgniter site. Our hope is that by adding some ads to CodeIgniter.com we can give back to the community in a number of ways. Capitalizing on the traffic will allow us to sponsor more events, invest in more hours coding and generally give back more to this awesome community. And we've also tried to make several of the ad spots more economical so that many of you can capitalize on them to promote the products or services that you are offering using CodeIgniter.

We are using the Buy Sell Ad Network to manage the ads. Those of you running ads on your sites are probably familiar with them. We chose BSA as it was a very simple process to get the ads online. But we wanted to make sure that whatever system we used allowed us to manage the content that appears on the site. BSA allows you to have complete control over the ads that appear here and we will be doing out best to make sure that they fit within the intent of this community.

I would also like to thank the Reactor Team for their feedback as part of this decision. Your contributions to this community are many and we thank you for that.

25 May 2011 7:01pm GMT

21 Apr 2011

feedCI News

Press Release: CICON

For immediate release

Tickets On Sale For CICON2011: The First US CodeIgniter Conference

If you've been waiting for a chance to meet other CodeIgniter developers or experience great CI talks masterclasses then the wait is over! Tickets are now on sale for CodeIgniter Con 2011 US and are available via Eventbrite. They are currently going at Early-Bird rates so act quickly to get your discounted ticket before the offer runs out.

CICON2011 US is the first CodeIgniter-only conference in the United States, and will be taking place at New Work City in lower Manhattan, New York, on August 20-21 2011. Speakers including Zach Kitzmiller, Eric Barnes, Greg Aker, John Crepezzi, Dan Horrgian, and Kenny Katzgrau will be presenting and conducting masterclasses on topics for developers new to CodeIgniter and advanced CI developers looking to gain new skills and knowledge. For a developing list of what's in store, check out the programme.

For anyone still not entirely sure if they should come, check out this promo video put together by CICON2011 showcasing some of the top members of the CodeIgniter community talking about discovering and using CI, including Rick Ellis(!), Derek Allard, Pascal Kriete, Greg Aker, Phil Sturgeon, Kenny Katzgrau and Eric Barnes.

Contact:
Adam Fairholm
954-871-3112

21 Apr 2011 10:47pm GMT

07 Apr 2011

feedCI News

CodeIgniter 2.0.2 Released

An update to both CodeIgniter Reactor and CodeIgniter Core (v 2.0.1) was released today. This is a security maintenance release and is a recommended update for all sites. The security fix patches a small vulnerability in the cross site scripting filter. We also took the opportunity to iterate on some of our other filtering code. As a result, the Security library is now a core component.

Please make sure you follow the upgrade instructions. Core users can grab the 2.0.1 tag on BitBucket. For core, please follow the upgrade instructions bundled with the download.

We're working on making these small maintenance releases easier to manage. We'll have more information about that soon.

07 Apr 2011 10:33pm GMT

06 Apr 2011

feedcakebaker

Bash autocompletion for Git

One thing I often wished to have when using Git was the ability to autocomplete Git commands and branch names. As I had to learn this week from Markus Prinz' article A few of my Git tricks, tips and workflows, Git comes with an autocompletion script for the Bash shell. But to use the autocompletion, […]

06 Apr 2011 8:36am GMT

01 Apr 2011

feedcakebaker

Array iteration with JavaScript

Till recently I always used a for-loop when I had to iterate over an array in JavaScript. For example: var myArray = [1, 2, 3, 4]; for (var i = 0; i < myArray.length; i++) { console.log(myArray[i]); } However, with ECMAScript 5 the Array object itself got some methods for iteration purposes. With those methods […]

01 Apr 2011 2:51pm GMT

07 Mar 2011

feedCI News

Reactor Engineer Opening

If you follow the Reactor team, you probably already know that the venerable Ed Finkler had to resign from his position due to personal time constraints. That means that we have an opening, so if you feel that you qualify, please email the following:

  1. CodeIgniter Username
  2. Link to your site profile, e.g. http://codeigniter.com/forums/member/18457/
  3. Three of your biggest contributions to CodeIgniter (can be code, a particular bit of feedback, etc.)
  4. A brief paragraph stating why you think you should be considered.

You can also nominate someone else by emailing the above information on their behalf. In that case, please also include your CodeIgniter Username and link to your site profile along with your nominee's.

If you submitted an application the first time around, please just send a brief email indicating that you are still interested. We received a number of great applications, but we do need to ensure that the interest and time commitments have not changed.

Thanks Ed for the time you were able to give to the Reactor project, EllisLab and the community appreciate it!

07 Mar 2011 4:20pm GMT

10 Feb 2011

feedCI News

System Maintenance, Saturday, February 12

The EllisLab family of sites will undergo a maintenance window Saturday, February 12, starting at 8pm US Pacific Time (GMT -8). Downtime should be brief, but the maintenance window is scheduled to be concluded by 11pm.

During this time, if you require access to our online documentation or software downloads, I'd like to remind you that they are available at BitBucket. There you can download a zip file, fork or clone your own local copy. If you have not used BitBucket before, you can sign up for free here.

10 Feb 2011 8:09pm GMT

10 Jan 2011

feedcakebaker

2-legged vs. 3-legged OAuth

From emails I receive it seems like there is a bit of confusion about what the terms 2-legged OAuth and 3-legged OAuth mean. I hope I can clear up this confusion with this article (and don't contribute more to the confusion…). In short, they describe two different usage scenarios of OAuth involving two respectively three […]

10 Jan 2011 5:30pm GMT

08 Dec 2010

feedcakebaker

Bugfix release v2010-12-08 of the OpenID component

There is a new bugfix release of the OpenID component available: https://github.com/cakebaker/openid-component/downloads. This release fixes a bug in the isOpenIDResponse() method. So far this method only recognized OpenID responses from a GET request. But as I had to learn, there are OpenID providers (e.g. Hyves) responding with a POST request… So, if you use the […]

08 Dec 2010 3:53pm GMT

04 Dec 2010

feedcakebaker

Navigation with the “j” and “k” keys

If you are using Vim you already know the meaning of the "j" and "k" keys: they navigate one line downwards resp. upwards. Some websites like The Big Picture adopted this functionality to provide an easy way to navigate, in the case of The Big Picture to jump from photo to photo. As I wanted […]

04 Dec 2010 9:33am GMT

19 Sep 2010

feedcakebaker

Cucumber: Switching from Webrat to Capybara

My current testing tool of choice is Cucumber. Cucumber itself integrates well with other tools. One of those tools is Webrat, which allows you to access your application without a browser and to perform actions like clicking on a link or filling out forms. It works fine with Rails 2.3.x, but not with Rails 3 […]

19 Sep 2010 2:24pm GMT

19 Jul 2010

feedcakebaker

Bugfix release for the OpenID component & an example application

Last week I received a mail from a user of the OpenID component in which he described that it wasn't possible to login with OpenIDs from claimID and Blogger. After some debugging I found the reason for this problem: a bug in the isOpenIDResponse() method. The method only recognized responses from providers using OpenID 2.0, […]

19 Jul 2010 2:23pm GMT

14 Jul 2010

feedcakebaker

Grouping “constants” with JavaScript

A while ago I wrote about how you can group related constants in PHP5 by using a constants class: class MyConstants { const AA = 'value'; const BB = 'another value'; } echo MyConstants::AA; // output: value Now, while experimenting with JavaScript (or more precisely with Node.js) I got some constants in my code I […]

14 Jul 2010 2:10pm GMT

19 May 2010

feedcakebaker

OpenID component v2010-05-19 released

As mentioned in the title, I released a new version of the OpenID component today. It's a maintenance release: the only change is an update of the bundled PHP OpenID library from version 2.1.2 to 2.2.2. With this change you no longer have to patch the OpenID library if you are working with PHP 5.3. […]

19 May 2010 7:51am GMT

08 May 2010

feedcakebaker

Sassy CSS

Those who follow me on Twitter probably know about my love-hate relationship with CSS. To ease the pain of working with CSS I switched to Compass, a stylesheet authoring framework. With Compass, you write the stylesheets in Sass (Syntactically Awesome Stylesheets) instead of CSS. Sass is basically CSS without brackets and semicolons, as you can […]

08 May 2010 1:13pm GMT

04 Mar 2010

feedWithCake.com Companies Hiring

qpLogic Europe

We can use immediately an experienced Cake developer for assisting us with developing a multi-lingual application that needs some Jake/Joomla (css) integration. We have continuously Cake projects and prefer to work with a team of individual developers in multiple time zones. Please show me that you are experienced, affordable and have at least 24 hours available per week (40 is better ;-).

04 Mar 2010 11:54am GMT