21 Oct 2019

feedSymfony Blog

New in Symfony 4.4: Horizontal Tables and Definition Lists in Console Commands

Grégoire Pineau

Contributed by
Grégoire Pineau
in #32742.

The Console component includes some features to output tables and configure them in many different ways. In Symfony 4.4 we've improved it with new types of tables.

Horizontal Tables

Consider the following table:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
// ...

class SomeCommand extends Command
{
    public function execute(InputInterface $input, OutputInterface $output)
    {
        $table = new Table($output);
        $table
            ->setHeaders(['ISBN', 'Title', 'Author'])
            ->setRows([
                ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'],
                ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'],
                ['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'],
                ['80-902734-1-6', 'And Then There Were None', 'Agatha Christie'],
            ])
        ;
        $table->render();
    }
}

This is displayed as:

1
2
3
4
5
6
7
8
+---------------+--------------------------+------------------+
| ISBN          | Title                    | Author           |
+---------------+--------------------------+------------------+
| 99921-58-10-7 | Divine Comedy            | Dante Alighieri  |
| 9971-5-0210-0 | A Tale of Two Cities     | Charles Dickens  |
| 960-425-059-0 | The Lord of the Rings    | J. R. R. Tolkien |
| 80-902734-1-6 | And Then There Were None | Agatha Christie  |
+---------------+--------------------------+------------------+

If you call to the new setHorizontal(bool $horizontal = true) method, the table is transformed into an "horizontal table", where the data is displayed in rows instead of columns:

1
2
3
4
5
6
7
$table
    ->setHeaders(['ISBN', 'Title', 'Author'])
    ->setRows([
        // ... the rows ...
    ])
    ->setHorizontal()
;
1
2
3
4
5
+--------+-----------------+----------------------+-----------------------+--------------------------+
| ISBN   | 99921-58-10-7   | 9971-5-0210-0        | 960-425-059-0         | 80-902734-1-6            |
| Title  | Divine Comedy   | A Tale of Two Cities | The Lord of the Rings | And Then There Were None |
| Author | Dante Alighieri | Charles Dickens      | J. R. R. Tolkien      | Agatha Christie          |
+--------+-----------------+----------------------+-----------------------+--------------------------+

When using the Symfony style for commands you can also use the horizontalTable() shortcut:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
use Symfony\Component\Console\Style\SymfonyStyle;

protected function execute(InputInterface $input, OutputInterface $output)
{
    $io = new SymfonyStyle($input, $output);
    $io->horizontalTable(
        ['ISBN', 'Title', 'Author'],
        [
            // ... the rows ...
        ]
    );
}

Definition Lists

In Symfony 4.4 we've also added support for "definition lists", which are a set of key-value pairs, similar to HTML's <dl>. Symfony's definition lists are more flexible because they can include titles, separators, etc.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
use Symfony\Component\Console\Helper\TableSeparator;

$io->definitionList(
    ['Version' => '4.4.0'],
    ['Long-Term Support' => 'Yes'],
    new TableSeparator(),
    'Timeline',
    ['End of maintenance' => '11/2022'],
    ['End of life' => '11/2023']
);

This example is output as follows:

1
2
3
4
5
6
7
8
-------------------- ---------
 Version              4.4.0
 Long-Term Support    Yes
-------------------- ---------
 TIMELINE
 End of maintenance   11/2022
 End of life          11/2023
-------------------- ---------

Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

21 Oct 2019 10:31am GMT

20 Oct 2019

feedSymfony Blog

A Week of Symfony #668 (14-20 October 2019)

This week, the upcoming Symfony 4.4. version added a new feature for lazy computation of string values injected into services and continued working on the new feature to store secrets. Finally, the SymfonyCon Amsterdam 2019 conference announced a fundraising for its scholarship program.

Symfony development highlights

This week, 62 pull requests were merged (26 in code and 36 in docs) and 36 issues were closed (25 in code and 11 in docs). Excluding merges, 34 authors made 1,476 additions and 444 deletions. See details for code and docs.

3.4 changelog:

4.3 changelog:

4.4 changelog:

Master changelog:

Newest issues and pull requests

They talked about us

Call to Action


Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

20 Oct 2019 7:52am GMT

18 Oct 2019

feedSymfony Blog

New in Symfony 4.4: Improved Welcome Page

Yonel Ceruto

Contributed by
Yonel Ceruto
in #33189.

When you browse a newly created Symfony project, you see a special "Welcome page" that looks like this:

The Symfony Welcome Page in Symfony 4.3 and earlier versions

Although this is an error page (you are seeing that page because you haven't configured any URL yet) we designed it to make it look more friendly than a traditional error page, specially for newcomers.

This page confirms you that Symfony was successfully installed, shows the directory of your application and provides a link to the most essential documentation for newcomers: How to create your first page in Symfony.

Even if this page is correct, its design was dull and uninspiring. That's why we decided to redesign it for Symfony 4.4/5.0. This is how the same page looks now:

The Symfony Welcome Page in Symfony 4.4 and newer versions

In addition to having a much better design, the page now provides more links to useful resources. Also, the main page color will randomly change each time you load the page, so keep reloading until the color matches your preferences.


Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

18 Oct 2019 8:07am GMT

17 Oct 2019

feedSymfony Blog

Scholarship program and its fundraising are open at SymfonyCon Amsterdam 2019

For the third year in a row, we're very pleased to launch our scholarship program! We are super excited to open the scholarship process for this year's SymfonyCon Amsterdam 2019, November 21st to 23rd. We hope to help the Symfony community members who can't afford to attend the conference to be part of this great event. The scholarship program is part of the Diversity Initiative which was launched three years ago at SymfonyCon Cluj and is led by Lukas Kahwe Smith, a long time Symfony core team member.

Fundraising

This year, we'd like to call the entire Symfony community to contribute to our scholarship program by donating funds to help us cover the scholarships expenses for SymfonyCon Amsterdam 2019. We aim to offer 3 scholarships at SymfonyCon Amsterdam 2019 and we need your help. We're thus opening a fundraising campaign to collect enough money to offer 3 scholarships to people who cannot join us at the conference for financial reasons. You can donate via our Symfony page on Open Collective website. Anyone can donate on Open Collective, a company or an individual. You can donate the amount you want and either become a backer or a Sponsor! After your donation, you'll automatically get a PDF invoice.

Our objective is to receive enough money to cover the 3 scholarships we'd like to offer at SymfonyCon Amsterdam. In order to be able to cover these 3 scholarships, we aim to collect a minimum of 4 000€ ($4,500) to cover the conference ticket, travel (flight or train tickets from the city of departure to Amsterdam) and accommodation for 3 nights per grant recipient. If we exceed this minimum amount and have enough funds to provide more scholarships, we'd be very pleased to extend our scholarship offer to more people. All the available funds and the submitted expenses will be available on our page so everyone can see them. We've chosen Open Collective because of its mission to operate in full transparency and because we want to involve the community in this initiative as much as possible.

Scholarship process

Application process for scholarships at SymfonyCon Amsterdam 2019 is now open until November 3rd. You just need to fill in a form to submit your application. SymfonyCon's scholarship program is aimed to support Symfony community members who want to attend the conference, but cannot without the scholarship. Anyone regardless of gender, gender identity and expression, sexual orientation, ability, physical appearance, race, ethnicity, age, religion, or socioeconomic status can apply for a scholarship.

We want to include, encourage and recognize people from all backgrounds no matter where you come from. If you cannot attend the conference without financial aid, you are eligible to our scholarship program. We will consider every application. Priority will be given to underrepresented groups such as women, minorities, LGBTQIA and people with disabilities, or other underrepresented groups who will be unable to attend the event without financial support. Students are welcome!

Within the Symfony community, we support diversity and inclusion and are proud to launch our third scholarship program.

Apply here for the SymfonyCon's scholarship program until Sunday November 3rd 2019.

The selection process for the scholarship will be handled by the SymfonyCon Amsterdam organizers, Lukas Kahwe Smith (Diversity Initiative leader) and the CARE team. We'll announce the grant recipients on November 8th.

We'd like to thank in advance all the people who will support the scholarship program and help us build the Diversity Initiative. If you have any questions regarding the scholarship program or the SymfonyCon Amsterdam, please contact us at event[at]symfony.com. If you want to have more information about our Code of Conduct, you can find it here.

See you soon at the conference!


Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

17 Oct 2019 8:45am GMT

New in Symfony 4.4: Password Migrations

Nicolas Grekas

Contributed by
Nicolas Grekas
in #31594, #31597, and #31843.

In Symfony 4.3 we introduced a native password encoder to hash your user passwords with the best possible algorithm available in your server:

1
2
3
4
5
6
7
# config/packages/security.yaml
security:
    # ...
    encoders:
        App\Entity\User:
            algorithm: auto
            cost: 14

This algorithm is selected automatically and can change over time, so different users will end up using different algorithms. Technically this is not a problem because Symfony knows how to hash and compare each password, so all users will be able to log in. However, it would be great if all users always used the best possible algorithm.

In Symfony 4.4, when a user successfully authenticates, Symfony checks if a better hashing algorithm is available and rehashes the password so you can store the updated hash. In practice, when using the entity user provider, you only need to update the Doctrine repository associated to users and implement the Symfony\Component\Security\Core\User\PasswordUpgraderInterface.

This interface defines a single method named upgradePassword() which Symfony will call when the user password must be rehashed:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
// src/Repository/UserRepository.php
namespace App\Repository;

// ...
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;

class UserRepository extends EntityRepository implements PasswordUpgraderInterface
{
    // ...

    public function upgradePassword(UserInterface $user, string $newEncodedPassword): void
    {
        // this code is only an example; the exact code will depend on
        // your own application needs
        $user->setPassword($newEncodedPassword);
        $this->getEntityManager()->flush($user);
    }
}

Read the docs about this new feature to learn how to implement it when using a custom user provider or a custom password encoder.


Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

17 Oct 2019 8:25am GMT

16 Oct 2019

feedSymfony Blog

New in Symfony 4.4: PHPUnit Assertions for Email Messages

Fabien Potencier

Contributed by
Fabien Potencier
in #32930 and #33203.

The new Mailer and Mime components were introduced in Symfony 4.3 to replace the previous solution based on SwiftMailer. In Symfony 4.4 we've improved them with new PHPUnit assertions to test emails.

The new assertions follow the same philosophy of the test assertions introduced in Symfony 4.3, with long but expressive method names:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
// tests/Controller/DefaultControllerTest.php
namespace App\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase
{
    public function testSomething()
    {
        $client = static::createClient();
        $client->request('GET', '/newsletter-signup');
        // ...

        $this->assertEmailCount(2);
        $this->assertEmailIsQueued($this->getMailerEvent(0));

        $email = $this->getMailerMessage(0);
        $this->assertEmailHeaderSame($email, 'To', 'fabien@symfony.com');
        $this->assertEmailTextBodyContains($email, 'Welcome to Symfony!');
        $this->assertEmailAttachementCount($email, 1);
    }
}

This is the full list of mailer assertions:


Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

16 Oct 2019 1:02pm GMT

15 Oct 2019

feedSymfony Blog

New in Symfony 4.4: Messenger Middleware to Clear Doctrine Entity Manager

Konstantin Myakshin

Contributed by
Konstantin Myakshin
in #31334.

In the Messenger component, middleware is used to configure what happens when you dispatch a message to a message bus. In Symfony 4.4 we've added a new middleware to clear Doctrine's entity manager after each message is consumed.

Enable it by adding messenger.middleware.doctrine_clear_entity_manager to the middleware of your buses:

  • YAML
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    # config/packages/messenger.yaml
    framework:
        messenger:
            buses:
                messenger.bus.default:
                    default_middleware: false
                    middleware:
                        # ...
                        - 'doctrine_clear_entity_manager'
    
  • XML
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    
    <!-- config/packages/messenger.xml -->
    <?xml version="1.0" encoding="UTF-8" ?>
    <container xmlns="http://symfony.com/schema/dic/services"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:framework="http://symfony.com/schema/dic/symfony"
        xsi:schemaLocation="http://symfony.com/schema/dic/services
            https://symfony.com/schema/dic/services/services-1.0.xsd
            http://symfony.com/schema/dic/symfony
            https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
    
        <framework:config>
            <framework:messenger>
                <!-- ... -->
                <framework:middleware id="doctrine_clear_entity_manager"/>
                <framework:bus name="messenger.bus.default" default-middleware="false"/>
            </framework:messenger>
        </framework:config>
    </container>
    
  • PHP
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    
    // config/packages/messenger.php
    $container->loadFromExtension('framework', [
        'messenger' => [
            'buses' => [
                'messenger.bus.default' => [
                    'middleware' => [
                        // ...
                        'doctrine_clear_entity_manager',
                    ],
                    'default_middleware' => false,
                ],
            ],
        ],
    ]);
    

The first advantage of this middleware is that it reduces the memory consumption when handling messages in long-running processes. The second advantage is that it prevents unexpected side-effects. For example, in the case of an user account recovery process (where an email is sent asynchronously with Messenger and AMQP), if the email address is updated after the first try, the second email is sent to the old email address. Using this middleware will solve that problem.


Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

15 Oct 2019 9:08am GMT

14 Oct 2019

feedSymfony Blog

New in Symfony 4.4: Improved Type Constraint

Jan Schädlich

Contributed by
Jan Schädlich
in #31351.

The Type constraint included in the Validator component validates that a given value is of a specific data type. This type can be any of the valid PHP types, any of the PHP ctype functions (e.g. alnum, alpha, digit, etc.) and also the FQCN of any class:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
// src/Entity/Author.php
namespace App\Entity;

use Symfony\Component\Validator\Constraints as Assert;

class Author
{
    /**
     * @Assert\Type("Ramsey\Uuid\UuidInterface")
     */
    protected $id;

    /**
     * @Assert\Type("string")
     */
    protected $firstName;

    // ...
}

Starting from Symfony 4.4, the checked type can be an array of types, so you can validate that the given value type is one of several possible types. In the following example, the $accessCode property can contain only letters or only digits, but not both:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
// src/Entity/Author.php
namespace App\Entity;

use Symfony\Component\Validator\Constraints as Assert;

class Author
{
    // ...

    /**
     * @Assert\Type(type={"alpha", "digit"})
     */
    protected $accessCode;
}

Be trained by Symfony experts - 2019-10-21 Lyon - 2019-10-28 Berlin - 2019-10-28 Berlin

14 Oct 2019 9:54am 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

18 Oct 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 2.0.0beta1 Released!

The Zend Framework community is pleased to announce the immediate availability of Zend Framework 2.0.0beta1. Packages and installation instructions are available at: http://packages.zendframework.com/

18 Oct 2011 7:44am 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

29 Sep 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 1.11.11 Released

The Zend Framework team announces the immediate availability of Zend Framework's ALL ONES 1.11.11 release, the eleventh maintenance release in the 1.11 series. 1.11.11 includes around 30 bug fixes and may be downloaded from the Zend Framework site .

29 Sep 2011 7:52pm 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

feedDevZone - Items tagged as: Zend Framework

Announcing September's Zend Framework Bug Hunt Days

For those who haven't put the recurring event in their calendar, the Zend Framework Monthly Bug-hunt is here again! This Thursday, Friday and Saturday (the 22nd, 23rd and 24th of September), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

21 Sep 2011 3:07pm 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

23 Aug 2011

feedDevZone - Items tagged as: Zend Framework

Announcing the August 2011 Zend Framework Bug-Hunt

For those who haven't put the recurring event in their calendar, the Zend Framework Monthly Bug-hunt is here again! This Thursday, Friday and Saturday (the 25th, 26th and 27th of August), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

23 Aug 2011 1:44pm 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

03 Aug 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 1.11.10 Released

The Zend Framework team announces the immediate availability of Zend Framework 1.11.10, our tenth maintenance release in the 1.11 series. 1.11.10 includes more than 50 bug fixes and may be downloaded from the Zend Framework site .

03 Aug 2011 9:03pm GMT

26 Jul 2011

feedDevZone - Items tagged as: Zend Framework

Announcing July's Zend Framework Bug Hunt Days

For those who haven't put the recurring event in their calendar, the Zend Framework Monthly Bug-hunt is here again! This Thursday, Friday and Saturday (the 28th, 29th and 30th of July), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

26 Jul 2011 6:45pm GMT

14 Jul 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 1.11.9 Released

A number of potential BC issues were identified in the 1.11 series, and specifically in the 1.11.8 release, and as such, the Zend Framework team is releasing version 1.11.9 just one week following 1.11.8. It is available for immediate download: http://framework.zend.com/download/latest

14 Jul 2011 5:15pm GMT

07 Jul 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 1.11.8 Released

The Zend Framework team announces the immediate availability of Zend Framework 1.11.8, our eighth maintenance release in the 1.11 series. 1.11.8 includes around 40 bug fixes and may be downloaded from the Zend Framework site .

07 Jul 2011 4:04pm GMT

29 Jun 2011

feedDevZone - Items tagged as: Zend Framework

Juozas Kaziukėnas discusses the future of PHP frameworks

Juozas "Joe" Kaziukėnas recently wrote a post on his blog that discusses the current and future state of the PHP framework landscape. This one is going to take a little explaining, have a seat and I'll get the flip chart.

29 Jun 2011 12:00pm GMT

28 Jun 2011

feedDevZone - Items tagged as: Zend Framework

Pádraic Brady is now summarizing the Zend Framework Contributors Mailing-List

Zend Framework community member Pádraic Brady has started his own summaries of the Zend Framework Contributors mailing-list. Click on inside, I've got the URL laying around here somewhere.

28 Jun 2011 4:48pm GMT

17 Jun 2011

feedDevZone - Items tagged as: Zend Framework

Announcing June's Zend Framework Bug Hunt Days

For those who haven't put the reoccurring event in their calendar, this announcement is for you: the Zend Framework Monthly Bug-hunt is here again! Next Thursday, Friday and Saturday (the 23rd, 24th and 25th of June), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

17 Jun 2011 4:37pm GMT

14 Jun 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 2.0.0dev3 Release

The Zend Framework team is pleased to announce the third development release of Zend Framework 2.0, 2.0.0dev3. It is immediately downloadable from the Zend Framework servers: zip package tar.gz package NOTE! This release is not considered of production quality, and is released solely to provide a development snapshot for purposes of testing and research. Use at your own risk.

14 Jun 2011 9:21pm GMT

08 Jun 2011

feedDevZone - Items tagged as: Zend Framework

Getting an OAuth Access Token from the Command Line

OAuth is great - there's no need to save users' passwords, it's - in theory - a consistent way to interact with other services, and it's hopefully something that your users are familiar and comfortable using. But if you're not just interacting with your users' accounts - for example, your application uses a single account on a service to broadcast messages, or analyze data - getting or renewing the access token can be painful.

08 Jun 2011 9:20pm GMT

02 Jun 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 1.11.7 Released

The Zend Framework team announces the immediate availability of Zend Framework 1.11.7, our seventh maintenance release in the 1.11 series. 1.11.7 includes more than 20 bug fixes and may be downloaded from the Zend Framework site .

02 Jun 2011 3:25pm 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

feedDevZone - Items tagged as: Zend Framework

Announcing the May 2011 Zend Framework Bug-Hunt

For those who haven't put the reoccurring event in their calendar, this announcement is for you: Zend Framework Monthly Bug-hunt is here again! Tomorrow , Friday and Saturday of May (the 26th , 27th and 28th 2011 ), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

25 May 2011 3:27pm GMT

06 May 2011

feedDevZone - Items tagged as: Zend Framework

Zend Framework 1.11.6 and 1.10.9 Released

The Zend Framework team announces the immediate availability of Zend Framework 1.11.6, our sixth maintenance release in the 1.11 series, and a simultaneous release of 1.10.9, a security fix release. 1.11.6 includes more than 60 bug fixes and may be downloaded from the Zend Framework site .

06 May 2011 5:37pm 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